Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: CDF select component character escape

  1. #1
    Join Date
    Feb 2006
    Posts
    24

    Default CDF select component character escape

    Hi,
    I'm trying to get to grips with CDF 3 under Pentaho 2.0. I am using the select component. I am populating it from an xaction. I guess that the select component only uses the first two elements of the result set. I guess that the first element is the select option value and the second element is the select option content.

    It seems (from poking about with firebug) that what comes back from the AJAX request is a fragment of html like

    Code:
    <tr><th>ID</th><th>PERIODDATE</th></tr>
    <tr><td align="right">1,126</td><td>2007-07-29 00:00:00.0</td></tr>
    <tr><td align="right">1,146</td><td>2007-07-30 00:00:00.0</td></tr>
    <tr><td align="right">1,147</td><td>2007-07-31 00:00:00.0</td></tr>
    Then my select control is shows very oddly. Both the option value and content is the part of the first TD after the comma (so 126 then 146 then 147 in the above instance).

    I guess this is how the returned html fragment is parsed...is it? Or how the parsed value is applied?

    So my questions:

    1) Where is the js code that parses the returned html fragment into a js array so I can try and fix this?
    2) Can't we get xactions to return json?

    Cheers

    Russell

  2. #2
    Join Date
    Jul 2007
    Posts
    2,497

    Default

    Hello Russel.

    1) That's something that we'll fix in future versions. The problem is that we're using a function called parseArray that has to parse the html that splits the fields where it finds a comma ','.


    2) That's what will happen in the future


    The good news is: there's a very simple workaround for that; Just cast the numeric fields to string and it will work
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  3. #3
    Join Date
    Feb 2006
    Posts
    24

    Default

    Hi,
    Thanks for the rapid response.

    1) You (or someone) fixed it already, I check out the latest from SVN and the problem is solved, it was in parseArray in CoreComponents.js.
    2) Do you mean in the query? make the column returned a string?

    I'm really liking CDF, so if I find a way to contribute I will...thanks again

    Russell

  4. #4
    Join Date
    Jul 2007
    Posts
    2,497

    Default

    Oh, that's nice. 2) was a workaround for 1), then no need to bother. But the bug I was thinking about is a different one then

    Glad you liked it.
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

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.