Announcement Announcement Module
Collapse
No announcement yet.
caching issues... Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • caching issues...

    I have a jsp form that has two submit buttons; save and reset. The
    form submits to a SimpleFormController with the following onSubmit
    method:

    Code:
    public ModelAndView onSubmit(...) throws Exception {
    
       if (request.getParameter("reset") != null) {
           this.settingsManager.reset();
       }
       else {
           this.settingsManager.setSettings((Settings) command);
       }
    
       return new ModelAndView(new RedirectView(this.getSuccessView()));
    }
    The success view for this controller is a redirect to a Controller
    with the following handleRequest method:

    Code:
    public ModelAndView handleRequest(...) throws Exception {
       return new ModelAndView("addressList", this.settingsManager().getSettings());
    }
    So, when the user hits the save button, the settings form is submitted
    and the settings manager sets the Settings to the given command
    values. When the user hits the reset button, the settings manager
    sets the Settings to their default values. Everything works fine,
    except that when the reset submit button is hit, the resulting view is
    pulled from Spring's cache instead of being re-generated. The user
    sees the old settings instead. This does not happen when the user
    hits save though. The new settings are seen in the view.

    What's going on here? Am I supplying enough info? I've looked all
    through the API and the documentation. I don't see anything about
    troubleshooting caching. I tried adding this.preventCaching() in my
    SimpleFormController, but it didn't change anything. Any ideas?

    Thanks,
    Brian

  • #2
    Can you submit your configuration for the controllers?

    Comment

    Working...
    X