Which you can also use for validation, for example the value of "Select a
State" could be "" or "XX" or something.  Then you can check to see if they
selected a state without having to worry about going through all 50 states
checking to see if there was a match.

John


> -----Original Message-----
> From: Noel J. Bergman [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 03, 2003 3:08 PM
> To: Tomcat Users List
> Subject: RE: Easy question - Java Beans
> 
> 
> Denise,
> 
> > How would your original select look for the states?
> 
> Not sure what you are asking, but I'll take a stab, and you 
> can come back
> and correct me.
> 
> The "NY" is all you need to keep in the bean.  I assume that 
> somewhere you
> have a loop that emits the <option> tags.  When the value you 
> are about to
> emit for the value attribute is equal to getState(), then you add the
> "selected" attribute to that tag.  For the initial request, 
> when there is no
> such value, nothing would be selected, so the first entry at 
> the top could
> be something like "Select a State".
> 
>       --- Noel
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

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

Reply via email to