Re: preselect dropdown

2004-10-29 Thread Ron Grabowski
> I usually do something like this:
> 
>  
>   
>  


Whoops, "months" belongs to the ActionForm:

 
  
 


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



Re: preselect dropdown

2004-10-29 Thread Ron Grabowski
> The problem is that I have dropdowns for month and day.  I would like
> it if the dropdown for month could be prepolutated with the value the
> user has allready saved before.  So for example it could be
> prepoluted with "February" and the user can select another value from
> the dropdown if he/she wishes to change it.
>  
> Any ideas/hints/code would be helpful,

I usually do something like this:

 
  
 

Where "month" is the selected month and "months" is a LabelValueBean[]
containing Jan, Feb, Mar, etc.

I have my Action class set the form's value for month so it is
pre-selected in the list.

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



RE: preselect dropdown

2004-10-29 Thread Slattery, Tim - BLS
> The problem is that I have dropdowns for month and day.  I 
> would like it if the dropdown for month could be prepolutated 
> with the value the user has allready saved before.  So for 
> example it could be prepoluted with "February" and the user 
> can select another value from the dropdown if he/she wishes 
> to change it.

Struts does that for you. You create a form bean which has read/write
properties corresponding to the fields in your web page. You define those
fields on a JSP page using the Struts  tags. You read data from the
DB, store it in the form bean, and store that form bean in the request
object. The Struts tags 
take the data from the form bean and  put it into the HTML form.

For a dropdown, use 


--
Tim Slattery
[EMAIL PROTECTED]


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



preselect dropdown

2004-10-29 Thread Anna Kerekes
 
 
Hello,
 
I have an edit.jsp where a user can edit message details.  So for example, if a 
message has a start date (day,month, year) these fields can be updated by user.
 
The problem is that I have dropdowns for month and day.  I would like it if the 
dropdown for month could be prepolutated with the value the user has allready saved 
before.  So for example it could be prepoluted with "February" and the user can select 
another value from the dropdown if he/she wishes to change it.
 
Any ideas/hints/code would be helpful,
thanks,
Anna

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