[EMAIL PROTECTED] wrote:
I am trying to fill the values in a combo box dynamically by reading from a xml file.
Surabhi,
As you know, in presentation server you only have one model, and so one instance per page. Consequently you need to have in the same instance the element that holds the value selected by the user, and all the possible values. We do this in the XForms selection example. If you look at the xforms-selection/form.xml you will see that the instance looks like:
<form>
<document>
<payment/>
</document>
<data>
<payments>
<payment value="cash" label="Cash"/>
<payment value="credit" label="Credit"/>
</payments>
</data>
</form>And the view uses a select1 control:
<xforms:select1 ref="document/payment" appearance="minimal">
<xforms:itemset nodeset="/form/data/payments/payment">
<xforms:label ref="@label"/>
<xforms:copy ref="@value"/>
</xforms:itemset>
</xforms:select1>Instead of listing the list of possible values in the instance, you can have those in a separate file and use XInclude to include them:
<form xmlns:xi="http://www.w3.org/2003/XInclude"> <document> <payment/> </document> <data> <xi:include href="data.xml"/> </data> </form>
Alex
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
orbeon-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/orbeon-user
