/** * Closes the current direct edit element.<p> * * @param context the current JSP page context * * @throws JspException in case something goes wrong */ public static void endDirectEdit(PageContext context) throws JspException { // get the direct edit bean from the context I_CmsDirectEditProvider eb = getDirectEditProvider(context); if (eb != null) { // the direct edit bean must be available eb.insertDirectEditEnd(context); } }
I_CmsDirectEditProvider eb = getDirectEditProvider(context); if (eb == null) { if (CmsStringUtil.isNotEmpty(fileName) && CmsStringUtil.isEmpty(provider)) {
/** * Closes the current direct edit element.<p> * * @param context the current JSP page context * * @throws JspException in case something goes wrong */ public static void endDirectEdit(PageContext context) throws JspException { // get the direct edit bean from the context I_CmsDirectEditProvider eb = getDirectEditProvider(context); if (eb != null) { // the direct edit bean must be available eb.insertDirectEditEnd(context); } }
I_CmsDirectEditProvider eb = getDirectEditProvider(context); if (eb == null) { if (CmsStringUtil.isNotEmpty(fileName) && CmsStringUtil.isEmpty(provider)) {
I_CmsDirectEditProvider eb = getDirectEditProvider(pageContext);
/** * Includes the "direct edit" start element that adds HTML for the editable area to * the output page.<p> * * @param context the current JSP page context * @param params the direct edit parameters * * @return <code>true</code> in case a direct edit element has been opened * * @throws JspException in case something goes wrong */ public static boolean startDirectEdit(PageContext context, CmsDirectEditParams params) throws JspException { // get the direct edit bean from the context I_CmsDirectEditProvider eb = getDirectEditProvider(context); boolean result = false; if (eb != null) { // the direct edit bean must be available if (eb.isManual(params.getMode())) { // store the given parameters for the next manual call setDirectEditProviderParams(context, params); } else { // automatic mode, insert direct edit HTML result = eb.insertDirectEditStart(context, params); } } return result; }
/** * Includes the "direct edit" start element that adds HTML for the editable area to * the output page.<p> * * @param context the current JSP page context * @param params the direct edit parameters * * @return <code>true</code> in case a direct edit element has been opened * * @throws JspException in case something goes wrong */ public static boolean startDirectEdit(PageContext context, CmsDirectEditParams params) throws JspException { // get the direct edit bean from the context I_CmsDirectEditProvider eb = getDirectEditProvider(context); boolean result = false; if (eb != null) { // the direct edit bean must be available if (eb.isManual(params.getMode())) { // store the given parameters for the next manual call setDirectEditProviderParams(context, params); } else { // automatic mode, insert direct edit HTML result = eb.insertDirectEditStart(context, params); } } return result; }
/** * Insert the start HTML for the direct edit buttons in manual mode.<p> * * Same as opening the <code><cms:editable mode="manual"></code> tag.<p> * * @return <code>true</code> if HTML was inserted that needs to be closed * * @throws JspException if something goes wrong */ public boolean editableManualOpen() throws JspException { boolean result = false; if (!CmsFlexController.isCmsOnlineRequest(getJspContext().getRequest())) { // all this does NOT apply to the "online" project I_CmsDirectEditProvider eb = CmsJspTagEditable.getDirectEditProvider(getJspContext()); if ((eb != null)) { // check if the provider support manual placement of buttons if (eb.isManual(CmsDirectEditMode.MANUAL)) { // the provider supports manual placement of buttons result = true; CmsJspTagEditable.editableTagAction(getJspContext(), null, CmsDirectEditMode.MANUAL, null); } } } return result; }
/** * Insert the start HTML for the direct edit buttons in manual mode.<p> * * Same as opening the <code><cms:editable mode="manual"></code> tag.<p> * * @return <code>true</code> if HTML was inserted that needs to be closed * * @throws JspException if something goes wrong */ public boolean editableManualOpen() throws JspException { boolean result = false; if (!CmsFlexController.isCmsOnlineRequest(getJspContext().getRequest())) { // all this does NOT apply to the "online" project I_CmsDirectEditProvider eb = CmsJspTagEditable.getDirectEditProvider(getJspContext()); if ((eb != null)) { // check if the provider support manual placement of buttons if (eb.isManual(CmsDirectEditMode.MANUAL)) { // the provider supports manual placement of buttons result = true; CmsJspTagEditable.editableTagAction(getJspContext(), null, CmsDirectEditMode.MANUAL, null); } } } return result; }
&& !CmsWorkplace.isTemporaryFileName(CmsFlexController.getCmsObject(pageContext.getRequest()).getRequestContext().getUri())) { I_CmsDirectEditProvider eb = getDirectEditProvider(pageContext);
/** * Adds the content info for the collected resources used in the "This page" publish dialog. */ private void addContentInfo() { if (!m_cms.getRequestContext().getCurrentProject().isOnlineProject() && (null == m_searchController.getCommon().getConfig().getSolrIndex()) && (null != m_addContentInfoForEntries)) { CmsSolrQuery query = new CmsSolrQuery(); m_searchController.addQueryParts(query); query.setStart(Integer.valueOf(0)); query.setRows(m_addContentInfoForEntries); CmsContentLoadCollectorInfo info = new CmsContentLoadCollectorInfo(); info.setCollectorClass(this.getClass().getName()); info.setCollectorParams(query.getQuery()); info.setId((new CmsUUID()).getStringValue()); if (CmsJspTagEditable.getDirectEditProvider(pageContext) != null) { try { CmsJspTagEditable.getDirectEditProvider(pageContext).insertDirectEditListMetadata( pageContext, info); } catch (JspException e) { // TODO: improve + localize error message LOG.error("Could not write content info.", e); } } } }
info.setCollectorParams(m_collectorParam); info.setId(m_contentInfoBean.getId()); if (CmsJspTagEditable.getDirectEditProvider(pageContext) != null) { CmsJspTagEditable.getDirectEditProvider(pageContext).insertDirectEditListMetadata( pageContext, info);
params.setCollectorName(container.getCollectorName()); params.setCollectorParams(container.getCollectorParam()); getDirectEditProvider(context).insertDirectEditEmptyList(context, params);
boolean openedEditable = false; if (editable && contextBean.getIsEditMode()) { if (CmsJspTagEditable.getDirectEditProvider(context) == null) { I_CmsDirectEditProvider eb = new CmsAdvancedDirectEditProvider(); eb.init(cms, CmsDirectEditMode.TRUE, element.getSitePath());