Package com.jalios.jcms.taglib
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
bodyContentFields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAGFields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclean()intvoidsetAttributeMap(Map<String, Object> map) voidvoidvoidvoidsetTruncateLength(int truncateLength) voidsetTruncateSuffix(String truncateSuffix) static voidwrapWysiwygInlineEdition(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, setBodyContentMethods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
-
Constructor Details
-
WysiwygTag
public WysiwygTag()
-
-
Method Details
-
setCss
-
setData
-
setField
-
setAttributeMap
-
setTruncateLength
public void setTruncateLength(int truncateLength) -
setTruncateSuffix
-
clean
protected void clean() -
doAfterBody
public int doAfterBody() throws javax.servlet.jsp.JspException- Specified by:
doAfterBodyin interfacejavax.servlet.jsp.tagext.IterationTag- Overrides:
doAfterBodyin classjavax.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 outputdata- the data for which the html is being is being printedfieldName- the name of the field for which the html is being printed- Throws:
IOException- in case html cannot be printed in writer
-