public abstract class SearchFormAction extends BaseFormAction
SearchFormAction#prepareQuery()
that prepares the query based on criteria entered by user, and returns an object of SearchQuery| Modifier and Type | Field and Description |
|---|---|
protected org.displaytag.pagination.PaginatedList |
searchResult |
dropdownData, EDIT, INDEX, NEW, ordering, parameters, persistenceService, relations, request, TRANSACTIONSUCCESS, VIEW| Constructor and Description |
|---|
SearchFormAction() |
| Modifier and Type | Method and Description |
|---|---|
String |
getDir() |
int |
getPage() |
int |
getPageSize() |
org.displaytag.pagination.PaginatedList |
getSearchResult() |
String |
getSort() |
String |
getSortDir() |
abstract SearchQuery |
prepareQuery(String sortField,
String sortOrder) |
String |
search()
The Search action method.
|
void |
setDir(String sortDir) |
void |
setPage(int pageNum) |
void |
setPageSize(int pageSize) |
void |
setSort(String sortField) |
void |
setSortDir(String sortDir) |
void |
setTableId(String tableId)
Sets the display tag table id.
|
acceptableParameterName, addDropdownData, addRelatedEntity, addRelatedEntity, getDropdownData, getOrdering, getPersistenceService, getRelationships, getSession, prepare, session, setParameters, setPersistenceService, setRequest, setSession, setupDropdownDataExcluding, setValue, tokenNameaddActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, execute, getActionErrors, getActionMessages, getFieldErrors, getFormatted, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, validatepublic void setTableId(String tableId)
tableId - The id of the display tag table (in "display:table" tag)public void setPage(int pageNum)
pageNum - the page number to setpublic int getPage()
public void setPageSize(int pageSize)
pageSize - the pageSize to setpublic int getPageSize()
public String getSort()
public void setSort(String sortField)
sortField - Field on which data is to be sortedpublic String getSortDir()
public void setSortDir(String sortDir)
sortDir - Sort order (asc/desc)public void setDir(String sortDir)
sortDir - Sort order (asc/desc)public String getDir()
public org.displaytag.pagination.PaginatedList getSearchResult()
public abstract SearchQuery prepareQuery(String sortField, String sortOrder)
sortField - the field on which data is to be sorted.
This will be same as the value of "property" attribute in display:column
tag (when sortable=true and user clicks on the column to sort it).
In case no sorting is required, this parameter will be passed as null.sortOrder - the sort order (asc/desc)public String search()
SearchFormAction#prepareQuery() to get the query to be executed.
It then executes the query and creates the paginated search result.Copyright © 2015–2016 eGovernments Foundation. All rights reserved.