Surabhi,

Here is your solution. Use XSLT to dynamically generate the
<xforms:item> elements. For example:

   <xsl:for-each select="doc('combo.xml')/combo/street">
     <xforms:item>
       <xforms:label><xsl:value-of select="label"/></xforms:label>
       <xforms:value><xsl:value-of select="value"/></xforms:value>
     </xforms:item>
   </xsl:for-each>

Simple, elegant.

-Erik

[EMAIL PROTECTED] wrote:
>
> Hi ,
>
> I am trying to fill the values in a combo box dynamically by reading
> from a xml file.
> Now if orbeon supported multiple model it would have been easy . Put the
> values of combo box in different model and write following code:
>
> <xforms:select1 model="*model1*" ref="/street">
>           <xforms:label style="width:200px;">Select the
> Street</xforms:label>
>           <xforms:itemset model="*model2*" nodeset="/combo/street">
>             <xforms:label ref="label" />
>             <xforms:value ref="value" />
>           </xforms:itemset>
>
> </xforms:select1>
>
>
> Now how do I achieve this in orbeon framework. The scenario is  --- In
> xform model "data.xml" I need to capture value which got selected from
> combo box .
> And all the values of combo box should come from "combo.xml" .
>
> combo.xml:
> <combo>
>         <street>
>                 <label>AAA</label>
>                 <value>1111</value>
>         </street>
>         <street>
>                 <label>BBB</label>
>                 <value>222</value>
>         </street>
> </combo>
>
> data.xml:
> <myform>
>         <street/>
> </myform>
>
> <xforms:group ref="/myform">
> <xforms:select1 ref="street" appearance="minimal">
>         <xforms:repeat nodeset="doc('combo.xml')/combo/street">
>                 <xforms:item>
>                         <xforms:label ref="label"/> --------> The prob I
> think is the ref tries to find "label" in data.xml but i want to fill
> from combo.xml
>                         <xforms:value ref="value"/>
>                 </xforms:item>
>         </xforms:repeat>
> </xforms:select1>
> </xforms:group>
>
>
> The error it throws it "Error unexpected character literal"
>
> please suggest a solution.
>
> Thanks in advance,
> Regards,
> Surabhi


-------------------------------------------------------
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

Reply via email to