org.shept.org.springframework.web.servlet.mvc.formcache
Class ReplacementSessionFormCache
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.shept.org.springframework.web.servlet.mvc.formcache.SimpleSessionFormCache
org.shept.org.springframework.web.servlet.mvc.formcache.ReplacementSessionFormCache
- All Implemented Interfaces:
- SessionFormCache, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware
public class ReplacementSessionFormCache
- extends SimpleSessionFormCache
This Cache emulates the way that the AbstractFormController handled form caching.
The org.shept.org.springframework.web.servlet.mvc.classic.AbstractFormController
handled form caching by saving just the current form in the session. The form was
removed from the session when obtaining the command object. When the workflow
through the Controller completed, org.shept.org.springframework.web.servlet.mvc.classic.AbstractFormController#showForm
exposed the form again to the session. This was a somewhat inflexible design. It makes sparse use of session memory but
this was hardcoded and it didn't allow for a configurable stategy where
session memory resources are not a bottleneck.
- Version:
- $$Id: ReplacementSessionFormCache.java 34 2010-08-20 16:46:49Z aha $$
- Author:
- Andi
| Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
logger |
| Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport |
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext |
| Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
keepForms
private boolean keepForms
ReplacementSessionFormCache
public ReplacementSessionFormCache()
getForm
public Object getForm(javax.servlet.http.HttpServletRequest request,
String formAttrName)
- Specified by:
getForm in interface SessionFormCache- Overrides:
getForm in class SimpleSessionFormCache
isKeepForms
public boolean isKeepForms()
setKeepForms
public void setKeepForms(boolean keepForms)
Copyright © 2011. All Rights Reserved.