RE: Display dropdown list with data from Application Resources ???

2002-08-30 Thread Galbreath, Mark

Read the file into a class, parse the key/values and stick them in a
Properties object.  Define the object as a page-scoped bean and assign
whatever values you want to an option tag.

Mark

-Original Message-
From: Struts Rodolphe [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 30, 2002 8:57 AM
To: [EMAIL PROTECTED]
Subject: Display dropdown list with data from Application Resources ???



Does anyone know of an elegant solution to display a drop downlist with
default data from Application Resources file? Specifically, I want to
display all the days in a week.  It'd be nice if we can specify in Resources
properties file as followed: weekday.0= Sunday weekday.1=MondayThen use
bean:messge key  inside the html: select.  Currently I have it a
collection of beans stored in application context, then use html:options
within html:select, which is not a good idea.

Thanks for any inputs.



-
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Display dropdown list with data from Application Resources ???

2002-08-30 Thread Joe Latty

html:select property=dayOfWeek
html:option key=label.sunday value=0/
html:option key=label.monday value=1/
html:option key=label.tuesday value=2/
html:option key=label.wednesday value=3/
html:option key=label.thursday value=4/
html:option key=label.friday value=5/
html:option key=label.saturday value=6/
/html:select

in your Applications Resource file

label.sunday=Sunday etc.


-Original Message-
From: Struts Rodolphe [mailto:[EMAIL PROTECTED]]
Sent: Friday, 30 August 2002 10:57 PM
To: [EMAIL PROTECTED]
Subject: Display dropdown list with data from Application Resources ???



Does anyone know of an elegant solution to display a drop downlist with
default data from Application Resources file? Specifically, I want to
display all the days in a week.  It'd be nice if we can specify in Resources
properties file as followed: weekday.0= Sunday weekday.1=MondayThen use
bean:messge key  inside the html: select.  Currently I have it a
collection of beans stored in application context, then use html:options
within html:select, which is not a good idea.

Thanks for any inputs.



-
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Display dropdown list with data from Application Resources ???

2002-08-30 Thread Struts Rodolphe


Yeah. Thanks. The problem with this approach which I also thought of,  is that we have 
to list ALL of them, which I try to avoid to do.
 Joe Latty wrote:









in your Applications Resource file

label.sunday=Sunday etc.


-Original Message-
From: Struts Rodolphe [mailto:[EMAIL PROTECTED]]
Sent: Friday, 30 August 2002 10:57 PM
To: [EMAIL PROTECTED]
Subject: Display dropdown list with data from Application Resources ???



Does anyone know of an elegant solution to display a drop downlist with
default data from Application Resources file? Specifically, I want to
display all the days in a week. It'd be nice if we can specify in Resources
properties file as followed: weekday.0= Sunday weekday.1=MondayThen use
inside the . Currently I have it a
collection of beans stored in application context, then use 
within , which is not a good idea.

Thanks for any inputs.



-
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



-
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes