Hello all,
I encountered a strange problem today:
so.detail.jsp:
…
<s:form action="soDetail">
…
<s:select id="price" name="detail.price.id"
key="price" list="prices" listKey="id"
listValue="price"
/>
…
<s:submit name="cancel" key="cancel" />
…
</s:form>
…
The selection box got what I wanted when loading at first.
When I pressed cancel button in so.detail.jsp, the following error occurred:
org.apache.jasper.JasperException: tag 'select', field 'list', name
'detail.price.id': The requested list key 'prices' could not be resolved as
a collection/array/map/enumeration/iterator type. Example: people or
people.{name} - [unknown location]
I traced the code that this error happened before execute() is run.
When I removed the <s:select … /> tag, no error occurred and execute() was
run and lastly result “cancel” was retrieved.
The jsp is ok to be loaded at the first time when I pressed edit button in
so.details.jsp with action “soDetails”:
<action name="soDetails" class="actionSoDetails">
…
<result name="edit" type="chain">soDetail</result>
…
</action>
I have searched online in google before posting this message, this error
would happen when using validation xml, but in my case I did not used any
validation xml.
Could anyone tell me what happened and help me?
Terry.
--
View this message in context:
http://old.nabble.com/The-requested-list-key-%27prices%27-could-not-be-resolved-as-a-collection-array-map-enumeration-iterator-type.-tp30074913p30074913.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]