/** * @see org.opencms.widgets.I_CmsWidgetDialog#getUserAgent() */ public String getUserAgent() { return getJsp().getRequest().getHeader(CmsRequestUtil.HEADER_USER_AGENT); }
/** * @see org.opencms.widgets.I_CmsWidgetDialog#getUserAgent() */ public String getUserAgent() { return getJsp().getRequest().getHeader(CmsRequestUtil.HEADER_USER_AGENT); }
result.append("\";\n"); result.append("var vfsPathEditorForm = \""); result.append(getJsp().link(CmsEditor.PATH_EDITORS + "xmlcontent/editor_form.jsp")); result.append("\";\n"); result.append("if (jQuery) {\n");
/** * Sets the editor values for the locale with the parameters from the request.<p> * * Called before saving the xml content, redisplaying the input form, * changing the language and adding or removing elements.<p> * * @param locale the locale of the content to save * @throws CmsXmlException if something goes wrong */ public void setEditorValues(Locale locale) throws CmsXmlException { List valueNames = getSimpleValueNames(m_content.getContentDefinition(), "", locale); Iterator i = valueNames.iterator(); while (i.hasNext()) { String valueName = (String)i.next(); I_CmsXmlContentValue value = m_content.getValue(valueName, locale); I_CmsWidget widget = value.getContentDefinition().getContentHandler().getWidget(value); widget.setEditorValue(getCms(), getJsp().getRequest().getParameterMap(), this, (I_CmsWidgetParameter)value); } }
/** * Sets the editor values for the locale with the parameters from the request.<p> * * Called before saving the xml content, redisplaying the input form, * changing the language and adding or removing elements.<p> * * @param locale the locale of the content to save * @throws CmsXmlException if something goes wrong */ public void setEditorValues(Locale locale) throws CmsXmlException { List<String> names = m_content.getNames(locale); Iterator<String> i = names.iterator(); while (i.hasNext()) { String path = i.next(); I_CmsXmlContentValue value = m_content.getValue(path, locale); if (value.isSimpleType()) { I_CmsWidget widget = value.getContentDefinition().getContentHandler().getWidget(value); widget.setEditorValue( getCms(), getJsp().getRequest().getParameterMap(), this, (I_CmsWidgetParameter)value); } } }
/** * Performs a configurable action performed by the editor.<p> * * The default action is: save resource, clear temporary files and publish the resource directly.<p> * * @throws IOException if a forward fails * @throws ServletException of a forward fails * @throws JspException if including a JSP fails */ public void actionDirectEdit() throws IOException, JspException, ServletException { // get the action class from the OpenCms runtime property I_CmsEditorActionHandler actionClass = OpenCms.getWorkplaceManager().getEditorActionHandler(); if (actionClass == null) { // error getting the action class, save content and exit the editor actionSave(); actionExit(); } else { actionClass.editorAction(this, getJsp()); } }
/** * Performs a configurable action performed by the editor.<p> * * The default action is: save resource, clear temporary files and publish the resource directly.<p> * * @throws IOException if a forward fails * @throws ServletException of a forward fails * @throws JspException if including a JSP fails */ public void actionDirectEdit() throws IOException, JspException, ServletException { // get the action class from the OpenCms runtime property I_CmsEditorActionHandler actionClass = OpenCms.getWorkplaceManager().getEditorActionHandler(); if (actionClass == null) { // error getting the action class, save content and exit the editor actionSave(); actionExit(); } else { actionClass.editorAction(this, getJsp()); } }