|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opencms.workplace.list.CmsListMetadata
public class CmsListMetadata
This is class contains all the information for defining a whole html list.
| Constructor Summary | |
|---|---|
CmsListMetadata(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. |
String |
csvEmptyList()
Generates the csv output for an empty table. |
String |
csvHeader(CmsWorkplace wp)
Returns the csv output for the header of the list. |
String |
csvItem(CmsListItem item,
CmsWorkplace wp)
Returns the csv output for a list item. |
CmsListColumnDefinition |
getColumnDefinition(String columnId)
Returns a column definition object for a given column id. |
List |
getColumnDefinitions()
Returns all columns definitions. |
I_CmsListAction |
getIndependentAction(String actionId)
Returns an independent action object for a given id. |
List |
getIndependentActions()
Returns the list of independent actions. |
CmsListItemDetails |
getItemDetailDefinition(String itemDetailId)
Returns the item details definition object for a given id. |
List |
getItemDetailDefinitions()
Returns all detail definitions. |
String |
getListId()
Returns the id of the list. |
CmsListMultiAction |
getMultiAction(String actionId)
Returns a multi action object for a given id. |
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. |
String |
htmlActionBar(CmsWorkplace wp)
Returns the html code for the action bar. |
String |
htmlEmptyTable(Locale locale)
Generates the hml code for an empty table. |
String |
htmlHeader(CmsHtmlList list,
CmsWorkplace wp)
Returns the html code for the header of the list. |
String |
htmlItem(CmsListItem item,
CmsWorkplace wp,
boolean odd,
boolean isPrintable)
Returns the html code for a list item. |
String |
htmlMultiActionBar(CmsWorkplace wp)
Returns the html code for the multi action bar. |
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(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 |
| Constructor Detail |
|---|
public CmsListMetadata(String listId)
listId - the id of the list| Method 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 positionCmsIdentifiableObjectContainerpublic 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 positionCmsIdentifiableObjectContainerpublic void addMultiAction(CmsListMultiAction multiAction)
It will be executed with a list of s.CmsListItem
multiAction - the actionpublic String csvEmptyList()
public String csvHeader(CmsWorkplace wp)
wp - the workplace instance
public String csvItem(CmsListItem item,
CmsWorkplace wp)
item - the list item to renderwp - the workplace context
public CmsListColumnDefinition getColumnDefinition(String columnId)
columnId - the column id
null if not presentpublic List getColumnDefinitions()
CmsListColumnDefinitions.public I_CmsListAction getIndependentAction(String actionId)
actionId - the id
null if not presentpublic List getIndependentActions()
I_CmsListActionspublic CmsListItemDetails getItemDetailDefinition(String itemDetailId)
itemDetailId - the id
null if not presentpublic List getItemDetailDefinitions()
CmsListItemDetails.public String getListId()
public CmsListMultiAction getMultiAction(String actionId)
actionId - the id
null if not presentpublic List getMultiActions()
CmsListMultiActionspublic 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 String htmlActionBar(CmsWorkplace wp)
wp - the workplace context
public String htmlEmptyTable(Locale locale)
locale - for localization
public String htmlHeader(CmsHtmlList list,
CmsWorkplace wp)
list - the list to generate the code forwp - the workplace instance
public 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 String htmlMultiActionBar(CmsWorkplace wp)
wp - the workplace context
public 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(String itemDetailId)
itemDetailId - the item detail id
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||