com.jalios.jcms.taglib
Class EditTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by com.jalios.jcms.taglib.EditTag
All Implemented Interfaces:
JcmsConstants, JaliosConstants, 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).

Version:
$Revision: 57876 $
Author:
Olivier Dedieu
See Also:
Serialized Form

Field Summary
protected static boolean alwaysCtxEdit
           
protected  String bodyText
           
protected  Channel channel
           
protected  String cids
           
protected  boolean ctxEdit
           
protected  String ctxMenuText
           
protected  String customCtxClass
           
protected  String customIcon
           
protected  String customTitle
           
protected  Data data
           
static String EDITTAG_COUNTER
          Session attribute used to generate unique contextual menu id accross all request of a session (needed when loading ctxmenu through ajax).
protected  String[] fields
           
static String ICON_ADD
           
static String ICON_ADD_DROPDOWN
           
static String ICON_CTXMENU
           
static String ICON_PAGE
           
static String ICON_UPDATE
           
static String ICON_UPDATE_FIELD
           
static String ICON_UPLOAD
           
protected  String layerId
           
protected  boolean oneField
           
protected  int openTab
           
protected  String params
           
protected  TreeNode parentData
           
static int POPUP_HEIGHT
           
static int POPUP_WIDTH
           
protected  boolean popupContentTabOnly
           
protected  String queryString
           
protected  String redirect
           
protected  boolean redirectOnClosePopup
           
static String REVISION
           
protected  String target
           
protected  Set<Class<?>> typeSet
           
protected  String usage
           
 
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 com.jalios.jcms.JcmsConstants
ADATE_SEARCH, ADMIN_NOTES_PROP, ADVANCED_TAB, ARCHIVES_DIR, ASCII_WIDTH, CATEGORY_TAB, CDATE_SEARCH, COMMON_ALARM, CONTENT_TAB, COOKIE_MAX_AGE, CTRL_TOPIC_INTERNAL, CTRL_TOPIC_REF, CTRL_TOPIC_VALUE, CTRL_TOPIC_WRITE, CUSTOM_PROP, DOCCHOOSER_HEIGHT, DOCCHOOSER_WIDTH, DOCS_DIR, EDATE_SEARCH, EMAIL_REGEXP, ERROR_MSG, FORBIDDEN_FILE_ACCESS, FORBIDDEN_REDIRECT, FORCE_REDIRECT, ICON_ARCHIVE, ICON_LOCK, ICON_LOCK_STRONG, ICON_WARN, ICON_WH_BOOK_CLOSED, ICON_WH_BOOK_OPEN, INFORMATION_MSG, JALIOS_JUNIT_PROP, JCMS_CADDY, JCMS_MSG_LIST, JSYNC_DOWNLOAD_DIR, JSYNC_SYNC_ALARM, LOG_FILE, LOG_TOPIC_SECURITY, LOGGER_PROP, LOGGER_XMLPROP, MBR_PHOTO_DIR, MDATE_SEARCH, MONITOR_XML, OP_CREATE, OP_DEEP_COPY, OP_DEEP_DELETE, OP_DELETE, OP_MERGE, OP_UPDATE, PDATE_SEARCH, PHOTO_DIR, PHOTO_ICON, PHOTO_ICON_HEIGHT, PHOTO_ICON_WIDTH, PHOTO_LARGE, PHOTO_LARGE_HEIGHT, PHOTO_LARGE_WIDTH, PHOTO_NORMAL, PHOTO_NORMAL_HEIGHT, PHOTO_NORMAL_WIDTH, PHOTO_SMALL, PHOTO_SMALL_HEIGHT, PHOTO_SMALL_WIDTH, PHOTO_TINY, PHOTO_TINY_HEIGHT, PHOTO_TINY_WIDTH, PREVIOUS_TAB, PRINT_VIEW, PRIVATE_FILE_ACCESS, PUBLIC_FILE_ACCESS, READ_RIGHT_TAB, SDATE_SEARCH, SEARCHENGINE_ALARM, SESSION_AUTHORIZED_FILENAMES_SET, STATS_REPORT_DIR, STATUS_PROP, STORE_XML, TEMPLATE_TAB, THUMBNAIL_LARGE_HEIGHT, THUMBNAIL_LARGE_WIDTH, THUMBNAIL_SMALL_HEIGHT, THUMBNAIL_SMALL_WIDTH, UDATE_SEARCH, UPDATE_RIGHT_TAB, UPLOAD_DIR, URL_REGEXP, WARNING_MSG, WEBAPP_PROP, WFEXPRESS_ALARM, WFREMINDER_ALARM, WORKFLOW_TAB, WORKFLOW_XML
 
Fields inherited from interface com.jalios.util.JaliosConstants
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR
 
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
EditTag()
           
 
Method Summary
protected  boolean canEditData(Data data, Member loggedMember, JcmsJspContext jcmsContext)
           
protected  void clean()
           
protected  Set<Category> computeCategoryAndTypeSet()
           
 int doAfterBody()
           
 int doEndTag()
           
protected  String generateAddIcon(Class clazz, Workspace ws, Member loggedMember, String anchorParam, String userLang, String contextPath, TreeNode parent, boolean withLabel)
           
protected  void generateUpdateIcon(JcmsJspContext jcmsContext, String anchorParam, Data data, StringBuffer sb)
           
static String getAddIcon(JcmsJspContext context, String queryString, Set<Class<?>> typeSet, String cids, boolean popup, String redirect, String param, String layerId)
           
protected  String getAnchorParams(JcmsJspContext jcmsContext, Set<Category> categorySet)
           
static String getEditIcon(JcmsJspContext context, String id, String redirect, String param, boolean popup, String fields)
           
static void getEditIcon(String id, String contextPath, String userLang, String usage, String target, String icon, String iconTitle, String text, String anchor, String ctxClass, boolean editLink, StringBuffer sb)
           
 void setCids(String cidsStr)
           
 void setContentOnly(boolean popupContentTabOnly)
           
 void setCtxEdit(boolean ctxEdit)
           
 void setCtxMenuText(String ctxMenuText)
           
 void setCustomCtxClass(String customCtxClass)
           
 void setData(Data data)
           
 void setFields(String fieldsStr)
           
 void setIcon(String customIcon)
           
 void setIconTitle(String customTitle)
           
 void setId(String id)
           
 void setLayerId(String layerId)
           
 void setOpenTab(int openTab)
           
 void setParams(String params)
           
 void setParentData(TreeNode parentData)
           
 void setPopup(boolean popup)
           
 void setPub(Publication pub)
           
 void setQuerystring(String qs)
           
 void setRedirect(String redirect)
           
 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)).
 void setTarget(String target)
           
 void setType(String type)
           
 void setTypeSet(Set<Class<?>> typeSet)
           
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, 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
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values

EDITTAG_COUNTER

public static final 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_ADD

public static final String ICON_ADD
See Also:
Constant Field Values

ICON_ADD_DROPDOWN

public static final String ICON_ADD_DROPDOWN
See Also:
Constant Field Values

ICON_UPLOAD

public static final String ICON_UPLOAD
See Also:
Constant Field Values

ICON_UPDATE

public static final String ICON_UPDATE
See Also:
Constant Field Values

ICON_PAGE

public static final String ICON_PAGE
See Also:
Constant Field Values

ICON_UPDATE_FIELD

public static final String ICON_UPDATE_FIELD
See Also:
Constant Field Values

ICON_CTXMENU

public static final String ICON_CTXMENU
See Also:
Constant Field Values

alwaysCtxEdit

protected static boolean alwaysCtxEdit

POPUP_WIDTH

public static final int POPUP_WIDTH
See Also:
Constant Field Values

POPUP_HEIGHT

public static final int POPUP_HEIGHT
See Also:
Constant Field Values

channel

protected Channel channel

data

protected Data data

target

protected String target

redirect

protected String redirect

redirectOnClosePopup

protected boolean redirectOnClosePopup

params

protected String params

queryString

protected String queryString

cids

protected String cids

layerId

protected String layerId

typeSet

protected Set<Class<?>> typeSet

usage

protected String usage

popupContentTabOnly

protected boolean popupContentTabOnly

fields

protected String[] fields

oneField

protected boolean oneField

customIcon

protected String customIcon

customTitle

protected String customTitle

openTab

protected int openTab

ctxEdit

protected boolean ctxEdit

bodyText

protected String bodyText

parentData

protected TreeNode parentData

customCtxClass

protected String customCtxClass

ctxMenuText

protected String ctxMenuText
Constructor Detail

EditTag

public EditTag()
Method Detail

setData

public void setData(Data data)

setPub

public void setPub(Publication pub)

setId

public void setId(String id)
Overrides:
setId in class javax.servlet.jsp.tagext.TagSupport

setQuerystring

public void setQuerystring(String qs)

setType

public void setType(String type)

setCids

public void setCids(String cidsStr)

setTarget

public void setTarget(String target)

setRedirect

public void setRedirect(String redirect)

setParentData

public void setParentData(TreeNode parentData)

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(String params)

setLayerId

public void setLayerId(String layerId)

setTypeSet

public void setTypeSet(Set<Class<?>> typeSet)

setPopup

public void setPopup(boolean popup)

setContentOnly

public void setContentOnly(boolean popupContentTabOnly)

setFields

public void setFields(String fieldsStr)

setIcon

public void setIcon(String customIcon)

setIconTitle

public void setIconTitle(String customTitle)

setOpenTab

public void setOpenTab(int openTab)

setCtxEdit

public void setCtxEdit(boolean ctxEdit)

setCustomCtxClass

public void setCustomCtxClass(String customCtxClass)

setCtxMenuText

public void setCtxMenuText(String ctxMenuText)

clean

protected void clean()

getAnchorParams

protected String getAnchorParams(JcmsJspContext jcmsContext,
                                 Set<Category> categorySet)

computeCategoryAndTypeSet

protected Set<Category> computeCategoryAndTypeSet()

canEditData

protected boolean canEditData(Data data,
                              Member loggedMember,
                              JcmsJspContext jcmsContext)

generateUpdateIcon

protected void generateUpdateIcon(JcmsJspContext jcmsContext,
                                  String anchorParam,
                                  Data data,
                                  StringBuffer sb)

generateAddIcon

protected String generateAddIcon(Class clazz,
                                 Workspace ws,
                                 Member loggedMember,
                                 String anchorParam,
                                 String userLang,
                                 String contextPath,
                                 TreeNode parent,
                                 boolean withLabel)

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 String getAddIcon(JcmsJspContext context,
                                String queryString,
                                Set<Class<?>> typeSet,
                                String cids,
                                boolean popup,
                                String redirect,
                                String param,
                                String layerId)

getEditIcon

public static String getEditIcon(JcmsJspContext context,
                                 String id,
                                 String redirect,
                                 String param,
                                 boolean popup,
                                 String fields)

getEditIcon

public static void getEditIcon(String id,
                               String contextPath,
                               String userLang,
                               String usage,
                               String target,
                               String icon,
                               String iconTitle,
                               String text,
                               String anchor,
                               String ctxClass,
                               boolean editLink,
                               StringBuffer sb)


Copyright © 2001-2010 Jalios SA. All Rights Reserved.