You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by le...@gmail.com on 2011/02/23 18:52:34 UTC
Radio Button Event ??
Hi everyone,
I am having a problem with a page that has two Radio buttons, a Select and a
TextInput.
I need the Select or the TextInput to be disabled depending on the Radio
that has been clicked.
What is the best way to do it?
I do not find an event dispatched by the Radio allowing me to update the
"disabled" property of the select and textInput from my java code.
Thanks in advance!
Leandro
Re: Radio Button Event ??
Posted by le...@gmail.com.
First of all , thank you for your answers.
I thought that taking an action over other components when the radio is
clicked was a so common problem that a mixin or a similar component had been
already deveolped.
Well, i will do it using pure javascript.
If anyone has another idea, please write to me!
Good Luck!
Leandro
2011/2/23 Josh Canfield <jo...@gmail.com>
> > I do not find an event dispatched by the Radio allowing me to update the
> > "disabled" property of the select and textInput from my java code.
>
> Why do you need an event? Use the value bound to the radio button as
> the value of the disabled parameter.
>
> If you want to dynamically change the form the you need to fall back
> to good ol' javascript. Try observing onchange on the radio button.
>
> Josh
>
> On Wed, Feb 23, 2011 at 9:52 AM, <le...@gmail.com> wrote:
> > Hi everyone,
> > I am having a problem with a page that has two Radio buttons, a Select
> and a
> > TextInput.
> > I need the Select or the TextInput to be disabled depending on the Radio
> > that has been clicked.
> > What is the best way to do it?
> > I do not find an event dispatched by the Radio allowing me to update the
> > "disabled" property of the select and textInput from my java code.
> >
> > Thanks in advance!
> > Leandro
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: Radio Button Event ??
Posted by Josh Canfield <jo...@gmail.com>.
> I do not find an event dispatched by the Radio allowing me to update the
> "disabled" property of the select and textInput from my java code.
Why do you need an event? Use the value bound to the radio button as
the value of the disabled parameter.
If you want to dynamically change the form the you need to fall back
to good ol' javascript. Try observing onchange on the radio button.
Josh
On Wed, Feb 23, 2011 at 9:52 AM, <le...@gmail.com> wrote:
> Hi everyone,
> I am having a problem with a page that has two Radio buttons, a Select and a
> TextInput.
> I need the Select or the TextInput to be disabled depending on the Radio
> that has been clicked.
> What is the best way to do it?
> I do not find an event dispatched by the Radio allowing me to update the
> "disabled" property of the select and textInput from my java code.
>
> Thanks in advance!
> Leandro
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Radio Button Event ??
Posted by LLTYK <LL...@mailinator.com>.
I'd do it in more or less pure javascript, since you will have to add a
javascript listener to the radio button either way (either to trigger an
event java side or to directly add/remove the disabled attribute from the
fields).
--
View this message in context: http://tapestry-users.832.n2.nabble.com/Radio-Button-Event-tp6057240p6057292.html
Sent from the Tapestry Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org