struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Heather Buch <hb...@MIT.EDU>
Subject Re: html:options question
Date Mon, 06 Jan 2003 19:45:13 GMT
I did something similar, with optionsCollection (which I like).

Here is my code:

<logic:select multiple="true" size="10" property="addchosencourseids">
  <logic:optionsCollection property="availablecourselabels" 
label="availablecourseconcatenated" value="availablecourseinstanceid"/>

for optionsCollection, my "property" is the name of my bean, and I think 
you have to pluralize it (example availablecourselabel --> 
availablecourselabels) to indicate that it's a collection. The "label" 
and "value" attributes just
refer to properties of my AvailableCourseLabel bean (get 
availableCourseconcatenated, and getAvailablecourseinstanceid). I hope 
this helps  a little.


Heather Buch

Gus Delgado wrote:

> I populate an html:option tag with a collection. I use the html:option 
> to create a new user in my system and to edit a user in my system.
> <html:select name="editUserForm" property="accessType">
>       <html:options collection="accessTypeList" property="value" 
> labelProperty="label"/>
> </html:select>
> When doing an edit I want the html:option to be shown with the current 
> accessType of the user I'm editing.
> Example. the options are "Read-only", "Admin", and "Analyst" that's 
> the order of the collection, when I edit a user that is Admin, I want 
> the drop-down to show with the "Admin" being selected,
> How can I accomplish this. Thanks in advanced.
> -- 
> To unsubscribe, e-mail:   
> <>
> For additional commands, e-mail: 
> <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message