*
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
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??
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dropdowns within iterator in struts2
 
Similar Threads
Struts 2 - conditional check of IteratorStatus inside an s:if tag
Struts2: Retern all the values inside the list in my Action
Problem with select tag
Null value is coming
Null pointer setting values to an object list