org.shept.org.springframework.web.servlet.mvc.formcache
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.
| Modifier and Type | Field and Description |
|---|---|
private boolean |
keepForms |
MAX_CACHE_SIZE, SESSION_FORM_CACHE_ATTIRBUTE| Constructor and Description |
|---|
ReplacementSessionFormCache() |
| Modifier and Type | Method and Description |
|---|---|
Object |
getForm(javax.servlet.http.HttpServletRequest request,
String formAttrName) |
boolean |
isKeepForms() |
void |
setKeepForms(boolean keepForms) |
clearCache, clearForm, clearOtherForms, getFormCache, getLastModified, getMaxCacheSize, saveForm, setMaxCacheSizegetServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextpublic Object getForm(javax.servlet.http.HttpServletRequest request, String formAttrName)
getForm in interface SessionFormCachegetForm in class SimpleSessionFormCachepublic boolean isKeepForms()
public void setKeepForms(boolean keepForms)
Copyright © 2014. All Rights Reserved.