Events - I just don't get it

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

Events - I just don't get it

danc-3
I have been wrestling with what is probably simple to resolve.

For the last several hours, I have been trying to set the STYLE property on a DIV based on what a user selects from a SELECT1.

In other words, I have a SELECT1 with a YES/NO.  I have a DIV the wraps a number of controls.  I want to hide or display the controls in the DIV based on the value selected in the SELECT1 (YES or NO).  If the user selects YES, the DIV's DISPLAY style needs to be turned on.

I am using version 3.0 beta 3.  I have tried all sorts of stuff, but due to my ingnorance (I new to XForms), I haven't been able to resolve this.

Can anyone help?



--
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: Events - I just don't get it

Erik Bruchez
Administrator
[hidden email] wrote:

 > I have been wrestling with what is probably simple to resolve.
 >
 > For the last several hours, I have been trying to set the STYLE
 > property on a DIV based on what a user selects from a SELECT1.

I don't think you can do that. Nothing in XForms allows you to change
attributes of the host language. However, you could switch between
different DIV contained within different xforms:case, or you can
conditionally output HTML with xforms:output.

 > In other words, I have a SELECT1 with a YES/NO.  I have a DIV the
 > wraps a number of controls.  I want to hide or display the controls
 > in the DIV based on the value selected in the SELECT1 (YES or NO).
 > If the user selects YES, the DIV's DISPLAY style needs to be turned
 > on.
 >
 > I am using version 3.0 beta 3.  I have tried all sorts of stuff, but
 > due to my ingnorance (I new to XForms), I haven't been able to
 > resolve this.
 >
 > Can anyone help?

See the two examples attached:

   o group-relevant-trigger.xhtml
   o group-relevant-switch.xhtml

They are both available in the OPS examples/xforms directory. The
former has been there for a while, and I just added the latter.

BTW if I remember correctly, some bugs related to the display of
xforms:group have been fixed since beta 3. You may want to try nightly
builds from time to time, or try the online XForms Sandbox (which is
usually not as up to date as automatic builds but it is more up to
date than beta 3).

-Erik



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

group-relevant-trigger.xhtml (2K) Download Attachment
group-relevant-select.xhtml (3K) Download Attachment