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 dropdowns within iterator in struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "dropdowns within iterator in struts2" Watch "dropdowns within iterator in struts2" New topic
Author

dropdowns within iterator in struts2

Swathi Ram
Greenhorn

Joined: Sep 18, 2007
Posts: 27
I have an iterator that displays 2 dropdowns that gets diaplayed according to the iterator value.
The second dropdown is driven by the first. So based on the value selected in the first, the second should be displayed.

<s:select name="jobList[%{#rowstatus.index}].classification" list="classifications" onchange="JavaScript:submitFormClass(%{#rowstatus.index})" />

<s:select name="jobList[%{#rowstatus.index}].speciality" list="jobList[%{#rowstatus.index}].specialities" />

jobList.specialities is a Map.

But this gives me an error saying :
Servlet.service() for servlet jsp threw exception
tag 'select', field 'list', name 'jobList[0].speciality': The requested list key 'jobList[%{#rowstatus.index}].specialities' could not be resolved as a collection/array/map/enumeration/iterator type.


It is printing it in the action class but not in the jsp.
Can anyone help please......

Thanks
Swathika.
Swathi Ram
Greenhorn

Joined: Sep 18, 2007
Posts: 27
Has anyone got any input on this. Is is OK to give a Map() within an object and having an array of objects and iterating through them??
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: dropdowns within iterator in struts2