- From: Nicolas Duroc <nicolas.duroc@gmail.com>
- Date: Wed, 31 May 2006 10:21:17 +0000 (UTC)
- To: www-forms@w3.org
Hi,
I have a repeat controls who lists data from a xml file. Nodes which are
browsed by the repeat control contains another node, and I would like to make
a switch to hide/show this node (which contains itself other data). I tried to
do with switch and case control, but all the "id" case should be different,
with an index by exemple (maybe the repeat index ?), i didn't found any
examples for this problem, is there a solution ?
structure of my xml file :
<myFile>
<row>
<a>data1</a>
<node>
<b>datanode1</b>
</node>
</row>
<row>
<a>data2</a>
<node>
<b>datanode2</b>
</node>
</row>
<row>
<a>data3</a>
<node>
<b>datanode3</b>
</node>
</row>
</myFile>
my repeat control browses the row nodes, displays the "a" data with input
control, and i would like to display a "hide/show" control for the "node" node.
<xforms:group appearance="minimal">
<xforms:repeat nodeset="myFile/row" id="repeatrow"
appearance="compact">
<xforms:input ref="a">
<xforms:label>a</xforms:label>
</xforms:input>
<xforms:switch id="switch1">
<xforms:case id="show" selected="false">
<xforms:trigger id="hide-button">
<xforms:label>Node</xforms:label>
<xforms:action>
<xforms:toggle case="hide"/>
</xforms:action>
</xforms:trigger>
<input ref="node/b">
<xforms:label>B</xforms:label>
</input>
</xforms:case>
<xforms:case id="hide" selected="true">
<xforms:trigger id="show-button">
<xforms:label>Node</xforms:label>
<xforms:action>
<xforms:toggle case="show"/>
</xforms:action>
</xforms:trigger>
</xforms:case>
</xforms:switch>
</xforms:repeat>
</xforms:group>
Received on Thursday, 1 June 2006 01:58:11 UTC