Package org.opencms.workplace.list
Class CmsListSearchAction
- java.lang.Object
-
- org.opencms.workplace.tools.A_CmsHtmlIconButton
-
- org.opencms.workplace.list.A_CmsListAction
-
- org.opencms.workplace.list.CmsListIndependentAction
-
- org.opencms.workplace.list.A_CmsListSearchAction
-
- org.opencms.workplace.list.CmsListSearchAction
-
- All Implemented Interfaces:
I_CmsListAction
,org.opencms.workplace.tools.I_CmsHtmlIconButton
- Direct Known Subclasses:
CmsListMultiSearchAction
public class CmsListSearchAction extends A_CmsListSearchAction
Default implementation for a search action in an html list.It allows to search in several columns, including item details.
- Since:
- 6.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SEARCH_BAR_INPUT_ID
the html id for the input element of the search bar.-
Fields inherited from class org.opencms.workplace.list.A_CmsListSearchAction
m_defaultShowAllAction, SEARCH_ACTION_ID, SHOWALL_ACTION_ID
-
Fields inherited from class org.opencms.workplace.list.CmsListIndependentAction
ACTION_EXPLORER_SWITCH_ID
-
-
Constructor Summary
Constructors Constructor Description CmsListSearchAction(CmsListColumnDefinition column)
Default Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addColumn(CmsListColumnDefinition column)
Adds a column to search into.java.lang.String
barHtml(org.opencms.workplace.CmsWorkplace wp)
Returns the html code for the search bar.java.lang.String
buttonHtml(org.opencms.workplace.CmsWorkplace wp)
java.util.List<CmsListItem>
filter(java.util.List<CmsListItem> items, java.lang.String filter)
Returns a sublist of the given items, that match the given filter string.java.util.List<CmsListColumnDefinition>
getColumns()
Returns the list of columns to be searched.boolean
isCaseInSensitive()
Returns the caseInSensitive.void
setCaseInSensitive(boolean caseInSensitive)
Sets the caseInSensitive.void
setSearchFilter(java.lang.String filter)
Deprecated.useCmsHtmlList.setSearchFilter(String)
insteadvoid
setWp(A_CmsListDialog wp)
Sets the workplace dialog object.-
Methods inherited from class org.opencms.workplace.list.A_CmsListSearchAction
getShowAllAction, setListId, setShowAllAction, useDefaultShowAllAction
-
Methods inherited from class org.opencms.workplace.list.CmsListIndependentAction
getDefaultExplorerSwitchAction, resolveOnClic
-
Methods inherited from class org.opencms.workplace.list.A_CmsListAction
buttonHtml, defaultConfirmationHtml, getConfirmationMessage, getListId, getWp, setConfirmationMessage
-
Methods inherited from class org.opencms.workplace.tools.A_CmsHtmlIconButton
defaultButtonHtml, defaultButtonHtml, defaultHelpHtml, getHelpText, getIconPath, getId, getName, isEnabled, isVisible, setEnabled, setHelpText, setIconPath, setName, setVisible
-
-
-
-
Field Detail
-
SEARCH_BAR_INPUT_ID
public static final java.lang.String SEARCH_BAR_INPUT_ID
the html id for the input element of the search bar.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsListSearchAction
public CmsListSearchAction(CmsListColumnDefinition column)
Default Constructor.- Parameters:
column
- the column to search into
-
-
Method Detail
-
addColumn
public void addColumn(CmsListColumnDefinition column)
Adds a column to search into.- Parameters:
column
- the additional column to search into
-
barHtml
public java.lang.String barHtml(org.opencms.workplace.CmsWorkplace wp)
Returns the html code for the search bar.- Parameters:
wp
- the workplace context- Returns:
- html code
-
buttonHtml
public java.lang.String buttonHtml(org.opencms.workplace.CmsWorkplace wp)
- Specified by:
buttonHtml
in interfaceorg.opencms.workplace.tools.I_CmsHtmlIconButton
- Overrides:
buttonHtml
in classA_CmsListSearchAction
- See Also:
A_CmsListSearchAction.buttonHtml(org.opencms.workplace.CmsWorkplace)
-
filter
public java.util.List<CmsListItem> filter(java.util.List<CmsListItem> items, java.lang.String filter)
Returns a sublist of the given items, that match the given filter string.- Parameters:
items
- the items to filterfilter
- the string to filter- Returns:
- the filtered sublist
-
getColumns
public java.util.List<CmsListColumnDefinition> getColumns()
Returns the list of columns to be searched.- Returns:
- a list of
CmsListColumnDefinition
objects
-
isCaseInSensitive
public boolean isCaseInSensitive()
Returns the caseInSensitive.- Returns:
- the caseInSensitive
-
setCaseInSensitive
public void setCaseInSensitive(boolean caseInSensitive)
Sets the caseInSensitive.- Parameters:
caseInSensitive
- the caseInSensitive to set
-
setSearchFilter
@Deprecated public void setSearchFilter(java.lang.String filter)
Deprecated.useCmsHtmlList.setSearchFilter(String)
insteadSets the current search filter.- Parameters:
filter
- the current search filter
-
setWp
public void setWp(A_CmsListDialog wp)
Description copied from interface:I_CmsListAction
Sets the workplace dialog object.- Specified by:
setWp
in interfaceI_CmsListAction
- Overrides:
setWp
in classA_CmsListAction
- Parameters:
wp
- the workplace dialog object- See Also:
I_CmsListAction.setWp(org.opencms.workplace.list.A_CmsListDialog)
-
-