org.shept.org.springframework.web.servlet.mvc.delegation.component
Class ListPersistenceComponent
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.support.WebContentGenerator
org.shept.org.springframework.web.servlet.mvc.delegation.component.AbstractComponent
org.shept.org.springframework.web.servlet.mvc.delegation.component.AbstractPersistenceComponent
org.shept.org.springframework.web.servlet.mvc.delegation.component.AbstractEditingComponent
org.shept.org.springframework.web.servlet.mvc.delegation.component.ListPersistenceComponent
- All Implemented Interfaces:
- WebComponent, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware
public class ListPersistenceComponent
- extends AbstractEditingComponent
- Version:
- $$Id: ListPersistenceComponent.java 110 2011-02-21 09:16:15Z aha $$
- Author:
- Andi
| Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator |
METHOD_GET, METHOD_HEAD, METHOD_POST |
| Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
logger |
|
Method Summary |
protected org.springframework.web.servlet.ModelAndView |
doCancel(javax.servlet.http.HttpServletRequest request,
ComponentToken token)
|
protected void |
doCustomTransaction(String transaction,
PageableList<?> pagedList,
Integer idx)
Execute a custom transaction
First it will be checked if there is a transaction for the PageableList available
Then the dao is checked for a transaction with a List argument, which will contain only
the visible part of the page to be commited. |
protected org.springframework.web.servlet.ModelAndView |
doDelete(javax.servlet.http.HttpServletRequest request,
ComponentToken token)
|
protected void |
doDelete(javax.servlet.http.HttpServletRequest request,
PageableList<?> listHolder,
int idx)
|
protected org.springframework.web.servlet.ModelAndView |
doSave(javax.servlet.http.HttpServletRequest request,
ComponentToken token)
|
protected void |
doSaveList(javax.servlet.http.HttpServletRequest request,
PageableList<?> listHolder)
|
private void |
executeTransaction(Method mth,
Object target,
Integer idx)
|
protected ModelCreation |
getModelCreation(PageableList<?> listHolder)
|
boolean |
supports(Object commandObject)
|
| Methods inherited from class org.shept.org.springframework.web.servlet.mvc.delegation.component.AbstractPersistenceComponent |
afterPropertiesSet, doDeleteModel, doFlushSession, doInTransactionIfAvailable, doSaveModel, doSaveModel, excecuteAction, getDao, getWrappedModel, isEnableDaoTransactions, isEnableDelete, isEnableSave, isReloadOnCancel, setDao, setEnableDaoTransactions, setEnableDelete, setEnableSave, setReloadOnCancel, setTransactionManager |
| Methods inherited from class org.shept.org.springframework.web.servlet.mvc.delegation.component.AbstractComponent |
getAnchorPrefix, getMappings, getResources, hasErrorsInPath, initApplicationContext, isCopyResources, modelRedirect, modelRedirect, modelRedirectClip, modelUnhandled, modelWithErrors, setAnchorPrefix, setCopyResources, setMappings, setResources, supportedActions, supportsAction |
| Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator |
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader |
| 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, requiredContextClass, setApplicationContext |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListPersistenceComponent
public ListPersistenceComponent()
doCancel
protected org.springframework.web.servlet.ModelAndView doCancel(javax.servlet.http.HttpServletRequest request,
ComponentToken token)
throws Exception
- Specified by:
doCancel in class AbstractEditingComponent
- Returns:
-
- Throws:
Exception
doSave
protected org.springframework.web.servlet.ModelAndView doSave(javax.servlet.http.HttpServletRequest request,
ComponentToken token)
throws Exception
- Specified by:
doSave in class AbstractEditingComponent
- Returns:
-
- Throws:
Exception
doDelete
protected org.springframework.web.servlet.ModelAndView doDelete(javax.servlet.http.HttpServletRequest request,
ComponentToken token)
throws Exception
- Specified by:
doDelete in class AbstractEditingComponent
- Returns:
-
- Throws:
Exception
doCustomTransaction
protected void doCustomTransaction(String transaction,
PageableList<?> pagedList,
Integer idx)
throws Exception
- Execute a custom transaction
First it will be checked if there is a transaction for the PageableList available
Then the dao is checked for a transaction with a List argument, which will contain only
the visible part of the page to be commited.
- Parameters:
transaction - The method name of the transactionpagedList - PageableList argumentidx - optional index of the row to be executed (if only one row shall be exceuted)
- Throws:
Exception
executeTransaction
private void executeTransaction(Method mth,
Object target,
Integer idx)
throws Exception
- Parameters:
- mth - pageList -
- Throws:
Exception
doSaveList
protected void doSaveList(javax.servlet.http.HttpServletRequest request,
PageableList<?> listHolder)
throws Exception
- Parameters:
- request - listHolder -
- Throws:
Exception
doDelete
protected void doDelete(javax.servlet.http.HttpServletRequest request,
PageableList<?> listHolder,
int idx)
throws Exception
- Parameters:
- request - listHolder -
- Throws:
Exception
getModelCreation
protected ModelCreation getModelCreation(PageableList<?> listHolder)
supports
public boolean supports(Object commandObject)
Copyright © 2011. All Rights Reserved.