From: "Pablo Wawrzyniak" <[EMAIL PROTECTED]>
How can I do that a combobox is selected after reload the jsp page?
I have to fill combobox with a countries list, but if I not load it into
the session then not appears the combobox filled.
The other problem is that the combobox must be selected when the page is
reloaded.
I solved it by setting in struts-config the form scope value to session.
Is there any way of not have a collection and the form scope to level of
session?
What is your objection to session scope? That's the easiest way to fix the
problem of the form 'forgetting' its values.
<html:select property="idCountry">
<html:options collection="countries" property="idCountry"
labelProperty="description">
</html:select>
A list of countries might be appropriate for context scope rather than
session. Will this list be the same for all users? If so, adding a
ServletContextListener to place the collection of countries in context scope
when the application starts might be a good solution.
http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContextListener.html
--
Wendy Smoak
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]