hai anybody,
I'm trying to use the xforms:repeat tag in the following code: <xhtml:div id="contentpane"> <!-- tabs --> <table border="1" bordercolor="red"> <xhtml:tr> <xforms:repeat nodeset="instance('form-instance')//widget[@widgetType='tab']" id="tab-repeat"> <td> <xforms:output value="@description" /> </td> </xforms:repeat> </xhtml:tr> </table> <!-- tab-content --> <table> <xforms:repeat nodeset="instance('form-instance')//widget[@widgetType='tab'][index('tab-repeat')]/widget" id="widget-repeat"> <tr> <td> <xforms:output value="@description" /> </td> </tr> </xforms:repeat> </table> </xhtml:div> As can be seen, I'm trying to 'simulate' tab functionality, for which I use a table in which I print all description attributes of all Widgets with a type of 'tab'. Under that table, I'm trying to print descriptions for all the widgets on the selected tab.. Reasoning is, that when selecting one of the tab-widgets, the 'tab-index' is updated... and the nodeset in the second table is dependend on this tab-index, so, this should work. And it works! But, It only works IF the amount of widgets found in the second table is equal in all tabs..., otherwise I get the error: 'repeatChildren and newNodeset have different sizes.' So, this makes it inpossible for me to deliver (for the form-instance) a completely dynamic tree of widgets like this... <widget widgetType="form" description="form1"> <widget widgetType="tab" description="tab1"> <widget widgetType="comment" description="comment1" /> <widget widgetType="comment" description="comment2" /> </widget> <widget widgetType="tab" description="tab21"> <widget widgetType="comment" description="comment1" /> <widget widgetType="comment" description="comment2" /> <widget widgetType="comment" description="comment3" /> </widget> <widget widgetType="tab" description="tab1"> <widget widgetType="comment" description="comment1" /> <widget widgetType="comment" description="comment2" /> </widget> </widget> With above widget-tree, it would be possible to 'tab' between tabs 1 and 3, but tabbing to tab2 results in the error... Does anybody have an idea? Best regards, Bart -- 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 |
Administrator
|
Hi,
I responded to your initial message with a follow-up question already. Can you please look at that response and follow-up on that? For reference, here is my reply: http://www.nabble.com/Re%3A-repeatChildren-and-newNodeset-have-different-sizes.-p14385607.html -Erik On Dec 17, 2007, at 11:15 AM, Bart Ottenkamp wrote: > hai anybody, > > I'm trying to use the xforms:repeat tag in the following code: > > <xhtml:div id="contentpane"> > <!-- tabs --> > <table border="1" bordercolor="red"> > <xhtml:tr> > <xforms:repeat > nodeset="instance('form-instance')// > widget[@widgetType='tab']" > id="tab-repeat"> > <td> > <xforms:output value="@description" /> > </td> > </xforms:repeat> > </xhtml:tr> > </table> > <!-- tab-content --> > <table> > <xforms:repeat nodeset="instance('form-instance')// > widget[@widgetType='tab'][index('tab-repeat')]/widget" id="widget- > repeat"> > <tr> > <td> > <xforms:output value="@description" /> > </td> > </tr> > </xforms:repeat> > </table> > </xhtml:div> > > As can be seen, I'm trying to 'simulate' tab functionality, for > which I use a table in which I print all description attributes of > all Widgets with a type of 'tab'. > Under that table, I'm trying to print descriptions for all the > widgets on the selected tab.. > Reasoning is, that when selecting one of the tab-widgets, the 'tab- > index' is updated... and the nodeset in the second table is > dependend on this tab-index, so, this should work. > And it works! But, It only works IF the amount of widgets found in > the second table is equal in all tabs..., otherwise I get the error: > 'repeatChildren and newNodeset have different sizes.' > > So, this makes it inpossible for me to deliver (for the form- > instance) a completely dynamic tree of widgets like this... > > <widget widgetType="form" description="form1"> > <widget widgetType="tab" description="tab1"> > <widget widgetType="comment" description="comment1" /> > <widget widgetType="comment" description="comment2" / > > </widget> > <widget widgetType="tab" description="tab21"> > <widget widgetType="comment" description="comment1" /> > <widget widgetType="comment" description="comment2" / > > <widget widgetType="comment" description="comment3" / > > </widget> > <widget widgetType="tab" description="tab1"> > <widget widgetType="comment" description="comment1" /> > <widget widgetType="comment" description="comment2" / > > </widget> > </widget> > > With above widget-tree, it would be possible to 'tab' between tabs 1 > and 3, but tabbing to tab2 results in the error... > > Does anybody have an idea? > Best regards, > Bart > > > -- > 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 Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 |
Free forum by Nabble | Edit this page |