I have one select like this...

--My Action mapping ----

   <action path="/assign/view" parameter="VIEW_PAGE"
type="ca.awcl.assignments.AssignmentAction"  scope="request"
name="AssignForm" validate="false">
    <exception key="error.required" type="ca.awcl.AppException"
path="assign.error.page" />
    <forward name="success"  path="assign.view"/>
    </action>

---end- action mapping--->

--AssignForm--------

AssignForm has property called priorityId.  and it has getPriorityId() and
setgetPriorityId(..)

private int priorityId;
....
getPriorityId()
setgetPriorityId(..)
--------------------end assign form------->

and I have another List called assign_priority on the application scope.
which holds instances of class like this.

My class {

int id;
String value;

getId()
setId(..)
getValue()
setValue(..)

}
------------------------------>
------------------------On my jsp---

 <html:select property="priorityId">
         <html:options collection="assign_priority" property="id"
                    labelProperty="value"/>
       </html:select>
------------------------------------->

.anil

Peng Tuck Kwok wrote:

> I've been able to display a collection of beans using the <html:select>
> tag in conjunction with with the <html:optionsCollection> tag but I am
> stuck with a problem. I get complains from struts that it has a type
> mismatch when it tries to set my attribute for the <html:select> field.
>
> I have public ArrayList getSelection() and public void
> setSelection(ArrayList input) . It seems the problem is at setSelection.
> Does anyone know how to make this work?  I'm a little confused by this
> and I'm sorry if it doesn't make sense in the first read. THanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to