org.opencms.workplace.list
Class A_CmsListDialog

java.lang.Object
  extended byorg.opencms.workplace.CmsWorkplace
      extended byorg.opencms.workplace.tools.CmsToolDialog
          extended byorg.opencms.workplace.CmsDialog
              extended byorg.opencms.workplace.list.A_CmsListDialog
Direct Known Subclasses:
A_CmsListExplorerDialog, A_CmsListResourceTypeDialog, A_CmsResourceCategoriesList, CmsDeletedResourcesList, CmsElementComparisonList, CmsGroupSelectionList, CmsHistoryList, CmsOrgUnitSelectionList, CmsPrincipalSelectionList, CmsPropertyComparisonList, CmsUserSelectionList

public abstract class A_CmsListDialog
extends CmsDialog

Provides a dialog with a list widget.

Since:
6.0.0
Version:
$Revision: 1.39 $
Author:
Michael Moossen

Field Summary
static int ACTION_LIST_INDEPENDENT_ACTION
          Value for the action: execute a list item independent action of the list.
static int ACTION_LIST_MULTI_ACTION
          Value for the action: execute an multi action of the list.
static int ACTION_LIST_SEARCH
          Value for the action: search the list.
static int ACTION_LIST_SELECT_PAGE
          Value for the action: go to a page.
static int ACTION_LIST_SINGLE_ACTION
          Value for the action: execute a single action of the list.
static int ACTION_LIST_SORT
          Value for the action: sort the list.
static java.lang.String ICON_ACTIVE
          Standard list button location.
static java.lang.String ICON_ADD
          Standard list button location.
static java.lang.String ICON_DELETE
          Standard list button location.
static java.lang.String ICON_DETAILS_HIDE
          Standard list button location.
static java.lang.String ICON_DETAILS_SHOW
          Standard list button location.
static java.lang.String ICON_DISABLED
          Standard list button location.
static java.lang.String ICON_INACTIVE
          Standard list button location.
static java.lang.String ICON_MINUS
          Standard list button location.
static java.lang.String ICON_MULTI_ACTIVATE
          Standard list button location.
static java.lang.String ICON_MULTI_ADD
          Standard list button location.
static java.lang.String ICON_MULTI_DEACTIVATE
          Standard list button location.
static java.lang.String ICON_MULTI_DELETE
          Standard list button location.
static java.lang.String ICON_MULTI_MINUS
          Standard list button location.
static java.lang.String LIST_INDEPENDENT_ACTION
          Request parameter value for the list action: a list item independent action has been triggered.
static java.lang.String LIST_MULTI_ACTION
          Request parameter value for the list action: a multi action has been triggered.
static java.lang.String LIST_SEARCH
          Request parameter value for the list action: search/filter.
static java.lang.String LIST_SELECT_PAGE
          Request parameter value for the list action: select a page.
static java.lang.String LIST_SINGLE_ACTION
          Request parameter value for the list action: a single action has been triggered.
static java.lang.String LIST_SORT
          Request parameter value for the list action: sort.
static java.lang.String PARAM_FORMNAME
          Request parameter key for the requested page.
static java.lang.String PARAM_LIST_ACTION
          Request parameter key for the list action.
static java.lang.String PARAM_PAGE
          Request parameter key for the requested page.
static java.lang.String PARAM_SEARCH_FILTER
          Request parameter key for search the filter.
static java.lang.String PARAM_SEL_ITEMS
          Request parameter key for the selected item(s).
static java.lang.String PARAM_SORT_COL
          Request parameter key for the column to sort the list.
 
Fields inherited from class org.opencms.workplace.CmsDialog
ACTION_CANCEL, ACTION_CLOSEPOPUP, ACTION_CLOSEPOPUP_SAVE, ACTION_CONFIRMED, ACTION_CONTINUE, ACTION_DEFAULT, ACTION_LOCKS_CONFIRMED, ACTION_OK, ACTION_REPORT_BEGIN, ACTION_REPORT_END, ACTION_REPORT_UPDATE, ACTION_SET, ACTION_WAIT, ATTRIBUTE_THROWABLE, BUTTON_ADVANCED, BUTTON_BACK, BUTTON_CANCEL, BUTTON_CLOSE, BUTTON_CONTINUE, BUTTON_DETAILS, BUTTON_DISCARD, BUTTON_EDIT, BUTTON_OK, BUTTON_OK_NO_SUBMIT, BUTTON_SET, DIALOG_BACK, DIALOG_CANCEL, DIALOG_CONFIRMED, DIALOG_CONTINUE, DIALOG_INITIAL, DIALOG_LOCKS_CONFIRMED, DIALOG_OK, DIALOG_SET, DIALOG_WAIT, PARAM_ACTION, PARAM_CLOSELINK, PARAM_DIALOGTYPE, PARAM_ERRORSTACK, PARAM_FILE, PARAM_FRAMENAME, PARAM_ISPOPUP, PARAM_LOCK, PARAM_MESSAGE, PARAM_ORIGINALPARAMS, PARAM_PREACTIONDONE, PARAM_REDIRECT, PARAM_RESOURCE, PARAM_TARGET, PARAM_THREAD, PARAM_THREAD_HASNEXT, PARAM_TITLE, REPORT_BEGIN, REPORT_END, REPORT_UPDATE
 
Fields inherited from class org.opencms.workplace.tools.CmsToolDialog
PARAM_BASE, PARAM_PATH, PARAM_ROOT, PARAM_STYLE, STYLE_NEW
 
Fields inherited from class org.opencms.workplace.CmsWorkplace
DEBUG, DEFAULT_LANGUAGE, DEFAULT_LOCALE, DIALOG_PATH_COMMON, FILE_DIALOG_CLOSE, FILE_DIALOG_SCREEN_CONFIRM, FILE_DIALOG_SCREEN_ERROR, FILE_DIALOG_SCREEN_ERRORPAGE, FILE_DIALOG_SCREEN_WAIT, FILE_EXPLORER_FILELIST, FILE_REPORT_OUTPUT, HTML_END, HTML_START, PARAM_WP_EXPLORER_RESOURCE, PARAM_WP_PROJECT, PARAM_WP_SITE, PATH_DIALOGS, PATH_WORKPLACE, REQUEST_ATTRIBUTE_MULTIPART, REQUEST_ATTRIBUTE_RELOADTREE, RFS_PATH_RESOURCES, SESSION_WORKPLACE_CLASS, TEMP_FILE_PREFIX, VFS_DIR_DEFAULTBODIES, VFS_DIR_TEMPLATES, VFS_PATH_COMMONS, VFS_PATH_EDITORS, VFS_PATH_GALLERIES, VFS_PATH_LOCALES, VFS_PATH_MODULES, VFS_PATH_RESOURCES, VFS_PATH_SYSTEM, VFS_PATH_VIEWS, VFS_PATH_WORKPLACE
 
Constructor Summary
protected A_CmsListDialog(CmsJspActionElement jsp, java.lang.String listId, CmsMessageContainer listName, java.lang.String sortedColId, CmsListOrderEnum sortOrder, java.lang.String searchableColId)
          Public constructor.
 
Method Summary
 void actionDialog()
          Performs the dialog actions depending on the initialized action.
protected  java.lang.String customHtmlEnd()
          Can be overwritten to add some code after the list.
protected  java.lang.String customHtmlStart()
          Can be overwritten to add some code before the list.
 java.lang.String defaultActionHtml()
          Generates the dialog starting html code.
protected  java.lang.String defaultActionHtmlContent()
          Returns the html code for the default action content.
protected  java.lang.String defaultActionHtmlEnd()
          Generates the dialog ending html code.
protected  java.lang.String defaultActionHtmlStart()
          Generates the dialog starting html code.
 void displayDialog()
          Performs the dialog actions depending on the initialized action and displays the dialog form.
 void displayDialog(boolean writeLater)
          Performs the dialog actions depending on the initialized action and displays the dialog form if needed.
 void executeDefaultActions()
          This method execute the default actions for searching, sorting and paging.
 void executeListIndepActions()
          This method should handle the default list independent actions, by comparing getParamListAction() with the id of the action to execute.
abstract  void executeListMultiActions()
          This method should handle every defined list multi action, by comparing getParamListAction() with the id of the action to execute.
abstract  void executeListSingleActions()
          This method should handle every defined list single action, by comparing getParamListAction() with the id of the action to execute.
protected  void executeSearch()
          Filter a list, given the action is set to LIST_SEARCH and the filter text is set in the PARAM_SEARCH_FILTER parameter.
protected  void executeSelectPage()
          Select a page, given the action is set to LIST_SELECT_PAGE and the page to go to is set in the PARAM_PAGE parameter.
protected  void executeSort()
          Sort the list, given the action is set to LIST_SORT and the sort column is set in the PARAM_SORT_COL parameter.
protected abstract  void fillDetails(java.lang.String detailId)
          Lazy initialization for detail data.
protected  void fillList()
          Calls the getListItems() method and catches any exception.
 CmsHtmlList getList()
          Returns the list.
 java.lang.String getListId()
          Returns the Id of the list.
protected abstract  java.util.List getListItems()
          Should generate a list with the list items to be displayed.
static CmsHtmlList getListObject(java.lang.Class listDialog, CmsWorkplaceSettings settings)
          Returns the list object for the given list dialog, or null if no list object has been set.
protected  CmsListState getListState()
          Returns the current list state.
static CmsListMetadata getMetadata(java.lang.String listDialogName)
          Returns the list metadata object for the given dialog.
protected  CmsListMetadata getMetadata(java.lang.String listDialogName, java.lang.String listId)
          Should generate the metadata definition for the list, and return the corresponding CmsListMetadata object.
 java.lang.String getParamFormName()
          Returns the form name.
 java.lang.String getParamListAction()
          Returns the List Action.
 java.lang.String getParamPage()
          Returns the current Page.
 java.lang.String getParamSearchFilter()
          Returns the Search Filter.
 java.lang.String getParamSelItems()
          Returns the selected Items.
 java.lang.String getParamSortCol()
          Returns the sorted Column.
 CmsListItem getSelectedItem()
          Returns the current selected item.
 java.util.List getSelectedItems()
          Returns a list of current selected items.
protected  void initializeDetail(java.lang.String detailId)
          Lazy details initialization.
protected  void initWorkplaceRequestValues(CmsWorkplaceSettings settings, javax.servlet.http.HttpServletRequest request)
          Analyzes the request for workplace parameters and adjusts the workplace settings accordingly.
 boolean isActive()
          Returns the activation flag.
protected  void listRecovery(java.lang.String listId)
          Recover the last list instance that is read from the request attributes.
protected  void listSave()
          Save the state of the list in the session.
 void refreshList()
          This method re-read the rows of the list, the user should call this method after executing an action that add or remove rows to the list.
 void removeList()
          Removes the list from the workplace settings.
protected abstract  void setColumns(CmsListMetadata metadata)
          Should create the columns and add them to the given list metadata object.
protected abstract  void setIndependentActions(CmsListMetadata metadata)
          Should add the independent actions to the given list metadata object.
 void setList(CmsHtmlList list)
          Sets the list.
 void setListObject(java.lang.Class listDialog, CmsHtmlList listObject)
          Stores the given object as "list object" for the given list dialog in the current users session.
protected abstract  void setMultiActions(CmsListMetadata metadata)
          Should add the multi actions to the given list metadata object.
 void setParamFormName(java.lang.String formName)
          Sets the form name.
 void setParamListAction(java.lang.String listAction)
          Sets the List Action.
 void setParamPage(java.lang.String page)
          Sets the current Page.
 void setParamSearchFilter(java.lang.String searchFilter)
          Sets the Search Filter.
 void setParamSelItems(java.lang.String paramSelItems)
          Sets the selected Items.
 void setParamSortCol(java.lang.String sortCol)
          Sets the sorted Column.
protected  void setSearchAction(CmsListMetadata metadata, java.lang.String columnId)
          Creates the default search action.
protected  void throwListUnsupportedActionException()
          A convenient method to throw a list unsupported action runtime exception.
protected  void validateParamaters()
          Should be overridden for parameter validation.
 void writeDialog()
          Writes the dialog html code, only if the CmsDialog.ACTION_DEFAULT is set.
 
Methods inherited from class org.opencms.workplace.CmsDialog
actionCloseDialog, appendDelimiter, buildAjaxResultContainer, buildAjaxWaitMessage, buildLockAdditionalOptions, buildLockConfirmationMessageJS, buildLockDialog, buildLockDialog, buildLockHeaderBox, checkResourcePermissions, checkResourcePermissions, computeCurrentFolder, dialog, dialogBlock, dialogBlockEnd, dialogBlockStart, dialogButtonRow, dialogButtonRowEnd, dialogButtonRowStart, dialogButtons, dialogButtonsClose, dialogButtonsClose, dialogButtonsCloseDetails, dialogButtonsHtml, dialogButtonsOk, dialogButtonsOk, dialogButtonsOkCancel, dialogButtonsOkCancel, dialogButtonsOkCancelAdvanced, dialogButtonsSetOkCancel, dialogContent, dialogContentEnd, dialogContentStart, dialogEnd, dialogHead, dialogHorizontalSpacer, dialogLockButtons, dialogRow, dialogRowEnd, dialogRowStart, dialogScriptSubmit, dialogSeparator, dialogSpacer, dialogStart, dialogStart, dialogSubheadline, dialogToggleStart, dialogWhiteBox, dialogWhiteBoxEnd, dialogWhiteBoxStart, getAction, getAdministrationBackLink, getCancelAction, getDialogRealUri, getDialogUri, getOnlineHelpUriCustom, getParamAction, getParamCloseLink, getParamDialogtype, getParamFramename, getParamIsPopup, getParamMessage, getParamOriginalParams, getParamPreActionDone, getParamRedirect, getParamResource, getParamTitle, getState, hasCorrectLockstate, hasSiblings, htmlStart, htmlStart, htmlStart, htmlStartStyle, includeErrorpage, initCmsDialog, isPopup, isPreEditor, pageHtml, pageHtml, setAction, setOnlineHelpUriCustom, setParamAction, setParamCloseLink, setParamDialogtype, setParamFramename, setParamIsPopup, setParamMessage, setParamOriginalParams, setParamPreActionDone, setParamRedirect, setParamResource, setParamTitle
 
Methods inherited from class org.opencms.workplace.tools.CmsToolDialog
dialogTitle, getAdminTool, getCurrentToolPath, getParamBase, getParamPath, getParamRoot, getParamStyle, getParentPath, getToolManager, iconsBlockArea, iconsBlockAreaEnd, iconsBlockAreaStart, initAdminTool, pageBody, pageHtmlStyle, setParamBase, setParamPath, setParamRoot, setParamStyle, useNewStyle
 
Methods inherited from class org.opencms.workplace.CmsWorkplace
addMessages, addMessages, allParamsAsHidden, allParamsAsRequest, allParamValues, bodyEnd, bodyStart, bodyStart, buildSelect, buildSelect, button, button, buttonBar, buttonBar, buttonBarHorizontalLine, buttonBarLabel, buttonBarLabel, buttonBarLine, buttonBarLineSpacer, buttonBarSeparator, buttonBarSpacer, buttonBarStartTab, checkLock, checkLock, checkRole, decodeParamValue, fillParamValues, fillParamValues, getBroadcastMessageString, getCms, getEncoding, getExplorerFileListFullUri, getFrameSource, getJsp, getLocale, getMacroResolver, getMessages, getMultiPartFileItems, getParameterMap, getResourceUri, getResourceUri, getSession, getSettings, getSkinUri, getStyleUri, getStyleUri, getStyleUri, getTemporaryFileName, htmlEnd, initMessages, initSettings, initTimeWarp, initUserSettings, initWorkplaceMembers, initWorkplaceSettings, isForwarded, isHelpEnabled, isSubElement, isTemporaryFile, isTemporaryFileName, key, key, keyDefault, nullToEmpty, paramsAsHidden, paramsAsHidden, paramsAsParameterMap, paramsAsRequest, paramValues, resolveMacros, sendCmsRedirect, sendForward, setForwarded, shortKey, switchToCurrentProject, switchToTempProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_LIST_INDEPENDENT_ACTION

public static final int ACTION_LIST_INDEPENDENT_ACTION
Value for the action: execute a list item independent action of the list.

See Also:
Constant Field Values

ACTION_LIST_MULTI_ACTION

public static final int ACTION_LIST_MULTI_ACTION
Value for the action: execute an multi action of the list.

See Also:
Constant Field Values

ACTION_LIST_SEARCH

public static final int ACTION_LIST_SEARCH
Value for the action: search the list.

See Also:
Constant Field Values

ACTION_LIST_SELECT_PAGE

public static final int ACTION_LIST_SELECT_PAGE
Value for the action: go to a page.

See Also:
Constant Field Values

ACTION_LIST_SINGLE_ACTION

public static final int ACTION_LIST_SINGLE_ACTION
Value for the action: execute a single action of the list.

See Also:
Constant Field Values

ACTION_LIST_SORT

public static final int ACTION_LIST_SORT
Value for the action: sort the list.

See Also:
Constant Field Values

ICON_ACTIVE

public static final java.lang.String ICON_ACTIVE
Standard list button location.

See Also:
Constant Field Values

ICON_ADD

public static final java.lang.String ICON_ADD
Standard list button location.

See Also:
Constant Field Values

ICON_DELETE

public static final java.lang.String ICON_DELETE
Standard list button location.

See Also:
Constant Field Values

ICON_DETAILS_HIDE

public static final java.lang.String ICON_DETAILS_HIDE
Standard list button location.

See Also:
Constant Field Values

ICON_DETAILS_SHOW

public static final java.lang.String ICON_DETAILS_SHOW
Standard list button location.

See Also:
Constant Field Values

ICON_DISABLED

public static final java.lang.String ICON_DISABLED
Standard list button location.

See Also:
Constant Field Values

ICON_INACTIVE

public static final java.lang.String ICON_INACTIVE
Standard list button location.

See Also:
Constant Field Values

ICON_MINUS

public static final java.lang.String ICON_MINUS
Standard list button location.

See Also:
Constant Field Values

ICON_MULTI_ACTIVATE

public static final java.lang.String ICON_MULTI_ACTIVATE
Standard list button location.

See Also:
Constant Field Values

ICON_MULTI_ADD

public static final java.lang.String ICON_MULTI_ADD
Standard list button location.

See Also:
Constant Field Values

ICON_MULTI_DEACTIVATE

public static final java.lang.String ICON_MULTI_DEACTIVATE
Standard list button location.

See Also:
Constant Field Values

ICON_MULTI_DELETE

public static final java.lang.String ICON_MULTI_DELETE
Standard list button location.

See Also:
Constant Field Values

ICON_MULTI_MINUS

public static final java.lang.String ICON_MULTI_MINUS
Standard list button location.

See Also:
Constant Field Values

LIST_INDEPENDENT_ACTION

public static final java.lang.String LIST_INDEPENDENT_ACTION
Request parameter value for the list action: a list item independent action has been triggered.

See Also:
Constant Field Values

LIST_MULTI_ACTION

public static final java.lang.String LIST_MULTI_ACTION
Request parameter value for the list action: a multi action has been triggered.

See Also:
Constant Field Values

LIST_SEARCH

public static final java.lang.String LIST_SEARCH
Request parameter value for the list action: search/filter.

See Also:
Constant Field Values

LIST_SELECT_PAGE

public static final java.lang.String LIST_SELECT_PAGE
Request parameter value for the list action: select a page.

See Also:
Constant Field Values

LIST_SINGLE_ACTION

public static final java.lang.String LIST_SINGLE_ACTION
Request parameter value for the list action: a single action has been triggered.

See Also:
Constant Field Values

LIST_SORT

public static final java.lang.String LIST_SORT
Request parameter value for the list action: sort.

See Also:
Constant Field Values

PARAM_FORMNAME

public static final java.lang.String PARAM_FORMNAME
Request parameter key for the requested page.

See Also:
Constant Field Values

PARAM_LIST_ACTION

public static final java.lang.String PARAM_LIST_ACTION
Request parameter key for the list action.

See Also:
Constant Field Values

PARAM_PAGE

public static final java.lang.String PARAM_PAGE
Request parameter key for the requested page.

See Also:
Constant Field Values

PARAM_SEARCH_FILTER

public static final java.lang.String PARAM_SEARCH_FILTER
Request parameter key for search the filter.

See Also:
Constant Field Values

PARAM_SEL_ITEMS

public static final java.lang.String PARAM_SEL_ITEMS
Request parameter key for the selected item(s).

See Also:
Constant Field Values

PARAM_SORT_COL

public static final java.lang.String PARAM_SORT_COL
Request parameter key for the column to sort the list.

See Also:
Constant Field Values
Constructor Detail

A_CmsListDialog

protected A_CmsListDialog(CmsJspActionElement jsp,
                          java.lang.String listId,
                          CmsMessageContainer listName,
                          java.lang.String sortedColId,
                          CmsListOrderEnum sortOrder,
                          java.lang.String searchableColId)
Public constructor.

Parameters:
jsp - an initialized JSP action element
listId - the id of the displayed list
listName - the name of the list
sortedColId - the a priory sorted column
sortOrder - the order of the sorted column
searchableColId - the column to search into
Method Detail

getListObject

public static CmsHtmlList getListObject(java.lang.Class listDialog,
                                        CmsWorkplaceSettings settings)
Returns the list object for the given list dialog, or null if no list object has been set.

Parameters:
listDialog - the list dialog class
settings - the wp settings for accessing the session
Returns:
the list object for this list dialog, or null

getMetadata

public static CmsListMetadata getMetadata(java.lang.String listDialogName)
Returns the list metadata object for the given dialog.

Parameters:
listDialogName - the dialog class name
Returns:
the list metadata object

actionDialog

public void actionDialog()
                  throws javax.servlet.jsp.JspException,
                         javax.servlet.ServletException,
                         java.io.IOException
Performs the dialog actions depending on the initialized action.

Throws:
javax.servlet.jsp.JspException - if dialog actions fail
java.io.IOException - in case of errors forwarding to the required result page
javax.servlet.ServletException - in case of errors forwarding to the required result page

defaultActionHtml

public java.lang.String defaultActionHtml()
Generates the dialog starting html code.

Returns:
html code

displayDialog

public void displayDialog()
                   throws javax.servlet.jsp.JspException,
                          java.io.IOException,
                          javax.servlet.ServletException
Performs the dialog actions depending on the initialized action and displays the dialog form.

Throws:
javax.servlet.jsp.JspException - if dialog actions fail
java.io.IOException - if writing to the JSP out fails, or in case of errors forwarding to the required result page
javax.servlet.ServletException - in case of errors forwarding to the required result page

displayDialog

public void displayDialog(boolean writeLater)
                   throws javax.servlet.jsp.JspException,
                          java.io.IOException,
                          javax.servlet.ServletException
Performs the dialog actions depending on the initialized action and displays the dialog form if needed.

Parameters:
writeLater - if true no output is written, you have to call manually the defaultActionHtml() method.
Throws:
javax.servlet.jsp.JspException - if dialog actions fail
java.io.IOException - if writing to the JSP out fails, or in case of errors forwarding to the required result page
javax.servlet.ServletException - in case of errors forwarding to the required result page

executeDefaultActions

public void executeDefaultActions()
This method execute the default actions for searching, sorting and paging.


executeListIndepActions

public void executeListIndepActions()
This method should handle the default list independent actions, by comparing getParamListAction() with the id of the action to execute.

if you want to handle additional independent actions, override this method, handling your actions and FINALLY calling super.executeListIndepActions();.


executeListMultiActions

public abstract void executeListMultiActions()
                                      throws java.io.IOException,
                                             javax.servlet.ServletException,
                                             CmsRuntimeException
This method should handle every defined list multi action, by comparing getParamListAction() with the id of the action to execute.

Throws:
java.io.IOException - in case of errors when including a required sub-element
javax.servlet.ServletException - in case of errors when including a required sub-element
CmsRuntimeException - to signal that an action is not supported

executeListSingleActions

public abstract void executeListSingleActions()
                                       throws java.io.IOException,
                                              javax.servlet.ServletException,
                                              CmsRuntimeException
This method should handle every defined list single action, by comparing getParamListAction() with the id of the action to execute.

Throws:
java.io.IOException - in case of errors when including a required sub-element
javax.servlet.ServletException - in case of errors when including a required sub-element
CmsRuntimeException - to signal that an action is not supported

getList

public CmsHtmlList getList()
Returns the list.

Returns:
the list

getListId

public final java.lang.String getListId()
Returns the Id of the list.

Returns:
the list Id

getParamFormName

public java.lang.String getParamFormName()
Returns the form name.

Returns:
the form name

getParamListAction

public java.lang.String getParamListAction()
Returns the List Action.

Returns:
the List Action

getParamPage

public java.lang.String getParamPage()
Returns the current Page.

Returns:
the current Page

getParamSearchFilter

public java.lang.String getParamSearchFilter()
Returns the Search Filter.

Returns:
the Search Filter

getParamSelItems

public java.lang.String getParamSelItems()
Returns the selected Items.

Returns:
the selected Items

getParamSortCol

public java.lang.String getParamSortCol()
Returns the sorted Column.

Returns:
the sorted Column

getSelectedItem

public CmsListItem getSelectedItem()
Returns the current selected item.

Returns:
the current selected item

getSelectedItems

public java.util.List getSelectedItems()
Returns a list of current selected items.

Returns:
a list of current selected items

isActive

public boolean isActive()
Returns the activation flag.

Useful for dialogs with several lists.

Is if the original formname parameter is equals to ${listId}-form.

Returns:
the activation flag

refreshList

public void refreshList()
This method re-read the rows of the list, the user should call this method after executing an action that add or remove rows to the list.


removeList

public void removeList()
Removes the list from the workplace settings.

Next time the list is displayed the list will be reloaded.


setList

public void setList(CmsHtmlList list)
Sets the list.

Parameters:
list - the list to set

setListObject

public void setListObject(java.lang.Class listDialog,
                          CmsHtmlList listObject)
Stores the given object as "list object" for the given list dialog in the current users session.

Parameters:
listDialog - the list dialog class
listObject - the list to store

setParamFormName

public void setParamFormName(java.lang.String formName)
Sets the form name.

Parameters:
formName - the form name to set

setParamListAction

public void setParamListAction(java.lang.String listAction)
Sets the List Action.

Parameters:
listAction - the list Action to set

setParamPage

public void setParamPage(java.lang.String page)
Sets the current Page.

Parameters:
page - the current Page to set

setParamSearchFilter

public void setParamSearchFilter(java.lang.String searchFilter)
Sets the Search Filter.

Parameters:
searchFilter - the Search Filter to set

setParamSelItems

public void setParamSelItems(java.lang.String paramSelItems)
Sets the selected Items.

Parameters:
paramSelItems - the selected Items to set

setParamSortCol

public void setParamSortCol(java.lang.String sortCol)
Sets the sorted Column.

Parameters:
sortCol - the sorted Column to set

writeDialog

public void writeDialog()
                 throws java.io.IOException
Writes the dialog html code, only if the CmsDialog.ACTION_DEFAULT is set.

Throws:
java.io.IOException - if writing to the JSP out fails, or in case of errros forwarding to the required result page

customHtmlEnd

protected java.lang.String customHtmlEnd()
Can be overwritten to add some code after the list.

Returns:
custom html code

customHtmlStart

protected java.lang.String customHtmlStart()
Can be overwritten to add some code before the list.

Returns:
custom html code

defaultActionHtmlContent

protected java.lang.String defaultActionHtmlContent()
Returns the html code for the default action content.

Returns:
html code

defaultActionHtmlEnd

protected java.lang.String defaultActionHtmlEnd()
Generates the dialog ending html code.

Returns:
html code

defaultActionHtmlStart

protected java.lang.String defaultActionHtmlStart()
Generates the dialog starting html code.

Returns:
html code

executeSearch

protected void executeSearch()
Filter a list, given the action is set to LIST_SEARCH and the filter text is set in the PARAM_SEARCH_FILTER parameter.


executeSelectPage

protected void executeSelectPage()
Select a page, given the action is set to LIST_SELECT_PAGE and the page to go to is set in the PARAM_PAGE parameter.


executeSort

protected void executeSort()
Sort the list, given the action is set to LIST_SORT and the sort column is set in the PARAM_SORT_COL parameter.


fillDetails

protected abstract void fillDetails(java.lang.String detailId)
Lazy initialization for detail data.

Should fill the given detail column for every list item in CmsHtmlList.getContent() Should not throw any kind of exception.

Parameters:
detailId - the id of the detail to initialize

fillList

protected void fillList()
Calls the getListItems() method and catches any exception.


getListItems

protected abstract java.util.List getListItems()
                                        throws CmsException
Should generate a list with the list items to be displayed.

Returns:
a list of CmsListItems
Throws:
CmsException - if something goes wrong

getListState

protected CmsListState getListState()
Returns the current list state.

Returns:
the current list state

getMetadata

protected CmsListMetadata getMetadata(java.lang.String listDialogName,
                                      java.lang.String listId)
Should generate the metadata definition for the list, and return the corresponding CmsListMetadata object.

Parameters:
listDialogName - the name of the class generating the list
listId - the id of the list
Returns:
The metadata for the given list

initializeDetail

protected void initializeDetail(java.lang.String detailId)
Lazy details initialization.

Parameters:
detailId - the id of the detail column

initWorkplaceRequestValues

protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings,
                                          javax.servlet.http.HttpServletRequest request)
Description copied from class: CmsWorkplace
Analyzes the request for workplace parameters and adjusts the workplace settings accordingly.

Overrides:
initWorkplaceRequestValues in class CmsDialog
See Also:
CmsWorkplace.initWorkplaceRequestValues(org.opencms.workplace.CmsWorkplaceSettings, javax.servlet.http.HttpServletRequest)

listRecovery

protected void listRecovery(java.lang.String listId)
Recover the last list instance that is read from the request attributes.

This is required for keep the whole list in memory while you browse a page.

Parameters:
listId - the id of the expected list

listSave

protected void listSave()
Save the state of the list in the session.


setColumns

protected abstract void setColumns(CmsListMetadata metadata)
Should create the columns and add them to the given list metadata object.

This method will be just executed once, the first time the constructor is called.

Parameters:
metadata - the list metadata

setIndependentActions

protected abstract void setIndependentActions(CmsListMetadata metadata)
Should add the independent actions to the given list metadata object.

This method will be just executed once, the first time the constructor is called.

Parameters:
metadata - the list metadata

setMultiActions

protected abstract void setMultiActions(CmsListMetadata metadata)
Should add the multi actions to the given list metadata object.

This method will be just executed once, the first time the constructor is called.

Parameters:
metadata - the list metadata

setSearchAction

protected void setSearchAction(CmsListMetadata metadata,
                               java.lang.String columnId)
Creates the default search action.

Can be overridden for more sophisticated search.

Parameters:
metadata - the metadata of the list to do searchable
columnId - the if of the column to search into

throwListUnsupportedActionException

protected void throwListUnsupportedActionException()
                                            throws CmsRuntimeException
A convenient method to throw a list unsupported action runtime exception.

Should be triggered if your list implementation does not support the getParamListAction() action.

Throws:
CmsRuntimeException - always to signal that this operation is not supported

validateParamaters

protected void validateParamaters()
                           throws java.lang.Exception
Should be overridden for parameter validation.

Throws:
java.lang.Exception - if the parameters are not valid