Hello,
I attached file with example that it can be run by sandbox. I have xforms:repeat, inside there is xforms:select1 with xforms:itemset. I try to select 'recrSecPartNo' which is in the same level as 'category' (within the same 'fellows' index) but I get alwyas value from 'fellows[1]/recrSecPartNo' not form 'fellows[current index in repeat loop]/recrSecPartNo' <xforms:repeat nodeset="instance('proposal-instance')/fellows" id="repeat"> <xforms:select1 ref="category" xxforms:refresh-items="false"> <xforms:itemset model="specific-model" nodeset="for $i in number(xxforms:context ('repeat')/recrSecPartNo <<!!! this always return 'fellows' node with index 1>> ) return xxforms:instance('researcher-categories-instance')/category[$i]"> <xforms:label ref="description"/> <xforms:value ref="abbreviation"/> </xforms:itemset> </xforms:select1> </xforms:repeat> I can't use variable in repeat loop beacuse this piece of code is included in html file as xml. Best regards grzegorzselect.xhtmlselect.xhtml |
Administrator
|
The issue is the presence of xxforms:refresh-items="false": this
assumes the itemset will not change within the repeat, so once the first one is computed, the following ones use the same itemset. The solution is simply not to use this attribute. -Erik On Sep 19, 2008, at 5:46 AM, ggrzegorz wrote: > > Hello, > > I attached file with example that it can be run by sandbox. > > > I have xforms:repeat, inside there is xforms:select1 with > xforms:itemset. I > try to select 'recrSecPartNo' which is in the same level as > 'category' > (within the same 'fellows' index) but I get alwyas value from > 'fellows[1]/recrSecPartNo' not form 'fellows[current index in repeat > loop]/recrSecPartNo' > > <xforms:repeat nodeset="instance('proposal-instance')/fellows" > id="repeat"> > <xforms:select1 ref="category" xxforms:refresh-items="false"> > <xforms:itemset model="specific-model" nodeset="for $i in > number(xxforms:context ('repeat')/recrSecPartNo <<!!! this > always > return 'fellows' node with index 1>> ) return > xxforms:instance('researcher-categories-instance')/category[$i]"> > <xforms:label ref="description"/> > <xforms:value ref="abbreviation"/> > </xforms:itemset> > </xforms:select1> > </xforms:repeat> > > I can't use variable in repeat loop beacuse this piece of code is > included > in html file as xml. > > Best regards grzegorz http://www.nabble.com/file/p19571717/ > select.xhtml > select.xhtml http://www.nabble.com/file/p19571717/select.xhtml > select.xhtml > -- > View this message in context: http://www.nabble.com/xforms%3Arepeat%2C-problem-with-getting-..-%3Cnode%3E-form-inside-itemset-in-select1-tp19571717p19571717.html > Sent from the ObjectWeb OPS - Users mailing list archive at > Nabble.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 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 |