More than one year later, I have the exact same problem. If the original poster has found a solution, or if anyone else knows how to solve this issue, I'd be very glad!
I have tried Action Chaining the result: @Result(name="input",type=ActionChainResult.class,value="product" ,params= {"method","getOne"}), However, Struts will try to find the "input" result of the chained action (product), and will never reach the method. aj123 wrote: > > Hi > I am trying to use action chaining in struts2 and am stuck. Any help would > be really appreciated. > > Scenario - I have a page that shows a list of records and also has a form > to add a new record. When user clicks on add I call addAction and chain it > to list action to go back to list page again showing the newly added > record. > > My struts.xml looks something like this -> > > <action name="add" class="com.test.AddAction"> > <result name="success" type="chain"> > list > </result> > <result name="input" type="chain">list</result> > </action> > <action name="list" class="com.test.ListAction"> > <result name="success">/proj/list.jsp</result> > </action> > > I have 2 issues/questions - > a) My validation does not work if I chain actions. If I don't enter > anything in add textbox and click on Add then I get a html 404 error. If I > route to list.jsp instead of chaning to list action then I see validation > messages. But I really need to show list on that page as well. So I can > not forward to the jsp. > > b) When I chain 2 actions, can I pass new params for second action? It > does not seem to work for me e.g. In following example, I can not pass foo > param to list action that is chained to add action. > > <action name="add" class="com.test.AddAction"> > <result name="success" type="chain"> > list > bar > </result> > <result name="input" type="chain">list</result> > </action> > > I would really appreciate some feedback/help here. > -- View this message in context: http://www.nabble.com/Questions-on-action-chaining-and-validation-in-struts2---please-help-tp10036082p17980459.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]