- From: <Nick_Van_den_Bleeken@inventivedesigners.com>
- Date: Thu, 1 Jun 2006 09:33:41 +0200
- To: Nicolas Duroc <nicolas.duroc@gmail.com>
- Cc: www-forms@w3.org
Hi Nicolas, I don't think switch in a repeat is supported in XForms 1.0 if you read http://www.w3.org/TR/2003/REC-xforms-20031014/slice9.html#ui-repeat-ui You can see that it states that '... A necessary consequence of this is that XForms 1.0 does not specify the behavior of construct switch within element repeat. ...' Regards, Nick Van den Bleeken - Research & Development Inventive Designers Phone: +32 - 3 - 8210170 Fax: +32 - 3 - 8210171 Email: Nick_Van_den_Bleeken@inventivedesigners.com www-forms-request@w3.org wrote on 05/31/2006 12:21:17 PM: > > 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> > > > -------------------------------------------------- Inventive Designers' Email Disclaimer: http://www.inventivedesigners.com/email-disclaimer
Received on Thursday, 1 June 2006 07:37:23 UTC