I figured out what the problem was.
Struts auto sets the default value in an html:select to whatever the
property is in the form bean. Someone said this earlier (thank you).
My problem was, I was getting this value from the database. Our database is
oracle and the fields in question were of type char[x]. These are fixed
length fields that are padded with spaces on a result set! So a state of
"GA" is not equal to "GA "!!
Thanks for everyone's help on this. This was not a struts issue (usually
isn't).
thanks,
Mike

----- Original Message -----
From: "Eddie Bush" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, September 19, 2002 9:43 AM
Subject: Re: AAAARGH! SOMEONE! How do I set the default selection when I'm
using html:options?


> Yeah, actually this might be your best approach.  Mine would depend on
> Struts.  This approach would be totally independent of Struts.  If
> you're (wasn't it spec 2.3 that brought us these listeners?) on an older
> spec, using the plugin may well be the way to go though.
>
> Robert Taylor wrote:
>
> >javax.servlet.ServletContextListener @since Servlet2.2 spec acts a
> >bootstrap.
> >Prior to Servlet2.2 spec, try a bootstrap  servlet.
> >
> >A quick scan of the mailing list archives and .....
> >http://www.mail-archive.com/[email protected]/msg38242.html
> >
> >should help.
> >
> >robert
> >
>
> --
> Eddie Bush
>
>
>
>
> --
> 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