Class A_CmsListDialog

    • Field Summary

      Fields 
      Modifier and Type Field Description
      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 KEY_META_DATA_CACHE  
      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.
      protected boolean m_lazy
      A flag which indicates whether the list should use database paging (only supported for some lists) .
      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_ACTION_VALUE_FOR_CHANGED_INDEX, 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_ADMIN_PROJECT, PARAM_BASE, PARAM_FORCE, PARAM_PATH, PARAM_ROOT, PARAM_STYLE, STYLE_NEW
      • Fields inherited from class org.opencms.workplace.CmsWorkplace

        DEBUG, DEFAULT_DATE_STRING, 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, INPUT_DEFAULT, INPUT_NONE, JSP_WORKPLACE_URI, PARAM_DIRECTPUBLISH, PARAM_MODELFILE, PARAM_NEWRESOURCETYPE, PARAM_PUBLISHSIBLINGS, PARAM_RELATEDRESOURCES, PARAM_RESOURCELIST, PARAM_SUBRESOURCES, PARAM_WP_EXPLORER_RESOURCE, PARAM_WP_PROJECT, PARAM_WP_SITE, PARAM_WP_START, PARAM_WP_VIEW, PATH_DIALOGS, PATH_WORKPLACE, REQUEST_ATTRIBUTE_MULTIPART, REQUEST_ATTRIBUTE_RELOADTREE, RES_PATH_FILETYPES, RFS_PATH_RESOURCES, SESSION_WORKPLACE_CLASS, VFS_DIR_DEFAULTBODIES, VFS_DIR_TEMPLATES, VFS_PATH_COMMONS, VFS_PATH_EDITORS, VFS_PATH_GALLERIES, VFS_PATH_LOCALES, VFS_PATH_MODELDIALOG, VFS_PATH_MODULES, VFS_PATH_NEWRESOURCEDIALOG, VFS_PATH_RESOURCES, VFS_PATH_SITES, VFS_PATH_SYSTEM, VFS_PATH_VIEWS, VFS_PATH_WORKPLACE, VIEW_ADMIN, VIEW_DIRECT_EDIT, VIEW_EXPLORER, VIEW_GALLERY, VIEW_LIST, VIEW_WORKPLACE
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected A_CmsListDialog​(org.opencms.jsp.CmsJspActionElement jsp, java.lang.String listId, org.opencms.i18n.CmsMessageContainer listName, java.lang.String sortedColId, CmsListOrderEnum sortOrder, java.lang.String searchableColId)
      Public constructor.
      protected A_CmsListDialog​(org.opencms.jsp.CmsJspActionElement jsp, java.lang.String listId, org.opencms.i18n.CmsMessageContainer listName, java.lang.String sortedColId, CmsListOrderEnum sortOrder, java.lang.String searchableColId, boolean lazy)
      Public constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      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<CmsListItem> getListItems()
      Should generate a list with the list items to be displayed.
      static CmsHtmlList getListObject​(java.lang.Class<?> listDialog, org.opencms.workplace.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.
      CmsListMetadata getMetadata​(java.lang.String listDialogName)
      Returns the list metadata object for the given dialog.
      CmsListMetadata getMetadata​(java.lang.String listDialogName, java.lang.String listId)
      Should generate the metadata definition for the list, and return the corresponding CmsListMetadata object.
      protected java.util.Map<java.lang.String,​CmsListMetadata> getMetadataCache()
      Gets the list metadata cache.
      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<CmsListItem> getSelectedItems()
      Returns a list of current selected items.
      protected void initializeDetail​(java.lang.String detailId)
      Lazy details initialization.
      protected void initWorkplaceRequestValues​(org.opencms.workplace.CmsWorkplaceSettings settings, javax.servlet.http.HttpServletRequest request)  
      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, 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, openLaunchpad, openWorkplaceLink, pageHtml, pageHtml, setAction, setOnlineHelpUriCustom, setParamAction, setParamCloseLink, setParamDialogtype, setParamFramename, setParamIsPopup, setParamMessage, setParamOriginalParams, setParamPreActionDone, setParamRedirect, setParamResource, setParamTitle
      • Methods inherited from class org.opencms.workplace.tools.CmsToolDialog

        computeUpLevelLink, dialogTitle, getAdminTool, getCurrentToolPath, getParamBase, getParamForce, getParamPath, getParamRoot, getParamStyle, getParentPath, getToolManager, iconsBlockArea, iconsBlockAreaEnd, iconsBlockAreaStart, initAdminTool, pageBody, pageHtmlStyle, setParamBase, setParamForce, 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, canEditPermissionsForRoles, checkLock, checkLock, checkRole, decodeParamValue, fillParamValues, fillParamValues, generateCssStyle, generatePageEndExtended, generatePageEndSimple, generatePageStartExtended, generatePageStartSimple, getBroadcastMessageString, getCms, getEncoding, getExplorerFileListFullUri, getFrameSource, getJsp, getLocale, getMacroResolver, getMessages, getMultiPartFileItems, getParameterMap, getResourceUri, getResourceUri, getSession, getSettings, getSkinUri, getStartSiteRoot, getStartSiteRoot, getStaticResourceUri, getStaticResourceUri, getStyleUri, getStyleUri, getStyleUri, getTemporaryFileName, getWorkplaceExplorerLink, getWorkplaceExplorerLink, getWorkplaceSettings, htmlEnd, initMessages, initSettings, initTimeWarp, initUserSettings, initWorkplaceMembers, initWorkplaceMembers, initWorkplaceSettings, isForwarded, isHelpEnabled, isSubElement, isTemporaryFile, key, key, keyDefault, nullToEmpty, paramsAsHidden, paramsAsHidden, paramsAsParameterMap, paramsAsRequest, paramValues, resolveMacros, sendCmsRedirect, sendForward, setForwarded, shortKey, substituteSiteTitle, substituteSiteTitleStatic, switchToCurrentProject, switchToTempProject, updateUserPreferences
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • A_CmsListDialog

        protected A_CmsListDialog​(org.opencms.jsp.CmsJspActionElement jsp,
                                  java.lang.String listId,
                                  org.opencms.i18n.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
      • A_CmsListDialog

        protected A_CmsListDialog​(org.opencms.jsp.CmsJspActionElement jsp,
                                  java.lang.String listId,
                                  org.opencms.i18n.CmsMessageContainer listName,
                                  java.lang.String sortedColId,
                                  CmsListOrderEnum sortOrder,
                                  java.lang.String searchableColId,
                                  boolean lazy)
        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
        lazy - if this parameter is true, the list should load only load the list items of the current page, if possible
    • Method Detail

      • getListObject

        public static CmsHtmlList getListObject​(java.lang.Class<?> listDialog,
                                                org.opencms.workplace.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
      • 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,
                                                     org.opencms.main.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
        org.opencms.main.CmsRuntimeException - to signal that an action is not supported
      • executeListSingleActions

        public abstract void executeListSingleActions()
                                               throws java.io.IOException,
                                                      javax.servlet.ServletException,
                                                      org.opencms.main.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
        org.opencms.main.CmsRuntimeException - to signal that an action is not supported
      • getListId

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

        Returns:
        the list Id
      • getMetadata

        public 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
      • getMetadata

        public 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
      • 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
      • getSelectedItems

        public java.util.List<CmsListItemgetSelectedItems()
        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
      • getListItems

        protected abstract java.util.List<CmsListItemgetListItems()
                                                             throws org.opencms.main.CmsException
        Should generate a list with the list items to be displayed.

        Returns:
        a list of CmsListItems
        Throws:
        org.opencms.main.CmsException - if something goes wrong
      • getMetadataCache

        protected java.util.Map<java.lang.String,​CmsListMetadatagetMetadataCache()
        Gets the list metadata cache.

        Returns:
        the list metadata cache
      • initializeDetail

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

        Parameters:
        detailId - the id of the detail column
      • initWorkplaceRequestValues

        protected void initWorkplaceRequestValues​(org.opencms.workplace.CmsWorkplaceSettings settings,
                                                  javax.servlet.http.HttpServletRequest request)
        Overrides:
        initWorkplaceRequestValues in class org.opencms.workplace.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 org.opencms.main.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:
        org.opencms.main.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