File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes doubleselct in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "doubleselct in struts" Watch "doubleselct in struts" New topic
Author

doubleselct in struts

dips pandey
Greenhorn

Joined: Nov 13, 2010
Posts: 4
the example given
<s:doubleselect label="doubleselect test1" name="menu" list="{'fruit','other'}" doubleName="dishes" doubleList="top == 'fruit' ? {'apple', 'orange'} : {'monkey', 'chicken'}" />

has only two values in the first list that is fruit and other what if i have 10 items in the first list how should i write the
doubleList="top == 'fruit' ? {'apple', 'orange'} : {'monkey', 'chicken'}" />
part for that example..

and if a value is selected from the second list another combo box or a text box should be displayed according to the value selected.
PLEASE HELP..
Rajkumar Kathiresan
Greenhorn

Joined: Dec 30, 2008
Posts: 8
You need to construct your logic based on ternary operator. It will be more complicated when the first list size increase. Still I provide a solution for your problem.



but the other way to use the doubleselect (its called OGNL method)

But very simple way is


Create a optionMap as a LinkedHashMap (because it have sorted order) in your action and use it.


Hope its solve your problem. Let me know if you need any clarification.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doubleselct in struts
 
Similar Threads
Generics <?>
Strut2 + doubleselect Tag
Generics
doubleselct in struts
Collections and Generics