Class CmsDialogElements


public class CmsDialogElements extends CmsDialog
Provides methods for the editor elements dialog.

The following files use this class:

  • /jsp/editors/dialogs/elements.html

Since:
6.0.0
  • Field Details

  • Constructor Details

    • CmsDialogElements

      Public constructor.

      Parameters:
      jsp - an initialized JSP action element
    • CmsDialogElements

      public CmsDialogElements(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
      Public constructor with JSP variables.

      Parameters:
      context - the JSP page context
      req - the JSP request
      res - the JSP response
  • Method Details

    • computeElements

      public static List<CmsDialogElement> computeElements(CmsObject cms, CmsXmlPage xmlPage, String xmlPageUri, Locale locale)
      Creates a list of possible elements of a template from the template property "template-elements" and the elements available in the provided xmlPage.

      Parameters:
      cms - the CmsObject
      xmlPage - the resource to read the elements from
      xmlPageUri - the URI of the resource to read the template property from
      locale - the current element locale
      Returns:
      the list of elements in a String array with element name, nice name (if present) and mandatory flag
    • computeElements

      public static List<CmsDialogElement> computeElements(CmsObject cms, String xmlPageUri, Locale locale)
      Creates a list of possible elements of a template from the template property "template-elements" and the elements available in the provided resource file.

      Parameters:
      cms - the CmsObject
      xmlPageUri - the resource to read the elements from
      locale - the current element locale
      Returns:
      the list of elements in a String array with element name, nice name (if present) and mandatory flag
    • actionUpdateElements

      public void actionUpdateElements() throws javax.servlet.jsp.JspException
      Updates the enabled/diabled status of all elements of the current page.

      Throws:
      javax.servlet.jsp.JspException - if there is an error including the error page
    • buildElementList

      Builds the html String for a form list of all possible page elements.

      Returns:
      the html String for a form list
    • computeElements

      Creates a list of possible elements of a template from the template property "template-elements".

      Returns:
      the list of elements in a String array with element name, nice name (if present) and mandatory flag
    • getChangeElement

      Returns the element name that has to be changed.

      Returns:
      the element name that has to be changed
    • getElementLocale

      Returns the current element locale.

      Returns:
      the current element locale
    • getParamElementlanguage

      Returns the current element language.

      Returns:
      the current element language
    • getParamElementname

      Returns the current element name.

      Returns:
      the current element name
    • getParamTempfile

      Returns the name of the temporary file.

      Returns:
      the name of the temporary file
    • setParamElementlanguage

      public void setParamElementlanguage(String elementLanguage)
      Sets the current element language.

      Parameters:
      elementLanguage - the current element language
    • setParamElementname

      public void setParamElementname(String elementName)
      Sets the current element name.

      Parameters:
      elementName - the current element name
    • setParamTempfile

      public void setParamTempfile(String fileName)
      Sets the name of the temporary file.

      Parameters:
      fileName - the name of the temporary file
    • 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
      Parameters:
      settings - the workplace settings
      request - the current request
      See Also: