diff --git a/config/alfresco/templates/webscripts/org/alfresco/portlets/mywebforms_get_html.ftl b/config/alfresco/templates/webscripts/org/alfresco/portlets/mywebforms_get_html.ftl index ef1b1809d3..76a8a5e50d 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/portlets/mywebforms_get_html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/portlets/mywebforms_get_html.ftl @@ -47,7 +47,7 @@ <#assign formcount=formcount+1>
- ${form.properties.title} + ${form.properties.title} <#--${form.properties.description}-->
diff --git a/config/alfresco/web-client-config-dialogs.xml b/config/alfresco/web-client-config-dialogs.xml index 8e6c62c82c..875b072765 100644 --- a/config/alfresco/web-client-config-dialogs.xml +++ b/config/alfresco/web-client-config-dialogs.xml @@ -2,6 +2,7 @@ /jsp/dialog/container.jsp + /jsp/dialog/plain-container.jsp diff --git a/config/alfresco/web-client-config-wizards.xml b/config/alfresco/web-client-config-wizards.xml index dc6f42126b..0e652fd01a 100644 --- a/config/alfresco/web-client-config-wizards.xml +++ b/config/alfresco/web-client-config-wizards.xml @@ -2,6 +2,7 @@ /jsp/wizard/container.jsp + /jsp/wizard/plain-container.jsp diff --git a/source/java/org/alfresco/web/app/AlfrescoNavigationHandler.java b/source/java/org/alfresco/web/app/AlfrescoNavigationHandler.java index c2fbbe20fe..f803809b10 100644 --- a/source/java/org/alfresco/web/app/AlfrescoNavigationHandler.java +++ b/source/java/org/alfresco/web/app/AlfrescoNavigationHandler.java @@ -60,9 +60,12 @@ public class AlfrescoNavigationHandler extends NavigationHandler public final static String WIZARD_PREFIX = "wizard" + OUTCOME_SEPARATOR; public final static String CLOSE_DIALOG_OUTCOME = DIALOG_PREFIX + "close"; public final static String CLOSE_WIZARD_OUTCOME = WIZARD_PREFIX + "close"; + public final static String EXTERNAL_CONTAINER_REQUEST = "externalContainerRequest"; protected String dialogContainer = null; protected String wizardContainer = null; + protected String plainDialogContainer = null; + protected String plainWizardContainer = null; private final static Log logger = LogFactory.getLog(AlfrescoNavigationHandler.class); private final static String VIEW_STACK = "_alfViewStack"; @@ -365,18 +368,47 @@ public class AlfrescoNavigationHandler extends NavigationHandler */ protected String getDialogContainer(FacesContext context) { - if (this.dialogContainer == null) + String container; + + // determine which kind of container we need to return, if the + // external request flag is set then use the plain container + Object obj = context.getExternalContext().getRequestMap().get(EXTERNAL_CONTAINER_REQUEST); + + if (obj != null && obj instanceof Boolean && ((Boolean)obj).booleanValue()) { - ConfigService configSvc = Application.getConfigService(context); - Config globalConfig = configSvc.getGlobalConfig(); - - if (globalConfig != null) + if (this.plainDialogContainer == null) { - this.dialogContainer = globalConfig.getConfigElement("dialog-container").getValue(); + ConfigService configSvc = Application.getConfigService(context); + Config globalConfig = configSvc.getGlobalConfig(); + + if (globalConfig != null) + { + this.plainDialogContainer = globalConfig.getConfigElement("plain-dialog-container").getValue(); + } } + + container = this.plainDialogContainer; + } + else + { + if (this.dialogContainer == null) + { + ConfigService configSvc = Application.getConfigService(context); + Config globalConfig = configSvc.getGlobalConfig(); + + if (globalConfig != null) + { + this.dialogContainer = globalConfig.getConfigElement("dialog-container").getValue(); + } + } + + container = this.dialogContainer; } - return this.dialogContainer; + if (logger.isDebugEnabled()) + logger.debug("Using dialog container: " + container); + + return container; } /** @@ -387,18 +419,47 @@ public class AlfrescoNavigationHandler extends NavigationHandler */ protected String getWizardContainer(FacesContext context) { - if (this.wizardContainer == null) + String container; + + // determine which kind of container we need to return, if the + // external request flag is set then use the plain container + Object obj = context.getExternalContext().getRequestMap().get(EXTERNAL_CONTAINER_REQUEST); + + if (obj != null && obj instanceof Boolean && ((Boolean)obj).booleanValue()) { - ConfigService configSvc = Application.getConfigService(context); - Config globalConfig = configSvc.getGlobalConfig(); - - if (globalConfig != null) + if (this.plainWizardContainer == null) { - this.wizardContainer = globalConfig.getConfigElement("wizard-container").getValue(); + ConfigService configSvc = Application.getConfigService(context); + Config globalConfig = configSvc.getGlobalConfig(); + + if (globalConfig != null) + { + this.plainWizardContainer = globalConfig.getConfigElement("plain-wizard-container").getValue(); + } } + + container = this.plainWizardContainer; + } + else + { + if (this.wizardContainer == null) + { + ConfigService configSvc = Application.getConfigService(context); + Config globalConfig = configSvc.getGlobalConfig(); + + if (globalConfig != null) + { + this.wizardContainer = globalConfig.getConfigElement("wizard-container").getValue(); + } + } + + container = this.wizardContainer; } - return this.wizardContainer; + if (logger.isDebugEnabled()) + logger.debug("Using wizard container: " + container); + + return container; } /** diff --git a/source/java/org/alfresco/web/app/servlet/ExternalAccessServlet.java b/source/java/org/alfresco/web/app/servlet/ExternalAccessServlet.java index 4bcc2db882..6844398778 100644 --- a/source/java/org/alfresco/web/app/servlet/ExternalAccessServlet.java +++ b/source/java/org/alfresco/web/app/servlet/ExternalAccessServlet.java @@ -40,6 +40,7 @@ import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.StoreRef; import org.alfresco.service.cmr.security.AccessStatus; import org.alfresco.service.cmr.security.PermissionService; +import org.alfresco.web.app.AlfrescoNavigationHandler; import org.alfresco.web.app.Application; import org.alfresco.web.bean.BrowseBean; import org.alfresco.web.bean.NavigationBean; @@ -261,6 +262,11 @@ public class ExternalAccessServlet extends BaseServlet NavigationBean navigator = (NavigationBean)FacesHelper.getManagedBean(fc, NavigationBean.BEAN_NAME); navigator.setCurrentNodeId(args[1]); } + + // set the external container request flag so that a plain container gets used + fc.getExternalContext().getRequestMap().put( + AlfrescoNavigationHandler.EXTERNAL_CONTAINER_REQUEST, Boolean.TRUE); + NavigationHandler navigationHandler = fc.getApplication().getNavigationHandler(); navigationHandler.handleNavigation(fc, null, outcome + ':' + args[0]); } diff --git a/source/java/org/alfresco/web/app/servlet/command/UIActionCommandProcessor.java b/source/java/org/alfresco/web/app/servlet/command/UIActionCommandProcessor.java index 80cd371128..b753d99353 100644 --- a/source/java/org/alfresco/web/app/servlet/command/UIActionCommandProcessor.java +++ b/source/java/org/alfresco/web/app/servlet/command/UIActionCommandProcessor.java @@ -35,6 +35,7 @@ import javax.servlet.http.HttpServletResponse; import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.service.ServiceRegistry; +import org.alfresco.web.app.AlfrescoNavigationHandler; import org.alfresco.web.app.servlet.FacesHelper; /** @@ -52,6 +53,8 @@ import org.alfresco.web.app.servlet.FacesHelper; */ public class UIActionCommandProcessor implements ExtCommandProcessor { + public static final String PARAM_CONTAINER = "container"; + private ServletContext sc = null; private String command = null; private Map args = null; @@ -91,6 +94,16 @@ public class UIActionCommandProcessor implements ExtCommandProcessor properties.put(BaseUIActionCommand.PROP_SERVLETCONTEXT, this.sc); properties.put(BaseUIActionCommand.PROP_REQUEST, request); properties.put(BaseUIActionCommand.PROP_RESPONSE, response); + + // if the container parameter is present and equal to "plain" add the + // external container object to the request + String container = request.getParameter(PARAM_CONTAINER); + if (container != null && container.equalsIgnoreCase("plain")) + { + request.setAttribute( + AlfrescoNavigationHandler.EXTERNAL_CONTAINER_REQUEST, Boolean.TRUE); + } + Command cmd = CommandFactory.getInstance().createCommand(command); if (cmd == null) { diff --git a/source/web/jsp/dialog/plain-container.jsp b/source/web/jsp/dialog/plain-container.jsp new file mode 100644 index 0000000000..a92ef490d9 --- /dev/null +++ b/source/web/jsp/dialog/plain-container.jsp @@ -0,0 +1,68 @@ +<%-- + * Copyright (C) 2005-2007 Alfresco Software Limited. + + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" +--%> +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> +<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> + +<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %> +<%@ page isELIgnored="false" %> +<%@ page import="org.alfresco.web.app.Application" %> +<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> + + + + + + <%-- load a bundle of properties with I18N strings --%> + + + + + + + + + +
+ + + + <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %> + + + + <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %> + + <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> + + <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> +
+
+ +
+ +
\ No newline at end of file