Class WysiwygTag

java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
com.jalios.jcms.taglib.WysiwygTag
All Implemented Interfaces:
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.
Author:
Jean-Philippe Encausse
See Also:
  • Field Summary

    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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    int
     
    void
     
    void
     
    void
    setData(Data data)
     
    void
     
    void
    setTruncateLength(int truncateLength)
     
    void
    setTruncateSuffix(String truncateSuffix)
     
    static void
    wrapWysiwygInlineEdition(javax.servlet.jsp.JspWriter writer, JcmsJspContext jcmsContext, String html, Data data, 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 Details

    • WysiwygTag

      public WysiwygTag()
  • Method Details

    • setCss

      public void setCss(String css)
    • setData

      public void setData(Data data)
    • setField

      public void setField(String field)
    • setAttributeMap

      public void setAttributeMap(Map<String,Object> map)
    • setTruncateLength

      public void setTruncateLength(int truncateLength)
    • setTruncateSuffix

      public void setTruncateSuffix(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, String html, Data data, String fieldName) throws 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:
      IOException - in case html cannot be printed in writer