If you are trying to make a cascading drop down, you can do so with the
doubleselect tag.
One way to implement:
Create a class, CascDropDown, with getters and setters for value, label and
subList.
subList is a List of objects, DropDown, with getters and setters for value
and label.
If you have values A, B in the first dropdown and want to show 1, 2, 3 when
A is selected and 10, 11, 12 if B is selected:
Create List of DropDown objects from above with value/labels of 1, 2 and 3 -
then add the List to the CascDropDown object and set the value/label to "A".
Do the same with 10, 11, 12 as the subList and the value/label set to "B"
Add those two CascDropDown objects to a list, called myCascDropDown, and put
a getter in your action.
<s:doubleselect name="formAttrib0" doubleName="forAttrib1"
list=" myCascDropDown" doubleList="subList"
listKey="value" doubleListKey="value"
listValue="label" doubleListValue="label"/>
When you select "A" - "1", "2" and "3" should appear in the second dropdown.
-----Original Message-----
From: Jim Collings [mailto:[email protected]]
Sent: Wednesday, July 01, 2009 10:34 AM
To: Struts Users Mailing List
Subject: Re: Multiselect tags
So I tried setting key='selectedList'
This did not work. I got a null selectedList and:
ognl.ExpressionSyntaxException: Malformed OGNL expression:
[ognl.ParseException: Encountered "<EOF>" at line 1, column 0.
Was expecting one of:
.
.
.
etc.
> How? If I set the tag to a list of objects specified in my action,
> how do I set the second list of objects? Will they be Strings or if I
> set my select tag to key off of 'recordId' which is an integer, will
> it be a list of integers?
>
> I would like to request documentation for the select tag be updated to
> reflect a simple example.
---------------------------------------------------------------------
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]