Class SearchBarControlBean
java.lang.Object
com.webmethods.caf.faces.bean.BaseFacesBean
com.webmethods.caf.faces.bean.BaseFacesSessionBean
com.webmethods.caf.faces.bean.BaseViewBean
com.webmethods.caf.faces.bean.BaseCompositeViewControlPageBean
com.webmethods.caf.faces.component.search.view.SearchBarControlBean
- All Implemented Interfaces:
IPageFlowScopeAdapter
,ICompositeViewControlPageBean
,Serializable
,EventListener
,PhaseListener
,HttpSessionBindingListener
- Direct Known Subclasses:
PeopleSearchBarBean
JSF Managed Bean that backs a SearchBar control
- Since:
- 7.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.webmethods.caf.faces.bean.BaseViewBean
BaseViewBean.ClientIdsContentProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected ISavedSearch
protected ISearchQuery
protected String
protected Boolean
protected String
protected Boolean
protected EncodersBean
protected Boolean
protected Boolean
protected Long
protected boolean
protected String
protected SecureRandom
protected Boolean
protected ISearchQuery
protected ISavedSearchProvider
protected Boolean
protected Boolean
protected ISearchOptionsManager
protected ISearchQueryFactory
protected Boolean
protected Boolean
protected Boolean
protected Boolean
static final String
Value for the advanced search tabstatic final String
Value for the saved search tabstatic final String
Value for the search options tabstatic final String
Value for the simple search tabFields inherited from class com.webmethods.caf.faces.bean.BaseCompositeViewControlPageBean
fCompositeNamingContainer
Fields inherited from class com.webmethods.caf.faces.bean.BaseViewBean
clientIds, initialized
Fields inherited from class com.webmethods.caf.faces.bean.BaseFacesSessionBean
fExpireWithPageFlow
Fields inherited from class com.webmethods.caf.faces.bean.BaseFacesBean
DATA_BINDING_CLIENTS, EMPTY_RESOURCES, OUTCOME_ERROR, OUTCOME_OK, resourcesProviders
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addInfoMessage
(String message) Helper method for adding an info message to the faces contextprotected void
Clients should overwrite this method to perform custom actions after the view got rendered.protected void
Apply the search option preferences for the current userprotected void
Clients should overwrite this method to perform custom actions before an action method is invoked.protected void
Clients should overwrite this method to perform custom actions before the view gets rendered.Action Handler for the 'Cancel' button on the 'Options' tab of the SearchBar controlAction Handler for the 'onchange' hidden command associated with the saved searches dropdown on the 'Saved' tabAction Handler for the 'Clear' button on all tabs of the SearchBar controlAction Handler for the 'Go' button on all tabs of the SearchBar controlprotected ISearchStateOptions
protected ISearchStateOptions
createSearchStateOptions
(boolean forSearchOnDisplay) Action Handler for the 'Delete' button on the 'Saved' tab of the SearchBar controlprotected String
protected String
getActiveQueryStateString
(ISearchStateOptions searchStateOptions) Gets the active saved search object for the SearchBar control.Gets the active search query object for the SearchBar control.Return the ID for the default searchbar commandReturn the ID for the searchbar control that should have the initial focusprotected String
Return the initial search tab value for the current userprotected String
Return the initial selected saved search value for the current userlong
protected Boolean
Return the runSearchOnDisplay value for the current userboolean
boolean
boolean
Returns true if the keywords block should be renderedboolean
boolean
boolean
boolean
boolean
boolean
boolean
Returns true if the active searchbar tab is the the 'Advanced' tabboolean
Returns true if the active searchbar tab is the the 'Options' tabboolean
Returns true if the active searchbar tab is the the 'Saved' tabboolean
Returns true if the active searchbar tab is the the 'Search' tabboolean
boolean
boolean
boolean
boolean
boolean
Action Handler for the 'Save' button on the 'Options' tab of the SearchBar controlreset()
Helper method mostly for debugging that will reset the state of the page bean to the default valuesAction Handler for the 'Save' icon on the 'Search' and 'Advanced' tab of the SearchBar controlvoid
setActiveSavedSearch
(ISavedSearch activeSavedSearch) Sets the active saved search object for the SearchBar control.void
setActiveSearchQuery
(ISearchQuery activeSearchQuery) Sets the active search query object for the SearchBar control.void
setActiveTabValue
(String activeTabValue) void
setAdvancedSearchAvailable
(boolean advancedSearchAvailable) void
setAsyncGoRefresh
(String asyncGoRefresh) void
setClearFormButtonAvailable
(boolean clearFormButtonAvailable) void
setEncodersBean
(EncodersBean encodersBean) void
setKeywordsFieldAvailable
(boolean keywordsFieldAvailable) protected void
setLastSearchState
(String lastSearchState) Setter for the query string preferencevoid
setMaxResultsFieldAvailable
(boolean maxResultsFieldAvailable) void
setMaxResultsMaxValue
(long maxResultsMaxValue) void
setRefinePanelVisible
(boolean isVisible) void
setRefineSearchButtonAvailable
(boolean refineSearchButtonAvailable) void
setSavedSearchProvider
(ISavedSearchProvider savedSearchProvider) void
setSaveSearchAvailable
(boolean saveSearchAvailable) void
setSaveSearchCompleted
(Boolean saveSearchCompleted) void
setSearchOptionsManager
(ISearchOptionsManager searchOptionsManager) void
setSearchQueryFactory
(ISearchQueryFactory searchQueryFactory) void
setShowingSavedDetails
(boolean showingSavedDetails) void
setSimpleSearchAvailable
(boolean simpleSearchAvailable) void
setSimpleSearchRefining
(boolean simpleSearchRefining) protected void
void
setUseAsyncGoButton
(boolean useAsyncGoButton) void
setUseOrConditionAvailable
(boolean useOrConditionAvailable) void
setUserSearchOptionsAvailable
(boolean userSearchOptionsAvailable) Action Handler for the 'Save' icon on the 'Saved' tab of the SearchBar controlMethods inherited from class com.webmethods.caf.faces.bean.BaseCompositeViewControlPageBean
findComponentInRoot, getClientIds, getCompositeViewAbsoluteControlId, getCompositeViewControlId, getCompositeViewNamingContainer, getPropertyOrBindingValue, setCompositeViewNamingContainer
Methods inherited from class com.webmethods.caf.faces.bean.BaseViewBean
afterApplyRequestValues, afterInvokeApplication, afterPhase, afterProcessValidations, afterRestoreView, afterUpdateModelValues, beforeApplyRequestValues, beforePhase, beforeProcessValidations, beforeRestoreView, beforeUpdateModelValues, callInitialize, findComponent, getApplicationScope, getPhaseId, getRealPath, getRequestParam, getRequestScope, getSessionScope, gotoPage, gotoPage, initialize, isAsyncRequest, preRenderResponse, release, resetPageFlowStorage, streamFileDataToResponse
Methods inherited from class com.webmethods.caf.faces.bean.BaseFacesSessionBean
getExpireWithPageFlow, setExpireWithPageFlow, valueBound, valueUnbound
Methods inherited from class com.webmethods.caf.faces.bean.BaseFacesBean
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
-
Field Details
-
TAB_VALUE_SIMPLE_SEARCH
Value for the simple search tab- See Also:
-
TAB_VALUE_ADVANCED_SEARCH
Value for the advanced search tab- See Also:
-
TAB_VALUE_SAVED_SEARCHES
Value for the saved search tab- See Also:
-
TAB_VALUE_SEARCH_OPTIONS
Value for the search options tab- See Also:
-
CONTROL_ID_KEYWORDS_TEXT_INPUT
- See Also:
-
CONTROL_ID_SIMPLE_SEARCH_ASYNC_GO_BUTTON
- See Also:
-
CONTROL_ID_SIMPLE_SEARCH_GO_BUTTON
- See Also:
-
CONTROL_ID_REFINED_SEARCH_GO_BUTTON
- See Also:
-
CONTROL_ID_REFINED_SEARCH_ASYNC_GO_BUTTON
- See Also:
-
CONTROL_ID_SAVE_SEARCH_ASYNC_GO_BUTTON
- See Also:
-
CONTROL_ID_SAVE_SEARCH_GO_BUTTON
- See Also:
-
CONTROL_ID_SAVE_SEARCH_OPTIONS_BUTTON
- See Also:
-
CONTROL_ID_SAVED_SEARCHES_DROPDOWN
- See Also:
-
CONTROL_ID_INITIAL_SEARCHTAB_DROPDOWN
- See Also:
-
CONTROL_ID_MAX_RESULTS
- See Also:
-
CONTROL_ID_SIMPLE_SUBMIT_BUTTONS_PANEL
- See Also:
-
fActiveTabValue
-
fPreviousTabValue
-
fSearchQueryFactory
-
fActiveSearchQuery
-
fResultSearchQuery
-
fActiveSavedSearch
-
fSavedSearchProvider
-
fSearchOptionsManager
-
fCurrentSearchOptions
-
fNeedsUserOptionsApplied
protected boolean fNeedsUserOptionsApplied -
fRandomNumberGenerator
-
fUseAsyncGoButton
-
fAsyncGoRefresh
-
fSimpleSearchAvailable
-
fRefineSearchButtonAvailable
-
fAdvancedSearchAvailable
-
fSaveSearchAvailable
-
fUserSearchOptionsAvailable
-
fMaxResultsFieldAvailable
-
fMaxResultsMaxValue
-
fKeywordsFieldAvailable
-
fClearFormButtonAvailable
-
fUseOrConditionAvailable
-
fEncodersBean
-
fSaveSearchCompleted
-
-
Constructor Details
-
SearchBarControlBean
public SearchBarControlBean()
-
-
Method Details
-
getResultSearchQuery
-
getSaveSearchCompleted
- Returns:
- the saveSearchCompleted
-
setSaveSearchCompleted
- Parameters:
saveSearchCompleted
- the saveSearchCompleted to set
-
afterRenderResponse
protected void afterRenderResponse()Description copied from class:BaseViewBean
Clients should overwrite this method to perform custom actions after the view got rendered.- Overrides:
afterRenderResponse
in classBaseViewBean
-
getEncodersBean
- Returns:
- the encodersBean
-
setEncodersBean
- Parameters:
encodersBean
- the encodersBean to set
-
getDefaultCommandId
Return the ID for the default searchbar command- Returns:
- the ID for the default searchbar command
-
getDefaultFocusId
Return the ID for the searchbar control that should have the initial focus- Returns:
- the ID for the searchbar control that should have the initial focus
-
reset
Helper method mostly for debugging that will reset the state of the page bean to the default values- Returns:
- "ok"
-
setSearchQueryFactory
- Parameters:
searchQueryFactory
- the searchQueryFactory to set
-
getSearchQueryFactory
-
getActiveSearchQuery
Gets the active search query object for the SearchBar control.- Returns:
- Returns the activeSearchQuery.
-
setActiveSearchQuery
Sets the active search query object for the SearchBar control.- Parameters:
activeSearchQuery
- The activeSearchQuery to set.
-
getActiveSavedSearch
Gets the active saved search object for the SearchBar control.- Returns:
- Returns the activeSavedSearch.
-
setActiveSavedSearch
Sets the active saved search object for the SearchBar control.- Parameters:
activeSavedSearch
- The activeSavedSearch to set.
-
setSavedSearchProvider
- Parameters:
savedSearchProvider
- The savedSearchProvider to set.
-
getSavedSearchProvider
-
getSearchOptionsManager
- Returns:
- the searchOptionsManager
-
setSearchOptionsManager
- Parameters:
searchOptionsManager
- the searchOptionsManager to set
-
getActiveTabValue
-
setActiveTabValue
- Parameters:
activeTabValue
- the activeTabValue to set
-
getCurrentSearchOptions
- Returns:
- the currentSearchOptions
-
isSearchBarOnSimpleTab
public boolean isSearchBarOnSimpleTab()Returns true if the active searchbar tab is the the 'Search' tab- Returns:
- true if the active searchbar tab is the 'Search' tab
-
isSearchBarOnAdvancedTab
public boolean isSearchBarOnAdvancedTab()Returns true if the active searchbar tab is the the 'Advanced' tab- Returns:
- true if the active searchbar tab is the 'Advanced' tab
-
isSearchBarOnOptionsTab
public boolean isSearchBarOnOptionsTab()Returns true if the active searchbar tab is the the 'Options' tab- Returns:
- true if the active searchbar tab is the 'Options' tab
-
isSearchBarOnSavedTab
public boolean isSearchBarOnSavedTab()Returns true if the active searchbar tab is the the 'Saved' tab- Returns:
- true if the active searchbar tab is the 'Saved' tab
-
isKeywordsBlockVisible
public boolean isKeywordsBlockVisible()Returns true if the keywords block should be rendered -
isRefinePanelVisible
public boolean isRefinePanelVisible() -
setRefinePanelVisible
public void setRefinePanelVisible(boolean isVisible) -
isSavedSearchesEmpty
public boolean isSavedSearchesEmpty() -
setupVisibleControls
protected void setupVisibleControls() -
beforeInvokeApplication
protected void beforeInvokeApplication()Description copied from class:BaseViewBean
Clients should overwrite this method to perform custom actions before an action method is invoked.- Overrides:
beforeInvokeApplication
in classBaseViewBean
-
beforeRenderResponse
protected void beforeRenderResponse()Description copied from class:BaseViewBean
Clients should overwrite this method to perform custom actions before the view gets rendered.- Overrides:
beforeRenderResponse
in classBaseViewBean
-
getInitialSearchTab
Return the initial search tab value for the current user- Returns:
- initial search tab value,
-
getInitialSelectedSavedSearch
Return the initial selected saved search value for the current user- Returns:
- initial selected saved search value
-
getRunSearchOnDisplay
Return the runSearchOnDisplay value for the current user- Returns:
- runSearchOnDisplay value for the current user
-
applySearchOptionPreferences
protected void applySearchOptionPreferences()Apply the search option preferences for the current user -
persistSearchOptions
Action Handler for the 'Save' button on the 'Options' tab of the SearchBar control- Returns:
- outcome of the action handler
-
cancelSearchOptions
Action Handler for the 'Cancel' button on the 'Options' tab of the SearchBar control- Returns:
- outcome of the action handler
-
saveSearchQuery
Action Handler for the 'Save' icon on the 'Search' and 'Advanced' tab of the SearchBar control- Returns:
- outcome of the action handler
-
updateSavedSearchQuery
Action Handler for the 'Save' icon on the 'Saved' tab of the SearchBar control- Returns:
- outcome of the action handler
-
changeActiveSavedSearch
Action Handler for the 'onchange' hidden command associated with the saved searches dropdown on the 'Saved' tab -
constructSearchQueryString
Action Handler for the 'Go' button on all tabs of the SearchBar control- Returns:
- outcome of the action handler
-
deleteSavedSearch
Action Handler for the 'Delete' button on the 'Saved' tab of the SearchBar control- Returns:
- outcome of the action handler
-
clearSearchForm
Action Handler for the 'Clear' button on all tabs of the SearchBar control- Returns:
- outcome of the action handler
-
getActiveQueryStateString
-
getActiveQueryStateString
-
setLastSearchState
Setter for the query string preference- Parameters:
lastSearchState
- the new value for the lastsearchstate preference
-
createSearchStateOptions
-
createSearchStateOptions
-
addInfoMessage
Helper method for adding an info message to the faces context- Parameters:
message
-
-
isAdvancedSearchAvailable
public boolean isAdvancedSearchAvailable()- Returns:
- the advancedSearchAvailable
-
setAdvancedSearchAvailable
public void setAdvancedSearchAvailable(boolean advancedSearchAvailable) - Parameters:
advancedSearchAvailable
- the advancedSearchAvailable to set
-
getAsyncGoRefresh
- Returns:
- the asyncGoRefresh
-
setAsyncGoRefresh
- Parameters:
asyncGoRefresh
- the asyncGoRefresh to set
-
isClearFormButtonAvailable
public boolean isClearFormButtonAvailable()- Returns:
- the clearFormButtonAvailable
-
setClearFormButtonAvailable
public void setClearFormButtonAvailable(boolean clearFormButtonAvailable) - Parameters:
clearFormButtonAvailable
- the clearFormButtonAvailable to set
-
isKeywordsFieldAvailable
public boolean isKeywordsFieldAvailable()- Returns:
- the keywordsFieldAvailable
-
setKeywordsFieldAvailable
public void setKeywordsFieldAvailable(boolean keywordsFieldAvailable) - Parameters:
keywordsFieldAvailable
- the keywordsFieldAvailable to set
-
isMaxResultsFieldAvailable
public boolean isMaxResultsFieldAvailable()- Returns:
- the maxResultsFieldAvailable
-
setMaxResultsFieldAvailable
public void setMaxResultsFieldAvailable(boolean maxResultsFieldAvailable) - Parameters:
maxResultsFieldAvailable
- the maxResultsFieldAvailable to set
-
getMaxResultsMaxValue
public long getMaxResultsMaxValue()- Returns:
- the maxResultsMaxValue
-
setMaxResultsMaxValue
public void setMaxResultsMaxValue(long maxResultsMaxValue) - Parameters:
maxResultsMaxValue
- the maxResultsMaxValue to set
-
isRefineSearchButtonAvailable
public boolean isRefineSearchButtonAvailable()- Returns:
- the refineSearchButtonAvailable
-
setRefineSearchButtonAvailable
public void setRefineSearchButtonAvailable(boolean refineSearchButtonAvailable) - Parameters:
refineSearchButtonAvailable
- the refineSearchButtonAvailable to set
-
isSaveSearchAvailable
public boolean isSaveSearchAvailable()- Returns:
- the saveSearchAvailable
-
setSaveSearchAvailable
public void setSaveSearchAvailable(boolean saveSearchAvailable) - Parameters:
saveSearchAvailable
- the saveSearchAvailable to set
-
isSimpleSearchAvailable
public boolean isSimpleSearchAvailable()- Returns:
- the simpleSearchAvailable
-
setSimpleSearchAvailable
public void setSimpleSearchAvailable(boolean simpleSearchAvailable) - Parameters:
simpleSearchAvailable
- the simpleSearchAvailable to set
-
isUseAsyncGoButton
public boolean isUseAsyncGoButton()- Returns:
- the useAsyncGoButton
-
setUseAsyncGoButton
public void setUseAsyncGoButton(boolean useAsyncGoButton) - Parameters:
useAsyncGoButton
- the useAsyncGoButton to set
-
isUseOrConditionAvailable
public boolean isUseOrConditionAvailable()- Returns:
- the useOrConditionAvailable
-
setUseOrConditionAvailable
public void setUseOrConditionAvailable(boolean useOrConditionAvailable) - Parameters:
useOrConditionAvailable
- the useOrConditionAvailable to set
-
isUserSearchOptionsAvailable
public boolean isUserSearchOptionsAvailable()- Returns:
- the userSearchOptionsAvailable
-
setUserSearchOptionsAvailable
public void setUserSearchOptionsAvailable(boolean userSearchOptionsAvailable) - Parameters:
userSearchOptionsAvailable
- the userSearchOptionsAvailable to set
-
isShowingSavedDetails
public boolean isShowingSavedDetails()- Returns:
- the showingSavedDetails
-
setShowingSavedDetails
public void setShowingSavedDetails(boolean showingSavedDetails) - Parameters:
showingSavedDetails
- the showingSavedDetails to set
-
isSimpleSearchRefining
public boolean isSimpleSearchRefining()- Returns:
- the simpleSearchRefining
-
setSimpleSearchRefining
public void setSimpleSearchRefining(boolean simpleSearchRefining) - Parameters:
simpleSearchRefining
- the simpleSearchRefining to set
-
getSimpleSearchTabText
-
getSimpleSearchRefinedTabText
-
getCategorizedSavedSearches
-