meghus
Mar 10th, 2008, 11:52 PM
HI All,
I am really stuck with this problem where after processing the request using SimpleFormController1, I then need to call a second SimpleFormController2. I have read lots about this is various sites however, I am unable to find out exactly how to do this.
Just to give some background, I need to first save an event then after the save instead of just returning to the save Event screen I have to return to a view which shows all events from the past. This is handled separately in 2 different SimpleFormControllers, so I first need to call the SaveEventController and then secondly the ShowAllEventsController.
The problem is that the ShowAllEventsController takes a command object which I need to pass when I do a redirect. I am trying to approach it as below:
String viewName = "redirect:showAllEvents.htm";
return new ModelAndView(viewName);
This works and does take me to a view put there is no data there since I am not sure how to pass the command object which the second controller expects.
Any help will be much appreciated!
Thanks.
I am really stuck with this problem where after processing the request using SimpleFormController1, I then need to call a second SimpleFormController2. I have read lots about this is various sites however, I am unable to find out exactly how to do this.
Just to give some background, I need to first save an event then after the save instead of just returning to the save Event screen I have to return to a view which shows all events from the past. This is handled separately in 2 different SimpleFormControllers, so I first need to call the SaveEventController and then secondly the ShowAllEventsController.
The problem is that the ShowAllEventsController takes a command object which I need to pass when I do a redirect. I am trying to approach it as below:
String viewName = "redirect:showAllEvents.htm";
return new ModelAndView(viewName);
This works and does take me to a view put there is no data there since I am not sure how to pass the command object which the second controller expects.
Any help will be much appreciated!
Thanks.