Class WysiwygTag

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

    public class WysiwygTag
    extends javax.servlet.jsp.tagext.BodyTagSupport
    This tag wysiwyg generated code.
    Version:
    $Revision: 136220 $
    Author:
    Jean-Philippe Encausse
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String REVISION  
      • Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport

        bodyContent
      • Fields inherited from class javax.servlet.jsp.tagext.TagSupport

        id, pageContext
      • Fields inherited from interface javax.servlet.jsp.tagext.BodyTag

        EVAL_BODY_BUFFERED, EVAL_BODY_TAG
      • Fields inherited from interface javax.servlet.jsp.tagext.IterationTag

        EVAL_BODY_AGAIN
      • Fields inherited from interface javax.servlet.jsp.tagext.Tag

        EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
    • Constructor Summary

      Constructors 
      Constructor Description
      WysiwygTag()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void clean()  
      int doAfterBody()  
      void setAttributeMap​(java.util.Map<java.lang.String,​java.lang.Object> map)  
      void setCss​(java.lang.String css)  
      void setData​(Data data)  
      void setField​(java.lang.String field)  
      void setTruncateLength​(int truncateLength)  
      void setTruncateSuffix​(java.lang.String truncateSuffix)  
      static void wrapWysiwygInlineEdition​(javax.servlet.jsp.JspWriter writer, JcmsJspContext jcmsContext, java.lang.String html, Data data, java.lang.String fieldName)
      Print the specified HTML in the JspWriter, wrapped with the required HTML to provide inline edition of the corresponding field, if authorized for the current logged member and specified field option.
      • Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport

        doEndTag, doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContent
      • Methods inherited from class javax.servlet.jsp.tagext.TagSupport

        findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.servlet.jsp.tagext.Tag

        getParent, setPageContext, setParent
    • Constructor Detail

      • WysiwygTag

        public WysiwygTag()
    • Method Detail

      • setCss

        public void setCss​(java.lang.String css)
      • setData

        public void setData​(Data data)
      • setField

        public void setField​(java.lang.String field)
      • setAttributeMap

        public void setAttributeMap​(java.util.Map<java.lang.String,​java.lang.Object> map)
      • setTruncateLength

        public void setTruncateLength​(int truncateLength)
      • setTruncateSuffix

        public void setTruncateSuffix​(java.lang.String truncateSuffix)
      • clean

        protected void clean()
      • doAfterBody

        public int doAfterBody()
                        throws javax.servlet.jsp.JspException
        Specified by:
        doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
        Overrides:
        doAfterBody in class javax.servlet.jsp.tagext.BodyTagSupport
        Throws:
        javax.servlet.jsp.JspException
      • wrapWysiwygInlineEdition

        public static void wrapWysiwygInlineEdition​(javax.servlet.jsp.JspWriter writer,
                                                    JcmsJspContext jcmsContext,
                                                    java.lang.String html,
                                                    Data data,
                                                    java.lang.String fieldName)
                                             throws java.io.IOException
        Print the specified HTML in the JspWriter, wrapped with the required HTML to provide inline edition of the corresponding field, if authorized for the current logged member and specified field option.

        In current implementation, authorization to "inline edit" an field is granted if :

        • Member is authorized to work on specified data
        • Valid TypeFieldEntry is found for specified field name
        • Field is declared as wiki or wysiwyg
        • Field is NOT multivalued (I18N field are authorized)
        Parameters:
        writer - the current JspWriter in which to output the wysiwyg (required, must not be null)
        jcmsContext - the current JcmsJspContext (required, must not be null)
        html - the html output
        data - the data for which the html is being is being printed
        fieldName - the name of the field for which the html is being printed
        Throws:
        java.io.IOException - in case html cannot be printed in writer