using xforms:toggle with a stored toggled ID

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

using xforms:toggle with a stored toggled ID

FParsons
I found that this doesn't work:

<xforms:toggle case="instance('ui-instance')/toggle-id" />

it produces the Orbeon error "Target id must be static id"

Is there another way to do this, or is it not possible?
-- Francis
Reply | Threaded
Open this post in threaded view
|

Re: using xforms:toggle with a stored toggled ID

Erik Bruchez
Administrator
Using an AVT (also known as "curly brackets"):

<xforms:toggle case="{instance('ui-instance')/toggle-id}" />

-Erik

On Wed, Jun 16, 2010 at 5:55 AM, FParsons <[hidden email]> wrote:

>
> I found that this doesn't work:
>
> <xforms:toggle case="instance('ui-instance')/toggle-id" />
>
> it produces the Orbeon error "Target id must be static id"
>
> Is there another way to do this, or is it not possible?
>
>
> -----
> -- Francis
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/using-xforms-toggle-with-a-stored-toggled-ID-tp2257297p2257297.html
> Sent from the Orbeon Forms (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
Reply | Threaded
Open this post in threaded view
|

Re: using xforms:toggle with a stored toggled ID

FParsons
Erik - of course! Don't know why that didn't occur to me! Thanks!
-- Francis
Reply | Threaded
Open this post in threaded view
|

Re: using xforms:toggle with a stored toggled ID

FParsons
Oh, now I remember why I didn't use AVT's - I wanted to toggle more than two cases, so if()then''else'' wouldn't be sufficient.

By any chance, is there a way in xpath 2.0 to simulate a "select case..." statement?

What I ended up doing was just using a number of <xforms:toggle if=(condition)> elements, but I'm still curious if there's a way to do this with Xpath.
-- Francis
Reply | Threaded
Open this post in threaded view
|

Re: Re: using xforms:toggle with a stored toggled ID

Erik Bruchez
Administrator
You could iterate with something like:

<xforms:action xxforms:iterate="1 to 10"
  <xforms:toggle .../>

-Erik

On Sat, Jun 19, 2010 at 6:31 PM, FParsons <[hidden email]> wrote:

Oh, now I remember why I didn't use AVT's - I wanted to toggle more than two
cases, so if()then''else'' wouldn't be sufficient.

By any chance, is there a way in xpath 2.0 to simulate a "select case..."
statement?

What I ended up doing was just using a number of <xforms:toggle
if=(condition)> elements, but I'm still curious if there's a way to do this
with Xpath.

-----
-- Francis
--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/using-xforms-toggle-with-a-stored-toggled-ID-tp2257297p2261506.html
Sent from the Orbeon Forms (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