struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chumbobumbo <>
Subject Struts Ajax Newbie
Date Sun, 01 Mar 2009 23:47:12 GMT

This is probably so basic - I'll put my flame proof suit just in case.

I have a 2 combos and (yes ;-) I would like the second one to be loaded
depending on what's been chosen in the first one, so in my action execute
method I have:


my struts.xml looks like this (note that I am using spring and I am hitting
the same action 'class' (demoAction):

               <action name="firstAction" class="demoAction"
			<result name="success">jsp/output.jsp</result>
			<result name="error">jsp/error.jsp</result>
		<action name="secondAction" class="demoAction" method="second">
			<result name="success">jsp/second.jsp</result>
			<result name="error">jsp/error.jsp</result>

in my output jsp I have:


    <td><s:select list="model.list" listKey="entry.code"
listValue="entry.desc"  name="selection.listCode"

   				<s:url id="second_url" action="loadSecond.action" /> 
   				<s:div showLoadingText="false" id="second" href="%{second}"
   					listenTopics="load_second_list" formId="demo"/>

that's all fine and dandy, but when I call loadSecond.action I find that my
model is re-initialised anew (i.e. as the action is marked 'prototype' in
spring config, the data for the first combo is no longer there) 

obviously I need data in the 1st combo to be available in the resulting
page, as the user should be allowed to change the first selection (that
would in turn relaod the second combo again). 

Is there a way to serialize/cache the data that was retrieved in the first
call so that it is available in the subsequent call other than putting it in
the session?


99-L Blue 
View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message