You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sony Thomas <so...@genialgenetics.com> on 2006/01/03 14:16:42 UTC

using drop down menu in struts

Hello Friends,

"Happy NewYear to all"

I have a problem in displaying a set of languages in a dropdown menu in 
my struts application.

Problem::

I have to display some four langauges in a drop down menu. Name : 
English Code: en; Name: Portughese Code:pt; Name: French Code: fr

I am setting these values to my Langauage bean and in my UserAddForm I 
am adding the language bean to the arrayList. UserAddForm is the form in 
the scope in JSP.

In my Language bean I have two properties private String name and 
private String code.

How can I display these values in jsp using select and html options.??

can anyone help me by sending some code examples, please

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: using drop down menu in struts

Posted by Ted Husted <te...@gmail.com>.
I don't have a code sample handy right now, but, as compared to
creating any other dropdown, you would need to build the list of
languages by accessing the Message Resources from the Action class, so
as to build the list appropriate to the current language.

-- HTH, Ted.
http://www.husted.com/poe/

On 1/3/06, Sony Thomas <so...@genialgenetics.com> wrote:
> Hello Friends,
>
> "Happy NewYear to all"
>
> I have a problem in displaying a set of languages in a dropdown menu in
> my struts application.
>
> Problem::
>
> I have to display some four langauges in a drop down menu. Name :
> English Code: en; Name: Portughese Code:pt; Name: French Code: fr
>
> I am setting these values to my Langauage bean and in my UserAddForm I
> am adding the language bean to the arrayList. UserAddForm is the form in
> the scope in JSP.
>
> In my Language bean I have two properties private String name and
> private String code.
>
> How can I display these values in jsp using select and html options.??
>
> can anyone help me by sending some code examples, please

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org