Toggling with a select1

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

Toggling with a select1

mjgraham
Hi,

I was wondering whether it is possible to use a select1 to toggle
between cases or can only triggers and input boxes used - e.g.

<xforms:select1 ref="type" appearance="minimal">
  <xforms:item>
    <xforms:label>Normal</xforms:label>
    <xforms:value>normal</xforms:value>
    <xforms:toggle ev:event="DOMActivate" case="normal"/>
  </xforms:item>
  <xforms:item>
    <xforms:label>Enhanced</xforms:label>
    <xforms:value>enhanced</xforms:value>
    <xforms:toggle ev:event="DOMActivate" case="enhanced"/>
  </xforms:item>
 ...
</xforms:select1>
<xforms:switch>
  <xforms:case id="normal" selected="true">
  ...
  </xforms:case>
  <xforms:case id="enhanced">
  ...
  ...
</xforms:switch>

    Cheers,

    Matthew



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Toggling with a select1

Erik Bruchez
Administrator
You should in theory be able to use the xforms-select event instead of
DOMActivate, but we have this bug:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=304019&group_id=168&atid=350207

In the meanwhile, you can do this with relevance and xforms:groups, or
even with xforms:repeat as the attached example shows (although in your
case using groups may be more intuitive).

-Erik

Matthew Graham wrote:

> Hi,
>
> I was wondering whether it is possible to use a select1 to toggle
> between cases or can only triggers and input boxes used - e.g.
>
> <xforms:select1 ref="type" appearance="minimal">
>  <xforms:item>
>    <xforms:label>Normal</xforms:label>
>    <xforms:value>normal</xforms:value>
>    <xforms:toggle ev:event="DOMActivate" case="normal"/>
>  </xforms:item>
>  <xforms:item>
>    <xforms:label>Enhanced</xforms:label>
>    <xforms:value>enhanced</xforms:value>
>    <xforms:toggle ev:event="DOMActivate" case="enhanced"/>
>  </xforms:item>
> ...
> </xforms:select1>
> <xforms:switch>
>  <xforms:case id="normal" selected="true">
>  ...
>  </xforms:case>
>  <xforms:case id="enhanced">
>  ...
>  ...
> </xforms:switch>
>
>    Cheers,
>
>    Matthew


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

select-repeat.xhtml (5K) Download Attachment