struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Menke" ...@basebeans.com>
Subject OptionsCollection and default value
Date Sun, 22 Dec 2002 20:01:42 GMT
I have searched the archives and can't find a direct answer to this:

I am using html:optionsCollection within an  html:select tag.

My form bean has a method getTaskCodeTypeOptions that returns a collection
of beans with name and value properties

and my JSP is coded as follows:

<html:select property="taskCodeType"><html:optionsCollection
property="taskCodeTypeOptions"  /></html:select>


MY JSP WILL RUN AND POPULATE THE SELECT TAG CORRECTLY, BUT IT DOESN'T CHOOSE
THE CORRECT INITIAL VALUE.

IE. THE "SELECTED" property is not set correctly.


Does anybody have this working?

-jm


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message