You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ga...@verizon.com on 2002/01/30 16:58:24 UTC

Prepopulate radio button

How can I prepopulate the radio buttons with the value coming from database
and also be able to reselect  a different value when I am submitting the
form again.

My scenario is I have a save task where I save the value selected for radio
button to the database. I come back again and retrieve this value from
database and need to prepopulate it on the form . Then I can also change
the value of radio button and resubmit the form.



Thanks,

Verizon e-biz
Gang Gao


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Prepopulate radio button

Posted by Pete Carapetyan <pe...@datafundamentals.com>.
gang.gao@verizon.com wrote:

> How can I prepopulate the radio buttons with the value coming from database
> and also be able to reselect  a different value when I am submitting the
> form again.

Most of the time I try to just sit and watch as everyone asks these very specific
questions with very specific answers. Good thing in every way, of course.

But every once in a couple of weeks it seems reasonable to let people know they
have an option, such as Expresso, (there are probably others) that encapsulate so
much of this functionality for them, within a working framework. You still get
all the flexibility, all the source code, you just don't have to do everything
from scratch.

Like any framework, it has it's benefits, drawbacks, politics etc. But a small
and friendly group, and a solid code base. You might actually be surprised if you
haven't seen it yet.

And my own tool webAppWriter which will generate your basic GUIs and controllers
for you, 33 working samples on my site you can download etc.

Which isn't to say that reinventing everything your own way isn't better, because
it probably is. Just an option to know about.

Expresso at jcorporate.com
webAppWriter at webAppWriter.com

We are ALWAYS looking out for new contributors/users to add to our mix.

> My scenario is I have a save task where I save the value selected for radio
> button to the database. I come back again and retrieve this value from
> database and need to prepopulate it on the form . Then I can also change
> the value of radio button and resubmit the form.
>
> Thanks,
>
> Verizon e-biz
> Gang Gao
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
Pete Carapetyan
http://datafundamentals.com
Java Development Services

Open standards technology for commercial profitability



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>