/** * @see javax.servlet.jsp.tagext.Tag#doStartTag() */ @Override public int doStartTag() throws CmsIllegalArgumentException { CmsObject cms = getCmsObject(); m_isEditOpen = insertDirectEditStart( cms, pageContext, getResourceToEdit(cms), m_canCreate || (null != m_createType), m_canDelete, m_createType, m_creationSiteMap, m_postCreateHandler); return EVAL_BODY_INCLUDE; }
/** * Creates the String specifying where which type of resource has to be created.<p> * * @param cms the CMS context * @param resType the resource type to create * @param creationSitemap the creation sitemap parameter * * @return The String identifying which type of resource has to be created where.<p> * * @see #createResource(CmsObject, String, Locale, String, String, String, String) */ private static String getNewLink(CmsObject cms, I_CmsResourceType resType, String creationSitemap) { String contextPath = getContextRootPath(cms, creationSitemap); StringBuffer newLink = new StringBuffer(NEW_LINK_IDENTIFIER); newLink.append('|'); newLink.append(contextPath); newLink.append('|'); newLink.append(resType.getTypeName()); return newLink.toString(); }
/** * @see javax.servlet.jsp.tagext.BodyTagSupport#doEndTag() */ @Override public int doEndTag() throws JspException { if (m_isEditOpen) { CmsJspTagEditable.endDirectEdit(pageContext); } release(); return EVAL_PAGE; }
I_CmsResourceType resType = getResourceType(resource, createType); if (resType != null) { newLink = getNewLink(cms, resType, creationSitemap); I_CmsResourceType resType = getResourceType(null, createType); if (resType != null) { editParams = new CmsDirectEditParams( CmsDirectEditButtonSelection.NEW, null, getNewLink(cms, resType, creationSitemap));
request.setAttribute(I_CmsDirectEditProvider.ATTRIBUTE_DIRECT_EDIT_PROVIDER, eb); openedEditable = CmsJspTagEdit.insertDirectEditStart( cms, context, CmsJspTagEdit.insertDirectEditEnd(context);
if ((null != newLink) && newLink.startsWith(CmsJspTagEdit.NEW_LINK_IDENTIFIER)) { newFileName = CmsJspTagEdit.createResource( getCmsObject(), newLink,