|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hdpagination.web.action.AbstractPaginationAction
org.hdpagination.web.action.AbstractCommandPaginationAction
public abstract class AbstractCommandPaginationAction
A abstract class with the similar functionalities as AbstractPaginationAction but providing
additional convenient method via:
1) instantiating a javabean and populates its properties with values from http request parameters by matching property name with parameter name;
2) passing the populated javabean instance to another overloading method
getQueryCallback(HttpServletRequest request, Object command).
HttpServletRequest.
To simplify the way to handle HTTP Request, only properties with type of java.lang.String or java.lang.String[]
in javabean are populated. All other properties with other types will not be populated even their names are matched with HTTP Request parameter names.
Populating property with type of java.lang.String[] from HTTP Request parameters was added since version 1.2;
This feature will be useful in some cases where the search criteria includes multiple selections (e.g. check boxes or
<select multiple="multiple">). By doing so, the multiple selected option values from the page will be converted automatically
to the corresponding property in javabean object if its type is String Array.
| Constructor Summary | |
|---|---|
AbstractCommandPaginationAction()
|
|
AbstractCommandPaginationAction(java.lang.Class commandClazz)
|
|
| Method Summary | |
|---|---|
java.lang.Class |
getCommandClass()
The class of javabean whose properties will be populated with http request parameter values |
QueryCallback |
getQueryCallback(javax.servlet.http.HttpServletRequest request)
Generate a QueryCallback instance based on request parameters. |
abstract QueryCallback |
getQueryCallback(javax.servlet.http.HttpServletRequest request,
java.lang.Object command)
Generate a QueryCallback instance based on request parameters. |
void |
setCommandClass(java.lang.Class commandClass)
Set the class of javabean whose properties will be populated with http request parameter values |
void |
setCommandName(java.lang.String commandName)
Set the name of class of javabean whose properties will be populated with http request parameter values |
| Methods inherited from class org.hdpagination.web.action.AbstractPaginationAction |
|---|
getAttributeName4Data, getDataScope, getForwardPath, getId, getInputPath, getPageSize, getQueryTemplate, getSearchResultHandler, getValidator, getView, isCacheRecordsCount, setAttributeName4Data, setCacheRecordsCount, setDataScope, setForwardPath, setId, setInputPath, setPageSize, setQueryTemplate, setSearchResultHandler, setValidator, setView |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractCommandPaginationAction()
public AbstractCommandPaginationAction(java.lang.Class commandClazz)
commandClazz - The class of javabean whose properties will be populated with http parameter values.| Method Detail |
|---|
public java.lang.Class getCommandClass()
public void setCommandClass(java.lang.Class commandClass)
commandClass - public void setCommandName(java.lang.String commandName)
commandName - public QueryCallback getQueryCallback(javax.servlet.http.HttpServletRequest request)
AbstractPaginationAction
(1) JdbcQueryCallback matchs with all subclass of
JdbcQueryTemplate
(2) HBN2QueryCallback matchs with
Hibernate2QueryTemplate
(3) HBN3QueryCallback matchs with
Hibernate3QueryTemplate
(4) JPAQueryCallback matchs with
JPAQueryTemplate
getQueryCallback in interface PaginationActiongetQueryCallback in class AbstractPaginationAction
public abstract QueryCallback getQueryCallback(javax.servlet.http.HttpServletRequest request,
java.lang.Object command)
(1) JdbcQueryCallback matchs with all subclass of
JdbcQueryTemplate
(2) HBN2QueryCallback matchs with
Hibernate2QueryTemplate
(3) HBN3QueryCallback matchs with
Hibernate3QueryTemplate
(4) JPAQueryCallback matchs with
JPAQueryTemplate
request - command - The javabean object whose properties are populated with http parameter values if their names match with request names.
To simply the way to handle HTTP Request, only properties with type of java.lang.String or java.lang.String[]
in javabean are populated. All other properties with other types will not be populated even their names are matched with HTTP Request parameter names.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||