Cascading selections inside xforms:repeat

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Cascading selections inside xforms:repeat

Ger G
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
Reply | Threaded
Open this post in threaded view
|

Re: Cascading selections inside xforms:repeat

Erik Bruchez
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Cascading selections inside xforms:repeat

Ger G
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,

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




--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Cascading selections inside xforms:repeat

Alessandro Vernet
Administrator
German,

Ger G wrote
Thanks Erik! it worked great! context() just solved the problem!
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Cascading selections inside xforms:repeat

Ger G
Thanks Alex!!

On Thu, Aug 13, 2009 at 7:41 PM, Alessandro Vernet <[hidden email]> wrote:

German,


Ger G wrote:
>
> Thanks Erik! it worked great! context() just solved the problem!
>

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

-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet
--
View this message in context: http://www.nabble.com/Cascading-selections-inside-xforms%3Arepeat-tp24893541p24961038.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




--
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