Announcement Announcement Module
No announcement yet.
Where are the Pros?? I am doing something wroung? Using redirect all the time Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Where are the Pros?? I am doing something wroung? Using redirect all the time

    I started programming Spring about 3 weeks ago. I did Struts some year back. Most of my project is working but I dont think I did it right or I am using the right design. I can see that on successView i am always doing a redirect so i know i must be doing something wroung.

    Below is my example

    Screen 1: Controller(controller A) extends AbstractController this screen displays a list of account numbers. Each account number has a href that points to the 2nd Screen.

    Screen 2: Controller(controller B) extends extends SimpleFormController. In the formBackingObject i get the account number and look it up in the database and then returns the account to be displayed. I this point the user can make changes and then click on submit. The control will go back to controller B in the onSubmit funcation. In this funcation i updated the database and then do a "return new ModelAndView(getSuccessView(), model);" Which in most of my cases just displays the Screen1 with the list of the data should i be using a redirect????

    <bean id="keyrec_security_updateController"
    		<property name="commandName">
    		<property name="commandClass">
    		<property name="formView">
    		<property name="successView">
    		<property name="WMSService" ref="wmsService" />