I have 2 JSP pages each with a dates drop down combo box whose contents are the same. However, on the first page the user can set a default date that s/he can use throughout the application.
So on the second JSP page in the drop down combo box, I'd like to set the selected default date (from the first page) as the first/selected value in the drop down but at the same time the user should be able to select a different date from the list.
Place this default date into the ActionForm before entering the jsp. You probably need to use a SetupAction for this. The other option would be to set the default value into the date field within the ActionForm's reset method.
When this value is in the ActionForm Struts will automatically select the corresponding value(s) in the jsp.
A good workman is known by his tools.
Your buns are mine! But you can have this tiny ad: