xxforms:default to select an item

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

xxforms:default to select an item

Purni
Hi,

I have the following instance that is bound to a select dropdown control.
<xforms:instance id="sample-instance">
<items>
    <item label="Open Now" value="Open Now" />
    <item label="Open Later" value="Open Later" />
</items>                       
</xforms:instance>

I have a main instance whose property will get set with what's selected in the drop-down.
<xforms:bind nodeset="instance('main-instance')/prop[@name='open']" />

I want to use xxforms:default in the above binding to set the default value to be "Open Later".

<fr:dropdown ref="instance('main-instance')/prop[@name='open']">
        <xforms:label>Open?</xforms:label>
        <xforms:itemset nodeset="instance('sample-instance')/item">
                  <xforms:label ref="./@label"/>
                   <xforms:value ref="./@value"/>
         </xforms:itemset> 
</fr:dropdown>

How do I do this?

Thanks,
Purni