Class EditTag

  • All Implemented Interfaces:
    JcmsConstants, JaliosConstants, 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 EditTag
    extends javax.servlet.jsp.tagext.BodyTagSupport
    implements JcmsConstants
    This tag prints a small edit icons beside a given Publication object (to update it) or Publication class (to add a new instance).
    Author:
    Olivier Dedieu
    See Also:
    Serialized Form
    • Field Detail

      • EDITTAG_COUNTER

        public static final java.lang.String EDITTAG_COUNTER
        Session attribute used to generate unique contextual menu id accross all request of a session (needed when loading ctxmenu through ajax).
      • ICON_UPDATE_FIELD

        public static final java.lang.String ICON_UPDATE_FIELD
        See Also:
        Constant Field Values
      • JCMS_EDIT_TAG_CSS

        public static final java.lang.String JCMS_EDIT_TAG_CSS
        See Also:
        Constant Field Values
      • channel

        protected Channel channel
      • data

        protected Data data
      • target

        protected java.lang.String target
      • redirect

        protected java.lang.String redirect
      • redirectOnClosePopup

        protected boolean redirectOnClosePopup
      • params

        protected java.lang.String params
      • queryString

        protected java.lang.String queryString
      • cids

        protected java.lang.String cids
      • layerId

        protected java.lang.String layerId
      • typeSet

        protected java.util.Set<java.lang.Class<?>> typeSet
      • usage

        protected java.lang.String usage
      • popupContentTabOnly

        protected boolean popupContentTabOnly
      • fields

        protected java.lang.String[] fields
      • oneField

        protected boolean oneField
      • customIcon

        protected java.lang.String customIcon
      • customTitle

        protected java.lang.String customTitle
      • openTab

        protected int openTab
      • ctxEdit

        protected boolean ctxEdit
      • bodyText

        protected java.lang.String bodyText
      • parentData

        protected TreeNode parentData
      • ctxMenuText

        protected java.lang.String ctxMenuText
      • css

        protected java.lang.String css
      • editWorkspace

        protected Workspace editWorkspace
      • customBodyText

        protected java.lang.String customBodyText
      • preferedUsage

        protected java.lang.String[] preferedUsage
    • Constructor Detail

      • EditTag

        public EditTag()
    • Method Detail

      • setData

        public void setData​(Data data)
      • setId

        public void setId​(java.lang.String id)
        Overrides:
        setId in class javax.servlet.jsp.tagext.TagSupport
      • setQuerystring

        public void setQuerystring​(java.lang.String qs)
      • setType

        public void setType​(java.lang.String type)
      • setCids

        public void setCids​(java.lang.String cidsStr)
      • setTarget

        public void setTarget​(java.lang.String target)
      • setRedirect

        public void setRedirect​(java.lang.String redirect)
      • setParentData

        public void setParentData​(TreeNode parentData)
      • setEditWorkspace

        public void setEditWorkspace​(Workspace editWorkspace)
      • setRedirectOnClosePopup

        public final void setRedirectOnClosePopup​(boolean redirectOnClosePopup)
        Set whether the redirect value should be applied to the opener when closing the popup edition.
        The value set by this method will be used only when using popup edition (setPopup(boolean)).
        Parameters:
        redirectOnClosePopup - if true, the redirect value (setRedirect(String)) will be provided to closePopup.jsp to redirect the opener. if false, the popup will simply be closed and the opener refreshed.
        Since:
        jcms-5.7.4
      • setParams

        public void setParams​(java.lang.String params)
      • setLayerId

        public void setLayerId​(java.lang.String layerId)
      • setTypeSet

        public void setTypeSet​(java.util.Set<java.lang.Class<?>> typeSet)
      • setPopup

        public void setPopup​(boolean popup)
      • setContentOnly

        public void setContentOnly​(boolean popupContentTabOnly)
      • setFields

        public void setFields​(java.lang.String fieldsStr)
      • setIcon

        public void setIcon​(java.lang.String customIcon)
      • setIconTitle

        public void setIconTitle​(java.lang.String customTitle)
      • setOpenTab

        public void setOpenTab​(int openTab)
      • setCtxEdit

        public void setCtxEdit​(boolean ctxEdit)
      • setCtxMenuText

        public void setCtxMenuText​(java.lang.String ctxMenuText)
      • setCss

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

        public void setCustomBodyText​(java.lang.String customBodyText)
      • clean

        protected void clean()
      • getAnchorParams

        protected java.lang.String getAnchorParams​(JcmsJspContext jcmsContext,
                                                   java.util.Set<Category> categorySet)
      • computeCategoryAndTypeSet

        protected java.util.Set<Category> computeCategoryAndTypeSet​(QueryHandler qh)
      • generateUpdateIcon

        protected void generateUpdateIcon​(JcmsJspContext jcmsContext,
                                          java.lang.String anchorParam,
                                          Data data,
                                          java.lang.StringBuffer sb)
      • generateAddIcon

        protected java.lang.String generateAddIcon​(java.lang.Class clazz,
                                                   Workspace ws,
                                                   Member loggedMember,
                                                   java.util.Map<java.lang.String,​?> canPublishContextMap,
                                                   java.lang.String anchorParam,
                                                   java.lang.String userLang,
                                                   java.lang.String contextPath,
                                                   boolean withLabel,
                                                   boolean addCss,
                                                   boolean addBodyText)
      • generateAddIcon

        public java.lang.String generateAddIcon​(java.lang.Class clazz,
                                                Workspace ws,
                                                Member loggedMember,
                                                java.util.Map<java.lang.String,​?> canPublishContextMap,
                                                java.lang.String anchorParam,
                                                java.lang.String userLang,
                                                java.lang.String contextPath,
                                                boolean withLabel,
                                                boolean addCss)
      • generateAddIconWithLabel

        public java.lang.String generateAddIconWithLabel​(java.lang.Class clazz,
                                                         Workspace ws,
                                                         java.lang.String userLang,
                                                         Member loggedMember,
                                                         boolean popup,
                                                         java.util.Set<Category> categorySet)
      • 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
      • doEndTag

        public int doEndTag()
                     throws javax.servlet.jsp.JspException
        Specified by:
        doEndTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
        Throws:
        javax.servlet.jsp.JspException
      • getAddIcon

        public static java.lang.String getAddIcon​(JcmsJspContext context,
                                                  java.lang.String queryString,
                                                  java.util.Set<java.lang.Class<?>> typeSet,
                                                  java.lang.String cids,
                                                  boolean popup,
                                                  java.lang.String redirect,
                                                  java.lang.String param,
                                                  java.lang.String layerId)
      • getEditIcon

        public static java.lang.String getEditIcon​(JcmsJspContext context,
                                                   java.lang.String id,
                                                   java.lang.String redirect,
                                                   java.lang.String param,
                                                   boolean popup,
                                                   java.lang.String fields)
      • getEditIcon

        public static void getEditIcon​(java.lang.String id,
                                       java.lang.String contextPath,
                                       java.lang.String userLang,
                                       java.lang.String usage,
                                       java.lang.String target,
                                       java.lang.String icon,
                                       java.lang.String iconTitle,
                                       java.lang.String text,
                                       java.lang.String anchor,
                                       java.lang.String ctxClass,
                                       boolean editLink,
                                       java.lang.StringBuffer sb,
                                       java.lang.String css,
                                       java.lang.String[] fields)
      • setUsage

        public void setUsage​(java.lang.String usage)
      • setPreferedUsage

        public void setPreferedUsage​(java.lang.String[] preferedUsage)