Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dropdowns within iterator in struts2

 
Swathi Ram
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic