|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hdpagination.web.action.AbstractPaginationAction
public abstract class AbstractPaginationAction
A convenient abstract class allowing custom action to extend rather than implement
PaginationAction interface directly.
| Constructor Summary | |
|---|---|
AbstractPaginationAction()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getAttributeName4Data()
The name of attribute which holds the search result in the specified scope. |
java.lang.String |
getDataScope()
The scope where the search result is to be stored. |
java.lang.String |
getForwardPath()
The URL path to which it will forward after execution of query. |
java.lang.String |
getId()
Identifier of each search processing Action instance. |
java.lang.String |
getInputPath()
The URL of input page. |
int |
getPageSize()
How many records should be displayed in one page |
abstract QueryCallback |
getQueryCallback(javax.servlet.http.HttpServletRequest request)
Generate a QueryCallback instance based on request parameters. |
QueryTemplate |
getQueryTemplate()
The query execution engine. |
SearchResultHandler |
getSearchResultHandler()
The handler to deal with the search result. |
Validator |
getValidator()
The validator to process the validation of input data before executing the search |
View |
getView()
Get the view who is responsible for rendering page. |
boolean |
isCacheRecordsCount()
Flag to indicate whether the count of total records should be cached to improve performance. |
void |
setAttributeName4Data(java.lang.String attributeName4Data)
Set the name of attribute which holds the search result in the specified scope. |
void |
setCacheRecordsCount(boolean cacheRecordsCount)
Flag to indicate whether the count of total records should be cached to improve performance. |
void |
setDataScope(java.lang.String dataScope)
Set the scope where the search result is to be stored. |
void |
setForwardPath(java.lang.String forwardPath)
Set the URL path to which it will forward after execution of query |
void |
setId(java.lang.String id)
Set action identifier. |
void |
setInputPath(java.lang.String inputPath)
Set the URL of input page. |
void |
setPageSize(int pageSize)
Set how many records should be displayed in one page |
void |
setQueryTemplate(QueryTemplate queryTemplate)
Set the query execution engine. |
void |
setSearchResultHandler(SearchResultHandler resultHandler)
Set the handler to deal with the search result |
void |
setValidator(Validator validator)
Set the validator to process the validation of input data before executing the search |
void |
setView(View view)
Set the view who is responsible for rendering page. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractPaginationAction()
| Method Detail |
|---|
public java.lang.String getAttributeName4Data()
PaginationActionGlobals.QUERY_RESULT_KEY
getAttributeName4Data in interface PaginationActionpublic java.lang.String getDataScope()
PaginationAction
getDataScope in interface PaginationActionpublic java.lang.String getForwardPath()
PaginationActionPaginationAction (It depends on view property of
PaginationAction or GlobalConfig) is TilesView or
Tiles2View, it is interpreted as name of Tiles definition
- Specified by:
getForwardPath in interface PaginationAction
- Returns:
- See Also:
PaginationAction.getView(),
GlobalConfig.getView()
public java.lang.String getInputPath()
PaginationActionforwardPath, if the view used in PaginationAction
(It depends on view property of PaginationAction or GlobalConfig)
is TilesView or Tiles2View,
it is interpreted as name of Tiles definition corresponding to the input page.
It's used for validation only. If validation fails it will forward back
to input URL. Its default value is the same as forwardPath.
- Specified by:
getInputPath in interface PaginationAction
- Returns:
- See Also:
PaginationAction.getView(),
GlobalConfig.getView()
public java.lang.String getId()
PaginationActionPaginationServlet relies on this property to match the action instance with
coming request URL (ServletPath).
Related Pagination Tags rely on it to retrieve corresponding pagination information
(such as "number of total records", "page number of current page") from HttpSession
which is recorded in HttpSession the first time the query was executed.
getId in interface PaginationActionpublic int getPageSize()
PaginationAction
getPageSize in interface PaginationActionpublic QueryTemplate getQueryTemplate()
PaginationAction
getQueryTemplate in interface PaginationActionpublic void setId(java.lang.String id)
id - public void setPageSize(int pageSize)
pageSize - public void setForwardPath(java.lang.String forwardPath)
forwardPath - public void setInputPath(java.lang.String inputPath)
inputPath - public void setQueryTemplate(QueryTemplate queryTemplate)
queryTemplate - public void setDataScope(java.lang.String dataScope)
dataScope - public void setAttributeName4Data(java.lang.String attributeName4Data)
Globals.QUERY_RESULT_KEY
attributeName4Data - public SearchResultHandler getSearchResultHandler()
PaginationAction
getSearchResultHandler in interface PaginationActionpublic void setSearchResultHandler(SearchResultHandler resultHandler)
resultHandler - public Validator getValidator()
PaginationAction
getValidator in interface PaginationActionpublic void setValidator(Validator validator)
validator - public abstract QueryCallback getQueryCallback(javax.servlet.http.HttpServletRequest request)
(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 PaginationActionpublic View getView()
PaginationActionGlobalConfig.getView() is used
to render page.
getView in interface PaginationActionpublic void setView(View view)
Action only.
view - InternalResourceView,
TilesView,
Tiles2Viewpublic boolean isCacheRecordsCount()
isCacheRecordsCount in interface PaginationActionpublic void setCacheRecordsCount(boolean cacheRecordsCount)
cacheRecordsCount -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||