Hi,
I am pretty sure this is has been answered many times but I could not
find the attached example to work.
I have a repeat section that includes 2 'linked' drop downs
(country/state) and I am trying to 'hide' (using relevant) the state
when the
country is something other than US. I cannot get it to work when I
have multiple items. I've tried multiple things (using index() etc...
but no luck).
Thanks for any tips you may have
Here is a summarized version (see the attached for the full version)
<xforms:instance id="data">
<root xmlns="">
<item>
<country/>
<state/>
</item>
</root>
</xforms:instance>
<xforms:instance id="ui">
<countries xmlns="">
<country cd="0" desc="UNITED STATES">
<state cd="AL" desc="Alabama"/>
<state cd="AK" desc="Alaska"/>
</country>
<country cd="1" desc="OTHER"/>
</countries>
</xforms:instance>
<xforms:bind nodeset="instance('data')/item">
<xforms:bind nodeset="state" relevant="country='0'"/>
</xforms:bind>
<xforms:repeat id="idx" nodeset="instance('data')/item">
<xxforms:variable name="info-position" select="position()"/>
<tr>
<td>
<xforms:select1 ref="country">
<xforms:label> Country </xforms:label>
<xforms:item>
<xforms:label/>
<xforms:value/>
</xforms:item>
<xforms:itemset nodeset="instance('ui')/country">
<xforms:label ref="@desc"/>
<xforms:value ref="@cd"/>
</xforms:itemset>
</xforms:select1>
</td>
<td>
<xforms:select1 ref="state">
<xforms:label>State</xforms:label>
<xforms:item>
<xforms:label/>
<xforms:value/>
</xforms:item>
<xforms:itemset
nodeset="instance('ui')/country[@cd=instance('data')/item[$info-position]/country]/state">
<xforms:label ref="@desc"/>
<xforms:value ref="@cd"/>
</xforms:itemset>
</xforms:select1>
</td>
</tr>
</xforms:repeat>
--
You receive this message as a subscriber of the
[hidden email] mailing list.
To unsubscribe: mailto:
[hidden email]
For general help: mailto:
[hidden email]?subject=help
OW2 mailing lists service home page:
http://www.ow2.org/wws