com.webmethods.caf.faces.bean.search
Class BaseToggleSearchResultPageBean

java.lang.Object
  extended by com.webmethods.caf.faces.bean.BaseFacesBean
      extended by com.webmethods.caf.faces.bean.BaseFacesSessionBean
          extended by com.webmethods.caf.faces.bean.BaseViewBean
              extended by com.webmethods.caf.faces.bean.BasePortletPageBean
                  extended by com.webmethods.caf.faces.bean.search.BaseSearchResultPageBean
                      extended by com.webmethods.caf.faces.bean.search.BaseTableSearchResultPageBean
                          extended by com.webmethods.caf.faces.bean.search.BaseToggleSearchResultPageBean
All Implemented Interfaces:
IPageFlowScopeAdapter, ISearchPageBean, ISearchResultsPageBean

public abstract class BaseToggleSearchResultPageBean
extends BaseTableSearchResultPageBean

Base page bean for search result pages that can toggle between a table view and a tree view of the search results

Since:
7.0

Nested Class Summary
 
Nested classes/interfaces inherited from class com.webmethods.caf.faces.bean.BaseViewBean
BaseViewBean.ClientIdsContentProvider
 
Field Summary
protected static String DISPLAY_STYLE_TREE_VIEW
          Constant that represents the 'tree' display style
protected  String fActiveResultsDisplayStyle
          Holds the active display style
 
Fields inherited from class com.webmethods.caf.faces.bean.search.BaseSearchResultPageBean
fActiveSearchQuery, fPreviousRequestSearchQuery, fQueryChanged, fSortableColumns, fViewableColumns, SEARCH_RESULT_PREFERENCES_APPLIED_KEY
 
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, OUTCOME_ERROR, OUTCOME_OK, resourcesProviders
 
Constructor Summary
BaseToggleSearchResultPageBean()
          Default Constructor
 
Method Summary
protected  void applyUserPreferences(DataTable dataTable)
          Apply the user preferences to the data table.
 String getActiveResultsDisplayStyle()
          Gets the active display style (treeView or tableView)
 UIComponent getActiveSearchResultsControl()
          Gets the active search results control.
 String getColumnWidthsPreference()
          Return the column widths preference.
 String[] getDisplayColumnsPreference()
          Return the display column preference.
protected  String getInitialDisplayStyle()
          Gets the initial display style (treeView or tableView)
 Boolean getInitialSortAscendingPreference()
          Return the initialSortBy preference.
 String getInitialSortByPreference()
          Return the initialSortBy preference.
abstract  DataTree getSearchResultsTreeControl()
          Get the search results tree control
protected  boolean isApplyPreferencesNeeded()
          Returns wheter the user options need to be applied to the search result control
 void setActiveResultsDisplayStyle(String activeResultsDisplayStyle)
          Sets the active display style
 void setColumnWidthsPreference(String columnWidths)
          Sets the column widths preference.
 void setDisplayColumnsPreference(String[] columnDisplay)
          Sets the display column preference.
 
Methods inherited from class com.webmethods.caf.faces.bean.search.BaseTableSearchResultPageBean
getSearchResultsTableControl
 
Methods inherited from class com.webmethods.caf.faces.bean.search.BaseSearchResultPageBean
beforeApplyRequestValues, beforeRenderResponse, createSearchQuery, getActiveSearchQuery, getActiveSearchQueryString, getInitialPageSize, getSortableColumnList, getViewableColumnList, isQueryChanged, isSearchBarAvailable, persistDisplayOptions, setActiveSearchQuery, setInitialPageSize, setInitialSortAscendingPreference, setInitialSortByPreference
 
Methods inherited from class com.webmethods.caf.faces.bean.BasePortletPageBean
beforeWorkspaceLoad, callInitialize, clearNavigationState, createActionUrl, createRenderUrl, getActivePreferencesBean, getPreferences, getRequestID, gotoPage, switchToPortletMode
 
Methods inherited from class com.webmethods.caf.faces.bean.BaseViewBean
afterApplyRequestValues, afterInvokeApplication, afterPhase, afterProcessValidations, afterRenderResponse, afterRestoreView, afterUpdateModelValues, beforeInvokeApplication, beforePhase, beforeProcessValidations, beforeRestoreView, beforeUpdateModelValues, findComponent, findComponentInRoot, getApplicationScope, getClientIds, getPhaseId, getRealPath, getRequestParam, getRequestScope, getSessionScope, gotoPage, initialize, isAsyncRequest, 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, createValueBinding, error, error, error, error, error, getBean, getFacesContext, getLocale, getResourceInputStream, getResources, getResourcesProvider, getRootCause, getStackTrace, getTreeAttribute, isUserInRole, log, log, log, putTreeAttribute, resetDataBindingClients, resolveDataBinding, resolveDataBinding, resolveExpression, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISPLAY_STYLE_TREE_VIEW

protected static final String DISPLAY_STYLE_TREE_VIEW
Constant that represents the 'tree' display style

See Also:
Constant Field Values

fActiveResultsDisplayStyle

protected String fActiveResultsDisplayStyle
Holds the active display style

Constructor Detail

BaseToggleSearchResultPageBean

public BaseToggleSearchResultPageBean()
Default Constructor

Method Detail

getInitialDisplayStyle

protected String getInitialDisplayStyle()
Gets the initial display style (treeView or tableView)

Returns:
the initial display style

getActiveResultsDisplayStyle

public String getActiveResultsDisplayStyle()
Gets the active display style (treeView or tableView)

Returns:
the active display style

setActiveResultsDisplayStyle

public void setActiveResultsDisplayStyle(String activeResultsDisplayStyle)
Sets the active display style

Parameters:
activeResultsDisplayStyle - The display style to switch to

getSearchResultsTreeControl

public abstract DataTree getSearchResultsTreeControl()
Get the search results tree control

Returns:
search results tree control

getDisplayColumnsPreference

public String[] getDisplayColumnsPreference()
Return the display column preference. Usually via a portlet property that is configured from the portlet edit mode.

Overrides:
getDisplayColumnsPreference in class BaseSearchResultPageBean
Returns:
array of column ids that should be displayed in the given order

setDisplayColumnsPreference

public void setDisplayColumnsPreference(String[] columnDisplay)
Sets the display column preference. Usually via a portlet property that is configured from the portlet edit mode. param array of column ids that should be displayed in the given order

Overrides:
setDisplayColumnsPreference in class BaseSearchResultPageBean

getColumnWidthsPreference

public String getColumnWidthsPreference()
Return the column widths preference. Usually via a portlet property that is configured from the portlet edit mode.

Overrides:
getColumnWidthsPreference in class BaseSearchResultPageBean
Returns:
csv-style map of column ids to column widths (ie "colOne=60%,colTwo=40%,colThree=20px")

setColumnWidthsPreference

public void setColumnWidthsPreference(String columnWidths)
Sets the column widths preference. Usually via a portlet property that is configured from the portlet edit mode. param csv-style map of column ids to column widths (ie "colOne=60%,colTwo=40%,colThree=20px")

Overrides:
setColumnWidthsPreference in class BaseSearchResultPageBean

getInitialSortByPreference

public String getInitialSortByPreference()
Return the initialSortBy preference. Usually via a portlet property that is configured from the portlet edit mode.

Overrides:
getInitialSortByPreference in class BaseSearchResultPageBean
Returns:
id of the column to sort by initially

getInitialSortAscendingPreference

public Boolean getInitialSortAscendingPreference()
Return the initialSortBy preference. Usually via a portlet property that is configured from the portlet edit mode.

Overrides:
getInitialSortAscendingPreference in class BaseSearchResultPageBean
Returns:
id of the column to sort by initially

isApplyPreferencesNeeded

protected boolean isApplyPreferencesNeeded()
Description copied from class: BaseSearchResultPageBean
Returns wheter the user options need to be applied to the search result control

Overrides:
isApplyPreferencesNeeded in class BaseSearchResultPageBean
Returns:
true if apply prefererences is needed, false otherwise

applyUserPreferences

protected void applyUserPreferences(DataTable dataTable)
Description copied from class: BaseSearchResultPageBean
Apply the user preferences to the data table.

Overrides:
applyUserPreferences in class BaseSearchResultPageBean
Parameters:
dataTable - the search result table control

getActiveSearchResultsControl

public UIComponent getActiveSearchResultsControl()
Gets the active search results control. If the display style is 'treeView' then this returns the search result tree control. Otherwise it returns the search result table control.

Overrides:
getActiveSearchResultsControl in class BaseTableSearchResultPageBean
Returns:
active search results component