W3C home > Mailing lists > Public > www-forms@w3.org > July 2009

Re: toggle element for select1's item ?

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Sat, 25 Jul 2009 16:51:51 -0700
Message-ID: <e81b48eb0907251651s289626e2j66014196654f8727@mail.gmail.com>
To: www-forms@w3.org
Lucas,

Here is a simple solution:

http://pastie.org/559039

Note that it requires support for the XForms 1.1 nested case element,
or support for AVTs on the case attribute.

-Erik

On Tue, Jul 21, 2009 at 2:31 PM, Swithun
Crowe<swithun@swithun.servebeer.com> wrote:
> Hello
>
> LJG Hi, I was wondering if there is an effective way of replacing a set of
> LJG triggers (which toggles a switch) with a select1 element?
>
> You could have a series of xf:group elements instead of xf:case elements.
> Each xf:group is bound to the same node that the select1 is, but each
> specifies that the node has a different value. Something like:
>
> <xf:select1 ref="selectNode">
> ...
> </xf:select1>
>
> <xf:group ref="selectNode[.='val1']">
> ...
> </xf:group>
>
> <xf:group ref="selectNode[.='val2']">
> ...
> </xf:group>
>
> Only one (or none) can be relevant at the same time, so this can be used
> to hide the others.
>
> I hope this gives you some ideas.
>
> Swithun.
>
>
Received on Saturday, 25 July 2009 23:52:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:16 GMT