Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: autocompleteBox : sql queryType

  1. #1
    Join Date
    Jun 2010
    Posts
    5

    Default autocompleteBox : sql queryType

    I would like to use sql as queryType for autocompleteBox component.

    I have modified the autocompleteBox Sample as follows :

    ------------------------------------------------------------------------------

    MetaLayerHome2 = {
    clientSelectorDefinition: {
    queryType: 'sql',
    jndi: "AHData",
    catalog: "",
    query: function(){
    return "SELECT code,description FROM code_master";
    }
    }
    }


    clientSelector =
    {
    name: "clientSelector",
    type: "autocompleteBox",
    matchType: "fromStart",
    queryDefinition: MetaLayerHome2.clientSelectorDefinition,
    selectMulti: true,
    showApplyButton: true,
    minTextLenght: 0,
    scrollHeight: 250,
    parameter:"clients",
    htmlObject: "sampleObject",
    executeAtStart: true
    }

    ------------------------------------------------------------------------------

    But still it is not working. Please help me.

  2. #2
    Join Date
    Dec 2009
    Posts
    27

    Default

    In the official documentation, for example in :

    http://code.google.com/p/pentaho-cdf...c=svn592&r=592

    you can notice the following:
    Note: Due to security restrictions, sql execution is disabled by default. If you want to enable sql copy the file "cdf/components/timelinefeeder.xaction.sql" to "cdf/components/timelinefeeder.xaction" in the solutions directory. All parameters can optionally be functions.

    There is more available documentation and plenty examples in bi-divelopers/cdf-samples/

    Hopes this helps,
    Vlad

  3. #3
    Join Date
    Jun 2010
    Posts
    5

    Default

    Hello Vlad,

    Thanks for your reply.

    I have renamed all *.xaction.sql found in "pentaho-solutions\cdf\components" directory to "*.xaction". Restarted tomcat also after clearing the work directory. But still i could not get autocompleteBox working.

    Please help me resolve this issue. Thanks in Advance.

    With Regards

    Santhanam
    Last edited by Santhanam; 07-08-2010 at 07:48 AM. Reason: Formatting Text

  4. #4
    Join Date
    Mar 2008
    Posts
    364

    Default

    have a look at jtable.xaction in pentaho-solutions/cdf/components and see if SQLLookupRule is commented out (due to the security risks mentioned above). If so, uncomment it and restart.

  5. #5
    Join Date
    Jun 2010
    Posts
    5

    Default

    Hello mgie,

    I have checked jtable.xaction file, SQLLookupRule is not commented. I have also looked in other xaction files found in pentaho-solutions\cdf\components directory, but SQLLookupRule nit not commented. Also restarted tomcat, but still not working.

    Please help me resolve this issue.
    Thanks
    With Regards
    Santhanam

  6. #6
    Join Date
    Mar 2008
    Posts
    364

    Default

    Sorry, this is what pentaho support told me when I had that problem and it solved it. So I don't know about your situation

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.