public abstract class BaseSearchResultPageBean extends BasePortletPageBean implements ISearchPageBean, ISearchResultsPageBean
BaseViewBean.ClientIdsContentProvider
Modifier and Type | Field and Description |
---|---|
protected ISearchQuery |
fActiveSearchQuery
Holds the active search query for the search results table control
|
protected String |
fPreviousRequestSearchQuery
holds the query string for the previous request
|
protected boolean |
fQueryChanged
indicates if current query has changed and new search is needed
|
protected List<SelectItem> |
fSortableColumns
Temporary list of sortable columns
|
protected List<SelectItem> |
fViewableColumns
Temporary list of viewable columns
|
protected static String |
SEARCH_RESULT_PREFERENCES_APPLIED_KEY
Attribute name used to flag whether the search result preferences have
been applied to the search result table control.
|
clientIds, initialized
fExpireWithPageFlow
DATA_BINDING_CLIENTS, EMPTY_RESOURCES, OUTCOME_ERROR, OUTCOME_OK, resourcesProviders
Constructor and Description |
---|
BaseSearchResultPageBean() |
Modifier and Type | Method and Description |
---|---|
protected void |
applyUserPreferences(DataTable dataTable)
Apply the user preferences to the data table.
|
protected void |
beforeApplyRequestValues()
Overrides the default behavior to destroy old cached query object if the query
string has changed.
|
protected void |
beforeRenderResponse()
Overrides the default behavior to detect when a search
query has changed and apply user preferences to the search
result table control before rendering.
|
protected ISearchQuery |
createSearchQuery()
Creates and returns a new SearchQuery object for the SearchBar control.
|
ISearchQuery |
getActiveSearchQuery()
Gets the active search query object for the SearchBar control.
|
String |
getActiveSearchQueryString()
Return the active search query string.
|
abstract UIComponent |
getActiveSearchResultsControl()
Return the active search results component (table, tree, whatever).
|
String |
getColumnWidthsPreference()
Return the column widths preference.
|
String[] |
getDisplayColumnsPreference()
Return the display column preference.
|
int |
getInitialPageSize()
Return the initialPageSize preference value.
|
Boolean |
getInitialSortAscendingPreference()
Return the initialSortBy preference.
|
String |
getInitialSortByPreference()
Return the initialSortBy preference.
|
List<SelectItem> |
getSortableColumnList()
Returns the list of sortable columns
|
List<SelectItem> |
getViewableColumnList()
Returns the list of viewable columns
|
protected boolean |
isApplyPreferencesNeeded()
Returns wheter the user options need to be applied to the search result control
|
boolean |
isQueryChanged()
Returns whether the query has changed from the previous request
|
boolean |
isSearchBarAvailable()
Returns true if there is a wired search bar portlet to drive results portlet.
|
String |
persistDisplayOptions()
Action handler for the drag-to-resize/reorder-columns updates.
|
protected void |
setActiveSearchQuery(ISearchQuery activeSearchQuery)
Sets the active search query object for the SearchBar control.
|
void |
setColumnWidthsPreference(String columnWidths)
Sets the column widths preference.
|
void |
setDisplayColumnsPreference(String[] columnDisplay)
Sets the display column preference.
|
void |
setInitialPageSize(int value)
Sets the initial page size preference
|
void |
setInitialSortAscendingPreference(Boolean value)
Sets the initialSortAscendinbg preference.
|
void |
setInitialSortByPreference(String value)
Sets the initialSortBy preference.
|
beforeWorkspaceLoad, callInitialize, clearNavigationState, createActionUrl, createRenderUrl, getActivePreferencesBean, getPreferences, getRequestID, gotoPage, switchToPortletMode
afterApplyRequestValues, afterInvokeApplication, afterPhase, afterProcessValidations, afterRenderResponse, afterRestoreView, afterUpdateModelValues, beforeInvokeApplication, beforePhase, beforeProcessValidations, beforeRestoreView, beforeUpdateModelValues, findComponent, findComponentInRoot, getApplicationScope, getClientIds, getPhaseId, getRealPath, getRequestParam, getRequestScope, getSessionScope, gotoPage, initialize, isAsyncRequest, preRenderResponse, release, resetPageFlowStorage, streamFileDataToResponse
getExpireWithPageFlow, setExpireWithPageFlow, valueBound, valueUnbound
createMethodBinding, createMethodExpression, createValueBinding, createValueExpression, createValueExpression, error, error, error, error, error, getBean, getFacesContext, getLocale, getResourceInputStream, getResources, getResourcesProvider, getRootCause, getStackTrace, getTreeAttribute, isUserInRole, log, log, log, putTreeAttribute, resetDataBindingClients, resolveDataBinding, resolveDataBinding, resolveExpression, setValue
protected static final String SEARCH_RESULT_PREFERENCES_APPLIED_KEY
protected transient List<SelectItem> fViewableColumns
protected transient List<SelectItem> fSortableColumns
protected String fPreviousRequestSearchQuery
protected ISearchQuery fActiveSearchQuery
protected boolean fQueryChanged
public ISearchQuery getActiveSearchQuery()
getActiveSearchQuery
in interface ISearchPageBean
protected void setActiveSearchQuery(ISearchQuery activeSearchQuery)
activeSearchQuery
- The activeSearchQuery to set.protected ISearchQuery createSearchQuery()
public boolean isQueryChanged()
protected void beforeRenderResponse()
beforeRenderResponse
in class BaseViewBean
BaseViewBean.beforeRenderResponse()
protected void beforeApplyRequestValues()
beforeApplyRequestValues
in class BaseViewBean
BaseViewBean.beforeApplyRequestValues()
protected boolean isApplyPreferencesNeeded()
protected void applyUserPreferences(DataTable dataTable)
dataTable
- the search result table controlpublic String getActiveSearchQueryString()
public abstract UIComponent getActiveSearchResultsControl()
public String[] getDisplayColumnsPreference()
public void setDisplayColumnsPreference(String[] columnDisplay)
public String getColumnWidthsPreference()
public void setColumnWidthsPreference(String columnWidths)
public void setInitialSortByPreference(String value)
value
- the column id to sort bypublic String getInitialSortByPreference()
public void setInitialSortAscendingPreference(Boolean value)
value
- true to sort in ascending order, false otherwisepublic Boolean getInitialSortAscendingPreference()
public void setInitialPageSize(int value)
value
- number of rows to display on each page of search resultspublic int getInitialPageSize()
public String persistDisplayOptions() throws Exception
persistDisplayOptions
in interface ISearchResultsPageBean
javax.portlet.PortletModeException
Exception
public List<SelectItem> getSortableColumnList()
public List<SelectItem> getViewableColumnList()