Hi everybody,
I need to generate some cascading select1. I tried this approach: http://en.wikibooks.org/wiki/XForms/Dynamic_Selection_Lists The problem is that this doesn't work like it should if it is inside a xforms:repeat, cause it lists the sum of all selected options (of every node). The problem is in this line: <xf:itemset nodeset="instance('months')/item[@season=instance('selected-values')/selected-season]">I can't specify a relative path to selected-season in the xpath condition in order to reference the actual node. Any ideas? Thanks in advance! Regards, German -- 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
|
German,
Try this version: http://pastie.org/580959 The bottom line is that you must make the paths relative, and that using context() can help. You could also use xxforms:variable withing the outer repeat to hold a pointer to the current iteration. -Erik On Mon, Aug 10, 2009 at 10:40 AM, Ger G<[hidden email]> wrote: > Hi everybody, > I need to generate some cascading select1. I tried this approach: > http://en.wikibooks.org/wiki/XForms/Dynamic_Selection_Lists > > The problem is that this doesn't work like it should if it is inside a > xforms:repeat, cause it lists the sum of all selected options (of every > node). > The problem is in this line: > > <xf:itemset > nodeset="instance('months')/item[@season=instance('selected-values')/selected-season]"> > > > I can't specify a relative path to selected-season in the xpath condition in > order to reference the actual node. > > Any ideas? Thanks in advance! > > Regards, > German > > > -- > 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 > > -- 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 |
Thanks Erik! it worked great! context() just solved the problem!
Regards, German On Wed, Aug 12, 2009 at 3:37 AM, Erik Bruchez <[hidden email]> wrote: German, -- 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
|
German,
Great! BTW, you might also want to have a look at the <fr:data-bound-select1> component which makes it easier to create cascading select1. We don't have any documentation for this yet, but you can have a look at this example: http://pastie.org/583352 Alex |
Thanks Alex!!
On Thu, Aug 13, 2009 at 7:41 PM, Alessandro Vernet <[hidden email]> wrote:
-- 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 |