struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sam.raghav" <katiyar.vi...@gmail.com>
Subject Data loading problem in select tag using ajax in struts2
Date Sat, 25 Jul 2009 03:55:49 GMT

Dear all,

I am new to struts. I have some code like this.

registration.jsp
------------------
<body onload = "doRequestGETState(' StateAction?stateBn.state= ' + '');">

</body>

registrationInput.jsp
<s:fielderror/>
<s:actionerror/>

<s:select name="regBn.stateId" list="stateList" cssStyle="width: 180px;"
title="State" tabindex="1" onchange="doRequestGETState('
StateAction?stateBn.state=' + this.value); "
listValue="stateName" listKey="stateId" value="stateBn.state" headerKey=""
headerValue="Select State"/>

<s:select name="regBn.city" list="cityList" cssStyle="width: 180px;"
title="City" tabindex="1"
listValue="cityName" listKey="cityId" headerKey="" headerValue="Select City"
/>


struts.xml
--------------
<action name="StateAction" class="com.iMovers.res.action.StateAction">
<result name="success">/registrationInput.jsp</result>
</action>

<action name="RegistrationAction"
class="com.iMovers.res.action.RegistrationAction">
<result name="input">/registrationInput.jsp</result>
</action>


Problem is on validating registrationInput.jsp and coming back to
registrationInput.jsp I am getting error

"The requested list key 'stateList' could not be resolved as a
collection/array/map/enumeration/iterator type."

If I will change the result name from registrationInput.jsp to
registration.jsp then I can not display error message.

Please let me know If there is any way to come out of it.

Thanks and regards 
-- 
View this message in context: http://www.nabble.com/Data-loading-problem-in-select-tag-using-ajax-in-struts2-tp24654688p24654688.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message