public abstract class BaseSearchPageBean extends BaseWebPageBean implements ISearchBarPageBean, ISearchResultsPageBean, ISearchPageBean
BaseViewBean.ClientIdsContentProvider
Modifier and Type | Field and Description |
---|---|
protected int |
fPreviousInvocationID
Holds the search invocation ID for the previous request
|
protected boolean |
fQueryChanged
indicates if current query has changed and new search is needed
|
protected ISavedSearchProvider |
fSavedSearchProvider
Reference to the current saved search provider
|
protected ISearchOptionsManager |
fSearchOptionsManager
Reference to the current search options manager
|
protected ISearchQueryFactory |
fSearchQueryFactory
Reference to the current search query factory
|
protected ISearchResultsOptionsManager |
fSearchResultsOptionsManager
Reference to the current search result options manager
|
protected List<SelectItem> |
fSortableColumns
Temporary list of sortable columns
|
protected List<SelectItem> |
fViewableColumns
Temporary list of viewable columns
|
protected ISearchQuery |
resultsSearchQuery
Holds the active search query for the search results table control
|
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 |
---|
BaseSearchPageBean() |
Modifier and Type | Method and Description |
---|---|
static void |
applyUserPreferences(DataTable dataTable,
String[] columnDisplay,
String initialSortBy,
String columnWidth,
boolean initialSortAscending)
Apply the user preferences to the data table.
|
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.
|
String |
doSearch()
Action handler for executing a search
|
ISavedSearch |
getActiveSavedSearch()
Gets the active saved search object for the SearchBar control.
|
ISearchQuery |
getActiveSearchQuery()
Gets the active search query object for the SearchBar control.
|
String |
getActiveSearchQueryString()
Controls may use this method to determine if there is an active query
|
abstract UIComponent |
getActiveSearchResultsControl()
Return the active search results component (table, tree, whatever).
|
String |
getColumnWidthsPreference()
Delegates to the same API on the current search result options manager
|
String[] |
getDisplayColumnsPreference()
Delegates to the same API on the current search result options manager
|
int |
getInitialExportPageSize() |
int |
getInitialPageSize()
Delegates to the same API on the current search result options manager
|
Boolean |
getInitialSortAscendingPreference()
Delegates to the same API on the current search result options manager
|
String |
getInitialSortByPreference()
Delegates to the same API on the current search result options manager
|
ISearchQuery |
getResultsSearchQuery()
Gets the active search query object for the SearchResults control.
|
protected SearchBar |
getSafeSearchBarControl()
Wrapper around the getSearchBarControl method that throws an exception
if the SearchBar value is null
|
ISavedSearchProvider |
getSavedSearchProvider()
Creates and returns implementation of ISavedSearchProvider
|
abstract SearchBar |
getSearchBarControl()
Retrieves the SearchBar control for this page
|
ISearchOptionsManager |
getSearchOptionsManager()
Creates and returns implementation of ISearchOptionsManager
|
ISearchQueryFactory |
getSearchQueryFactory()
Creates and returns implementation of ISearchQueryFactory
|
ISearchResultsOptionsManager |
getSearchResultsOptionsManager()
Gets the search results options manager
|
List<SelectItem> |
getSortableColumnList()
Returns the list of sortable columns
|
List<SelectItem> |
getViewableColumnList()
Returns the list of viewable columns
|
boolean |
isQueryChanged()
Returns whether the query has changed from the previous request
|
boolean |
isSearchBarOnAdvancedTab()
Returns true if the active searchbar tab is the the 'Advanced' tab
|
boolean |
isSearchBarOnOptionsTab()
Returns true if the active searchbar tab is the the 'Options' tab
|
boolean |
isSearchBarOnSavedTab()
Returns true if the active searchbar tab is the the 'Saved' tab
|
boolean |
isSearchBarOnSimpleTab()
Returns true if the active searchbar tab is the the 'Search' tab
|
static void |
loadColumnInfoForControl(DataTable dataTable,
List<SelectItem> viewableColumnList,
List<SelectItem> sortableColumnList)
Loads the column info for the requested control
|
void |
loadSearchQueryDefaults(ISearchQuery query)
Page bean may load default values into search query object
|
String |
persistDisplayOptions()
Action handler for the drag-to-resize/reorder-columns updates.
|
void |
setColumnWidthsPreference(String columnWidths)
Delegates to the same API on the current search result options manager
|
void |
setDisplayColumnsPreference(String[] columnDisplay)
Delegates to the same API on the current search result options manager
|
void |
setInitialExportPageSize(int pageSize) |
void |
setInitialPageSize(int pageSize)
Delegates to the same API on the current search result options manager
|
void |
setInitialSortAscendingPreference(Boolean ascending)
Delegates to the same API on the current search result options manager
|
void |
setInitialSortByPreference(String sortBy)
Delegates to the same API on the current search result options manager
|
getAppNavBean
afterApplyRequestValues, afterInvokeApplication, afterPhase, afterProcessValidations, afterRenderResponse, afterRestoreView, afterUpdateModelValues, beforeApplyRequestValues, beforeInvokeApplication, beforePhase, beforeProcessValidations, beforeRestoreView, beforeUpdateModelValues, callInitialize, findComponent, findComponentInRoot, getApplicationScope, getClientIds, getPhaseId, getRealPath, getRequestParam, getRequestScope, getSessionScope, gotoPage, 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 ISavedSearchProvider fSavedSearchProvider
protected transient ISearchQueryFactory fSearchQueryFactory
protected transient ISearchOptionsManager fSearchOptionsManager
protected transient ISearchResultsOptionsManager fSearchResultsOptionsManager
protected transient List<SelectItem> fViewableColumns
protected transient List<SelectItem> fSortableColumns
protected int fPreviousInvocationID
protected boolean fQueryChanged
protected ISearchQuery resultsSearchQuery
public ISearchResultsOptionsManager getSearchResultsOptionsManager()
public ISavedSearchProvider getSavedSearchProvider()
ISearchBarPageBean
getSavedSearchProvider
in interface ISearchBarPageBean
public ISearchOptionsManager getSearchOptionsManager()
ISearchBarPageBean
getSearchOptionsManager
in interface ISearchBarPageBean
public ISearchQueryFactory getSearchQueryFactory()
ISearchBarPageBean
getSearchQueryFactory
in interface ISearchBarPageBean
public void loadSearchQueryDefaults(ISearchQuery query)
ISearchBarPageBean
loadSearchQueryDefaults
in interface ISearchBarPageBean
public String persistDisplayOptions() throws Exception
ISearchResultsPageBean
persistDisplayOptions
in interface ISearchResultsPageBean
Exception
public String getActiveSearchQueryString()
public boolean isSearchBarOnSimpleTab()
public boolean isSearchBarOnAdvancedTab()
public boolean isSearchBarOnOptionsTab()
public boolean isSearchBarOnSavedTab()
public abstract SearchBar getSearchBarControl()
public abstract UIComponent getActiveSearchResultsControl()
protected SearchBar getSafeSearchBarControl()
public ISearchQuery getActiveSearchQuery()
getActiveSearchQuery
in interface ISearchPageBean
public ISearchQuery getResultsSearchQuery()
public ISavedSearch getActiveSavedSearch()
protected ISearchQuery createSearchQuery()
protected void beforeRenderResponse()
beforeRenderResponse
in class BaseViewBean
BaseViewBean.beforeRenderResponse()
public boolean isQueryChanged()
public String[] getDisplayColumnsPreference()
public void setDisplayColumnsPreference(String[] columnDisplay)
public int getInitialPageSize()
public void setInitialPageSize(int pageSize)
public int getInitialExportPageSize()
public void setInitialExportPageSize(int pageSize)
public String getColumnWidthsPreference()
public void setColumnWidthsPreference(String columnWidths)
public String getInitialSortByPreference()
public void setInitialSortByPreference(String sortBy)
public Boolean getInitialSortAscendingPreference()
public void setInitialSortAscendingPreference(Boolean ascending)
public List<SelectItem> getSortableColumnList()
public List<SelectItem> getViewableColumnList()
public static void loadColumnInfoForControl(DataTable dataTable, List<SelectItem> viewableColumnList, List<SelectItem> sortableColumnList)
viewableColumnList
- list where the viewable columns are addedsortableColumnList
- list where the sortable columns are addedpublic static void applyUserPreferences(DataTable dataTable, String[] columnDisplay, String initialSortBy, String columnWidth, boolean initialSortAscending)
dataTable
- the search result table controlcolumnDisplay
- array of columns to displayinitialSortBy
- column id to sort bycolumnWidth
- widths of the displayed columnsinitialSortAscending
- sort orderpublic String doSearch()