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
    • Constructor Detail

      • 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 Detail

      • computeElements

        public static java.util.List<CmsDialogElementcomputeElements​(CmsObject cms,
                                                                       CmsXmlPage xmlPage,
                                                                       java.lang.String xmlPageUri,
                                                                       java.util.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 java.util.List<CmsDialogElementcomputeElements​(CmsObject cms,
                                                                       java.lang.String xmlPageUri,
                                                                       java.util.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

        public java.lang.String buildElementList()
        Builds the html String for a form list of all possible page elements.

        Returns:
        the html String for a form list
      • computeElements

        public java.util.List<CmsDialogElementcomputeElements()
        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

        public java.lang.String getChangeElement()
        Returns the element name that has to be changed.

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

        public java.util.Locale getElementLocale()
        Returns the current element locale.

        Returns:
        the current element locale
      • getParamElementlanguage

        public java.lang.String getParamElementlanguage()
        Returns the current element language.

        Returns:
        the current element language
      • getParamElementname

        public java.lang.String getParamElementname()
        Returns the current element name.

        Returns:
        the current element name
      • getParamTempfile

        public java.lang.String getParamTempfile()
        Returns the name of the temporary file.

        Returns:
        the name of the temporary file
      • setParamElementlanguage

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

        Parameters:
        elementLanguage - the current element language
      • setParamElementname

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

        Parameters:
        elementName - the current element name
      • setParamTempfile

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

        Parameters:
        fileName - the name of the temporary file