You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Brindamour, Michael" <mb...@enterasys.com> on 2007/03/13 20:25:17 UTC

SelectOneRadio question

 
Hello,

I'm trying to create an interface similar to what is displayed in the
attached image.

In the event it doesn't go through, it should be a series of radio
buttons (i.e. a selectOneRadio list) but after each radio button there
may be other components, such as a text entry field or a datepicker
field, that will be enabled if the associated radio button is enabled,
and vice-versa.  

Thus far, in playing around, I haven't even been able to get the layout
of this to work correctly, nevermind the enable/disable state.  Does
anyone have any ideas if/how this could work?

This is a fairly common use of radio buttons in swing & fat client
applications, but getting it to layout correctly in JSF is proving
difficult.  Any help would be much appreciated!  Thank you!

	Mike


--
Michael Brindamour
NetSight Engineering, Enterasys Networks, Inc.
Office: (978) 684-1332
Fax: (call above before faxing) (978) 684-1691
Cell: (603) 682-0014
Email: mbrindam@enterasys.com

Re: SelectOneRadio question

Posted by Mike Kienenberger <mk...@gmail.com>.
I'm guessing you're eventually going to want something like this:

<t:radio
    for="searchTypeSelector"
    index="#{searchFeesPage.searchTypeSelectorPaid}"
    onclick="searchPaidSelected()" />

The problem is that onclick isn't supported yet for t:radio.   It was
a one-line hack to tomahawk to enable this for facelets, but I never
committed the change back to MyFaces (I didn't want to go through the
hassle of creating a jsp tag handler, tld, etc.   Also, the "fix" is
n't well-designed.)

http://mail-archives.apache.org/mod_mbox/myfaces-users/200609.mbox/%3C8f985b960609250902x2c7ef279xe1c677fe136cad05@mail.gmail.com%3E

If you open a Tomahawk issue, I'll try to get around to committing at
least the facelet support the next time I have the Tomahawk source
checked out -- hopefully in the next couple of weeks.


On 3/14/07, Brindamour, Michael <mb...@enterasys.com> wrote:
> Perfect!  Thank you Simon!  I feel like this feature could be called out
> more in the tomahawk examples.  It's nestled in the selectbox example -
> which, while it makes sense I guess, isn't where I thought to look.  I
> only found it with a grep of the code.  Perhaps a more radio specific
> example could be made for this?
>
> In any event, now I know... Thank you very much!
>
>
> --
> Michael Brindamour
> NetSight Engineering, Enterasys Networks, Inc.
> Office: (978) 684-1332
> Fax: (call above before faxing) (978) 684-1691
> Cell: (603) 682-0014
> Email: mbrindam@enterasys.com
>
> -----Original Message-----
> From: Simon Kitching [mailto:simon.kitching@rhe.co.nz]
> Sent: Tuesday, March 13, 2007 4:10 PM
> To: MyFaces Discussion
> Subject: Re: SelectOneRadio question
>
> Brindamour, Michael wrote:>
> > I'm trying to create an interface similar to what is displayed in the
> > attached image.
> >
> > In the event it doesn't go through, it should be a series of radio
> > buttons (i.e. a selectOneRadio list) but after each radio button there
>
> > may be other components, such as a text entry field or a datepicker
> > field, that will be enabled if the associated radio button is enabled,
>
> > and vice-versa.
> >
> > Thus far, in playing around, I haven't even been able to get the
> > layout of this to work correctly, nevermind the enable/disable state.
>
> > Does anyone have any ideas if/how this could work?
> >
> > This is a fairly common use of radio buttons in swing & fat client
> > applications, but getting it to layout correctly in JSF is proving
> > difficult.  Any help would be much appreciated!  Thank you!
> >
>
> Try [t:selectOneRadio layout="spread" .../] together with [t:radio].
>

RE: SelectOneRadio question

Posted by "Brindamour, Michael" <mb...@enterasys.com>.
Perfect!  Thank you Simon!  I feel like this feature could be called out
more in the tomahawk examples.  It's nestled in the selectbox example -
which, while it makes sense I guess, isn't where I thought to look.  I
only found it with a grep of the code.  Perhaps a more radio specific
example could be made for this?

In any event, now I know... Thank you very much! 


--
Michael Brindamour
NetSight Engineering, Enterasys Networks, Inc.
Office: (978) 684-1332
Fax: (call above before faxing) (978) 684-1691
Cell: (603) 682-0014
Email: mbrindam@enterasys.com

-----Original Message-----
From: Simon Kitching [mailto:simon.kitching@rhe.co.nz] 
Sent: Tuesday, March 13, 2007 4:10 PM
To: MyFaces Discussion
Subject: Re: SelectOneRadio question

Brindamour, Michael wrote:>
> I'm trying to create an interface similar to what is displayed in the 
> attached image.
> 
> In the event it doesn't go through, it should be a series of radio 
> buttons (i.e. a selectOneRadio list) but after each radio button there

> may be other components, such as a text entry field or a datepicker 
> field, that will be enabled if the associated radio button is enabled,

> and vice-versa.
> 
> Thus far, in playing around, I haven't even been able to get the 
> layout of this to work correctly, nevermind the enable/disable state.

> Does anyone have any ideas if/how this could work?
> 
> This is a fairly common use of radio buttons in swing & fat client 
> applications, but getting it to layout correctly in JSF is proving 
> difficult.  Any help would be much appreciated!  Thank you!
> 

Try [t:selectOneRadio layout="spread" .../] together with [t:radio].

Re: SelectOneRadio question

Posted by Simon Kitching <si...@rhe.co.nz>.
Brindamour, Michael wrote:>
> I'm trying to create an interface similar to what is displayed in the
> attached image.
> 
> In the event it doesn't go through, it should be a series of radio
> buttons (i.e. a selectOneRadio list) but after each radio button there
> may be other components, such as a text entry field or a datepicker
> field, that will be enabled if the associated radio button is enabled,
> and vice-versa.  
> 
> Thus far, in playing around, I haven't even been able to get the layout
> of this to work correctly, nevermind the enable/disable state.  Does
> anyone have any ideas if/how this could work?
> 
> This is a fairly common use of radio buttons in swing & fat client
> applications, but getting it to layout correctly in JSF is proving
> difficult.  Any help would be much appreciated!  Thank you!
> 

Try [t:selectOneRadio layout="spread" .../] together with [t:radio].