[
https://issues.apache.org/jira/browse/XAP-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matt Carbone reopened XAP-128:
------------------------------
Still not working
> Data Binding: binding to text attribute in listBox/listItem does not work
> -------------------------------------------------------------------------
>
> Key: XAP-128
> URL: https://issues.apache.org/jira/browse/XAP-128
> Project: XAP
> Issue Type: Bug
> Components: Data Binding
> Reporter: Matt Carbone
> Priority: Critical
>
> Currently can't bind to the text attribute of a listItem in a listBox using
> either json or xml. Using Iterator.
> Xal snippet:
> <xal xmlns="http://www.openxal.org/xal"
> xmlns:xal="http://www.openxal.org/xal">
> <documentDataSource
> xmlns="http://www.openxal.org/data"
> id="myDataSource"
> source="employees.xml"
> />
> <jsonDataSource
> xmlns="http://www.openxal.org/data"
> id="jsonDS"
> path="Employees_json.js"
> source="employees"/>
> <macro:macro id="insertcombo" xmlns:macro="http://www.openxal.org/macro">
> <xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
> <xm:insert-after select="id('boom')">
> <xal:comboBox id="c1" width="200px" >
> <xal:listBox selectionMode="single">
> <iterator xmlns="http://www.openxal.org/data"
> name="anIterator1" dataSource="myDataSource" select="//employee"
> type="ONE_TIME">
> <xal:listItem text="{*('@lname')}" />
> </iterator>
> </xal:listBox>
> </xal:comboBox>
> <xal:comboBox id="c2" width="200px" >
> <xal:listBox selectionMode="single">
> <iterator xmlns="http://www.openxal.org/data"
> name="anIterator2" dataSource="jsonDS" select="array" type="ONE_TIME">
> <xal:listItem text="{*('lname')}" />
> </iterator>
> </xal:listBox>
> </xal:comboBox>
> </xm:insert-after>
> </xm:modifications>
> </macro:macro>
> <xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
> <xm:append select="/xal">
> <xal:button id="boom" text="button" />
> <xal:button id="btn_3" text="COMBO ITERATE - GO!!!"
> onCommand="macro:insertcombo.execute()" />
> </xm:append>
> </xm:modifications>
> </xal>
> ********************JSON DATA********************
> var employees = {
> "array":[
> {"lname":"Doe", "fname":"John", "id":"001"},
> {"lname":"Roe", "fname":"Mary", "id":"002"},
> {"lname":"Smith", "fname":"Winston",
> "id":"003.14159265"},
> {"lname":"O'Brien", "fname":"Julia", "id":"004"},
> {"lname":"Venture", "fname":"Thaddeus", "id":"005"}
>
>
> ]
> }
> ******************XML DATA**************************
> <employees>
> <employee fname="Jeanne" lname="Doe" />
> <employee fname="Mary" lname="Roe" />
> <employee fname="Ameesh" lname="Chakravarti" />
> <employee fname="Arne" lname="Sachnussen"/>
> <employee fname="Manny" lname="Fein" />
> <employee fname="Vipul" lname="Periwal" />
> <employee fname="Xiuxiu" lname="Guo" />
>
> <employee fname="Jeanne" lname="Doe" />
> </employees>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira