struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmk...@earthlink.net (David M. Karr)
Subject Re: OptionsCollection and default value
Date Sun, 22 Dec 2002 20:36:43 GMT
>>>>> "John" == John Menke <jm@basebeans.com> writes:

    John> I have searched the archives and can't find a direct answer to this:
    John> I am using html:optionsCollection within an  html:select tag.

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

    John> and my JSP is coded as follows:

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

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

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

Do you have a getter/setter for the "taskCodeType" property on your bean?

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net   ; SCJP



--
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