|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.mlw.vlh.web.mvc.ValueListHandlerHelper
This package is used in mvc controlers to better handle with the ValueListHandler. It allow you to
Constructor Summary | |
ValueListHandlerHelper()
|
Method Summary | |
void |
backupAndSet(javax.servlet.http.HttpServletRequest request,
ValueList valueList,
String valueListName,
String tableId)
Do 2 things: Backup the ValueList Info to the session with the attribute's name tableId and store Value List to the request with the attribute key's name valueListName |
void |
backupInfoFor(javax.servlet.http.HttpServletRequest request,
ValueListInfo info)
Save ValueListInfo to the session with key of TableInfo.DEFAULT_ID. |
void |
backupInfoFor(javax.servlet.http.HttpServletRequest request,
ValueListInfo info,
String tableId)
Save ValueListInfo to session with key of tableId if info is null, remove the tableId attribute from session. |
String |
getActionParam(javax.servlet.http.HttpServletRequest request,
String name)
Return the name of parameter without ActionTag.ACTION_TEMP_PARAM_PREFIX Example: param id return id |
String |
getActionTempParam(javax.servlet.http.HttpServletRequest request,
String name)
Return the name of parameter with ActionTag.ACTION_TEMP_PARAM_PREFIX Example: param id return ACTid |
int |
getLastPageAfterDelete(ValueListInfo info)
If delete first and at that time also the last entry on the last page, you sets actual last page! You should call this method in a action after delete is done. |
ValueList |
getValueList(String name,
ValueListInfo info)
Retrieve valueList from ValueListHadler bean. |
ValueListHandler |
getValueListHandler()
Get a bean of the ValueListHandler. |
ValueListInfo |
getValueListInfo(javax.servlet.http.HttpServletRequest request)
To get ValueListInfo it use the TableInfo.DEFAULT_ID as the tableId. |
ValueListInfo |
getValueListInfo(javax.servlet.http.HttpServletRequest request,
String tableId)
Return ValueListInfo from a request (which is preferr to session) or a session or new ValueListInfo(). |
void |
setValueListHandler(ValueListHandler valueListHandler)
|
void |
setValueListTo(javax.servlet.http.HttpServletRequest request,
ValueList valueList,
String valueListName)
Store only ValueList to request as an attribute with the name valueListName. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ValueListHandlerHelper()
Method Detail |
public void setValueListHandler(ValueListHandler valueListHandler)
valueListHandler
- The valueListHandler to set.public ValueListHandler getValueListHandler()
public ValueList getValueList(String name, ValueListInfo info)
name
- the name of the Adapterinfo
-
public ValueListInfo getValueListInfo(javax.servlet.http.HttpServletRequest request)
request
-
getValueListInfo(HttpServletRequest, String)
,
TableInfo.DEFAULT_ID
public ValueListInfo getValueListInfo(javax.servlet.http.HttpServletRequest request, String tableId)
request
- tableId
-
getValueListInfo(HttpServletRequest)
public void backupAndSet(javax.servlet.http.HttpServletRequest request, ValueList valueList, String valueListName, String tableId)
request
- valueList
- null -> info will be removed from session and storing
will be skipped.valueListName
- the name used in the <vlh:root
value="valueListName" ... to retrievetableId
- unique id in the sessionbackupInfoFor(HttpServletRequest,
ValueListInfo, String)
,
setValueListTo(HttpServletRequest, ValueList,
String)
public void setValueListTo(javax.servlet.http.HttpServletRequest request, ValueList valueList, String valueListName)
request
- valueList
- ValueList to storevalueListName
- request attribute'spublic void backupInfoFor(javax.servlet.http.HttpServletRequest request, ValueListInfo info)
request
- HttpServletRequestinfo
- ValueListInfoTableInfo.DEFAULT_ID
,
backupInfoFor(HttpServletRequest,
ValueListInfo, String)
public void backupInfoFor(javax.servlet.http.HttpServletRequest request, ValueListInfo info, String tableId)
request
- HttpServletRequestinfo
- ValueListInfo to back up to sessiontableId
- String session's attributes name during accesing session, we are not using any synchronization.
public String getActionTempParam(javax.servlet.http.HttpServletRequest request, String name)
request
- name
-
ActionTag.ACTION_TEMP_PARAM_PREFIX
public String getActionParam(javax.servlet.http.HttpServletRequest request, String name)
request
- name
-
ActionTag.ACTION_TEMP_PARAM_PREFIX
public int getLastPageAfterDelete(ValueListInfo info)
info
- ValueListInfo
ValueListInfo.getTotalNumberOfEntries()
,
ValueListInfo.getPagingNumberPer()
,
ValueListInfo#getPagingPer()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |