|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.workplace.list.CmsListMetadata
This is class contains all the information for defining a whole html list.
Field Summary | |
static java.lang.String |
SEARCH_BAR_INPUT_ID
the html id for the input element of the search bar. |
Constructor Summary | |
CmsListMetadata(java.lang.String listId)
Default Constructor. |
Method Summary | |
void |
addColumn(CmsListColumnDefinition listColumn)
Adds a new column definition at the end. |
void |
addColumn(CmsListColumnDefinition listColumn,
int position)
Adds a new column definition at the given position. |
void |
addIndependentAction(I_CmsListAction action)
Adds a list item independent action. |
void |
addItemDetails(CmsListItemDetails itemDetail)
Adds a new item detail definition at the end. |
void |
addItemDetails(CmsListItemDetails itemDetail,
int position)
Adds a new item detail definition at the given position. |
void |
addMultiAction(CmsListMultiAction multiAction)
Adds an action applicable to more than one list item at once. |
java.lang.String |
csvEmptyList()
Generates the csv output for an empty table. |
java.lang.String |
csvHeader(CmsWorkplace wp)
Returns the csv output for the header of the list. |
java.lang.String |
csvItem(CmsListItem item,
CmsWorkplace wp)
Returns the csv output for a list item. |
CmsListColumnDefinition |
getColumnDefinition(java.lang.String columnId)
Returns a column definition object for a given column id. |
java.util.List |
getColumnDefinitions()
Returns all columns definitions. |
I_CmsListAction |
getIndependentAction(java.lang.String actionId)
Returns an independent action object for a given id. |
java.util.List |
getIndependentActions()
Returns the list of independent actions. |
CmsListItemDetails |
getItemDetailDefinition(java.lang.String itemDetailId)
Returns the item details definition object for a given id. |
java.util.List |
getItemDetailDefinitions()
Returns all detail definitions. |
java.lang.String |
getListId()
Returns the id of the list. |
CmsListMultiAction |
getMultiAction(java.lang.String actionId)
Returns a multi action object for a given id. |
java.util.List |
getMultiActions()
Returns the list of multi actions. |
CmsListSearchAction |
getSearchAction()
Returns the search action. |
int |
getWidth()
Returns the total number of displayed columns. |
boolean |
hasActions()
Returns true if the list definition contains an action. |
boolean |
hasCheckMultiActions()
Returns true if at least 'check' multiaction has been set. |
boolean |
hasMultiActions()
Returns true if the list definition contains a multi action. |
boolean |
hasSingleActions()
Returns true if any column definition contains a single action. |
java.lang.String |
htmlActionBar(CmsWorkplace wp)
Returns the html code for the action bar. |
java.lang.String |
htmlEmptyTable(java.util.Locale locale)
Generates the hml code for an empty table. |
java.lang.String |
htmlHeader(CmsHtmlList list,
CmsWorkplace wp)
Returns the html code for the header of the list. |
java.lang.String |
htmlItem(CmsListItem item,
CmsWorkplace wp,
boolean odd,
boolean isPrintable)
Returns the html code for a list item. |
java.lang.String |
htmlMultiActionBar(CmsWorkplace wp)
Returns the html code for the multi action bar. |
java.lang.String |
htmlSearchBar(CmsWorkplace wp)
Generates the html code for the search bar. |
boolean |
isSearchable()
Returns true if the list is searchable. |
boolean |
isSorteable()
Returns true if any column is sorteable. |
boolean |
isVolatile()
Returns true if this metadata object should not be cached. |
void |
setSearchAction(CmsListSearchAction searchAction)
Sets the search action. |
void |
setVolatile(boolean volatileFlag)
Sets the volatile flag. |
void |
toogleDetailState(java.lang.String itemDetailId)
Toggles the given item detail state from visible to hidden or from hidden to visible. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String SEARCH_BAR_INPUT_ID
Constructor Detail |
public CmsListMetadata(java.lang.String listId)
listId
- the id of the listMethod Detail |
public void addColumn(CmsListColumnDefinition listColumn)
By default a column is printable if it is the first column in the list, or if it is sorteable.
If you want to override this behaviour, use the
CmsListColumnDefinition.setPrintable(boolean)
method after calling this one.
listColumn
- the column definitionCmsIdentifiableObjectContainer
public void addColumn(CmsListColumnDefinition listColumn, int position)
By default a column is printable if it is the first column in the list, or if it is sorteable.
If you want to override this behaviour, use the
CmsListColumnDefinition.setPrintable(boolean)
method after calling this one.
listColumn
- the column definitionposition
- the positionCmsIdentifiableObjectContainer
public void addIndependentAction(I_CmsListAction action)
action
- the actionpublic void addItemDetails(CmsListItemDetails itemDetail)
itemDetail
- the item detail definitionCmsIdentifiableObjectContainer
public void addItemDetails(CmsListItemDetails itemDetail, int position)
itemDetail
- the item detail definitionposition
- the positionCmsIdentifiableObjectContainer
public void addMultiAction(CmsListMultiAction multiAction)
It will be executed with a list of
s.CmsListItem
multiAction
- the actionpublic java.lang.String csvEmptyList()
public java.lang.String csvHeader(CmsWorkplace wp)
wp
- the workplace instance
public java.lang.String csvItem(CmsListItem item, CmsWorkplace wp)
item
- the list item to renderwp
- the workplace context
public CmsListColumnDefinition getColumnDefinition(java.lang.String columnId)
columnId
- the column id
null
if not presentpublic java.util.List getColumnDefinitions()
CmsListColumnDefinition
s.public I_CmsListAction getIndependentAction(java.lang.String actionId)
actionId
- the id
null
if not presentpublic java.util.List getIndependentActions()
I_CmsListAction
spublic CmsListItemDetails getItemDetailDefinition(java.lang.String itemDetailId)
itemDetailId
- the id
null
if not presentpublic java.util.List getItemDetailDefinitions()
CmsListItemDetails
.public java.lang.String getListId()
public CmsListMultiAction getMultiAction(java.lang.String actionId)
actionId
- the id
null
if not presentpublic java.util.List getMultiActions()
CmsListMultiAction
spublic CmsListSearchAction getSearchAction()
public int getWidth()
public boolean hasActions()
true
if the list definition contains an action.
true
if the list definition contains an actionpublic boolean hasCheckMultiActions()
true
if at least 'check' multiaction has been set.
true
if at least 'check' multiaction has been setpublic boolean hasMultiActions()
true
if the list definition contains a multi action.
true
if the list definition contains a multi actionpublic boolean hasSingleActions()
true
if any column definition contains a single action.
true
if any column definition contains a single actionpublic java.lang.String htmlActionBar(CmsWorkplace wp)
wp
- the workplace context
public java.lang.String htmlEmptyTable(java.util.Locale locale)
locale
- for localization
public java.lang.String htmlHeader(CmsHtmlList list, CmsWorkplace wp)
list
- the list to generate the code forwp
- the workplace instance
public java.lang.String htmlItem(CmsListItem item, CmsWorkplace wp, boolean odd, boolean isPrintable)
item
- the list item to renderwp
- the workplace contextodd
- if the position is odd or evenisPrintable
- if the list is to be printed
public java.lang.String htmlMultiActionBar(CmsWorkplace wp)
wp
- the workplace context
public java.lang.String htmlSearchBar(CmsWorkplace wp)
wp
- the workplace context
public boolean isSearchable()
true
if the list is searchable.
true
if the list is searchablepublic boolean isSorteable()
true
if any column is sorteable.
true
if any column is sorteablepublic boolean isVolatile()
true
if this metadata object should not be cached.
true
if this metadata object should not be cached.public void setSearchAction(CmsListSearchAction searchAction)
searchAction
- the search action to setpublic void setVolatile(boolean volatileFlag)
volatileFlag
- the volatile flag to setpublic void toogleDetailState(java.lang.String itemDetailId)
itemDetailId
- the item detail id
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |