struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Struts Ajax Newbie
Date Tue, 03 Mar 2009 09:37:45 GMT
  BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px;
}Hallo, it is not really for this forum, but thread is already here.
 I have following problem with ajaxtags, described in ajaxtags forum,
but maybe it is not visited often. For javascript sources and function
- it is the same if it is included in html head or body.
 I have form in included tiles template, which has:  
     Select model 
 /cars/FillCarModel returns XML file with models for make. 
 But using this not works, base URL is not called (there is some log
messages, which are not in log). If I will use hard codded path to
baseUrl, then init method of this servlet is called, but neither
doGet or doPost. 
 In html is generated to: 
 new AjaxJspTag.Select( 
 baseUrl: "${contextPath}/FillCarModels", 
 source: "make", 
 onCreate: initProgress, 
 onComplete: resetProgress, 
 onFailure: reportError, 
 target: "model", 
 parameters: "make={make}", 
 emptyOptionName: "Select model" 
 Where can be problem? looks that something is not initialized ... 
  Thanks, Jiri
 On Mon 02/03/09 02:47 , Mileidys Gonzalez Prieto sent:
 Well, for to do actions like that in my code I'm using AjaxTags.
 Is really easy to use...
 On Sun, 2009-03-01 at 15:47 -0800, chumbobumbo wrote:
 > This is probably so basic - I'll put my flame proof suit just in
 > I have a 2 combos and (yes ;-) I would like the second one to be
 > depending on what's been chosen in the first one, so in my action
 > method I have:
 >      model.setList(service.getData1());
 > my struts.xml looks like this (note that I am using spring and I
am hitting
 > the same action 'class' (demoAction):
 > method="execute">
 >  jsp/output.jsp
 >  jsp/error.jsp
 >  jsp/second.jsp
 >  jsp/error.jsp
 > in my output jsp I have:
 > .....
 > listValue="entry.desc"  name="selection.listCode"
 >     onchange="javascript:load_second_list();return
 > false;">
 > theme="ajax"
 >     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
 > page, as the user should be allowed to change the first selection
 > 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?
 > Thanks,
 > 99-L Blue 

 To unsubscribe, e-mail: [1]
 For additional commands, e-mail: [2]


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message