diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties index bc08093ea8..2b3540b434 100644 --- a/config/alfresco/messages/webclient.properties +++ b/config/alfresco/messages/webclient.properties @@ -1044,7 +1044,7 @@ deploy_status_failed=FAILED deploy_status_partial=PARTIAL FAILURE reason=Reason snapshot=Snapshot -deploy_to_help=A comma separated list of servers to deploy the website to. Each entry can be a host name or an IP address and may also contain a port number. If a port number is not specified the default of {0} will be used. +deploy_to_help=A comma separated list of servers to deploy the website to.

Each entry can be a host name or an IP address and may also contain an RMI port number. If an RMI port number is not specified the default of {0} will be used.

Example: liveserver1, liveserver2:50900

# New User Wizard messages new_user_title=New User Wizard diff --git a/config/alfresco/web-client-config-wcm.xml b/config/alfresco/web-client-config-wcm.xml index 494f229315..18fb63915a 100644 --- a/config/alfresco/web-client-config-wcm.xml +++ b/config/alfresco/web-client-config-wcm.xml @@ -18,7 +18,7 @@ 50500 - 5 + 2 30 diff --git a/source/java/org/alfresco/web/app/servlet/FacesHelper.java b/source/java/org/alfresco/web/app/servlet/FacesHelper.java index 2c9da8700a..d0d9b45f1a 100644 --- a/source/java/org/alfresco/web/app/servlet/FacesHelper.java +++ b/source/java/org/alfresco/web/app/servlet/FacesHelper.java @@ -170,8 +170,10 @@ public final class FacesHelper // replace illegal ID characters with an underscore id = id.replace(':', '_'); id = id.replace(' ', '_'); + id = id.replace('.', '_'); // TODO: check all other illegal characters - only allowed dash and underscore + // TODO: use regular expression to do check and replacment of characters } return id; diff --git a/source/java/org/alfresco/web/bean/wcm/AVMConstants.java b/source/java/org/alfresco/web/bean/wcm/AVMConstants.java index c5b8a320e6..ef8abb7417 100644 --- a/source/java/org/alfresco/web/bean/wcm/AVMConstants.java +++ b/source/java/org/alfresco/web/bean/wcm/AVMConstants.java @@ -820,7 +820,9 @@ public final class AVMConstants */ public static NodeRef getWebProjectNodeFromPath(final String absoluteAVMPath) { - return getWebProjectNodeFromStore(AVMConstants.getStoreName(absoluteAVMPath)); + String storeName = AVMConstants.getStoreName(absoluteAVMPath); + String storeId = AVMConstants.getStoreId(storeName); + return getWebProjectNodeFromStore(storeId); } /** diff --git a/source/java/org/alfresco/web/ui/wcm/component/UISandboxSnapshots.java b/source/java/org/alfresco/web/ui/wcm/component/UISandboxSnapshots.java index f079cc40d5..55ec4f4940 100644 --- a/source/java/org/alfresco/web/ui/wcm/component/UISandboxSnapshots.java +++ b/source/java/org/alfresco/web/ui/wcm/component/UISandboxSnapshots.java @@ -225,8 +225,19 @@ public class UISandboxSnapshots extends SelfRenderingComponent versions = avmService.getStoreVersions(sandbox, fromDate, toDate); } + // determine whether the deploy action should be shown + boolean showDeployAction = false; + NodeRef webProjectRef = AVMConstants.getWebProjectNodeFromStore(sandbox); + NodeService nodeService = Repository.getServiceRegistry(context).getNodeService(); + List deployToServers = (List)nodeService.getProperty(webProjectRef, + WCMAppModel.PROP_DEPLOYTO); + if (deployToServers != null && deployToServers.size() > 0) + { + showDeployAction = true; + } + // determine the deployment status for the website - determineDeploymentStatus(context, sandbox); + determineDeploymentStatus(context, webProjectRef, sandbox, nodeService); Map requestMap = context.getExternalContext().getRequestMap(); for (int i=versions.size() - 1; i >= 0; i--) // reverse order @@ -274,28 +285,32 @@ public class UISandboxSnapshots extends SelfRenderingComponent } requestMap.put(REQUEST_SNAPVERSION, Integer.toString(item.getVersionID())); Utils.encodeRecursive(context, action); - out.write("  "); - // deploy action - action = findAction(ACT_SNAPSHOT_DEPLOY, sandbox); - if (action == null) + // deploy action (if there are deployto servers specified) + if (showDeployAction) { - Map params = new HashMap(2, 1.0f); - params.put("version", "#{" + REQUEST_SNAPVERSION + "}"); - action = createAction(context, sandbox, ACT_SNAPSHOT_DEPLOY, "/images/icons/deploy.gif", - "#{DialogManager.setupParameters}", "dialog:deploySnapshot", null, params); + out.write("  "); + action = findAction(ACT_SNAPSHOT_DEPLOY, sandbox); + if (action == null) + { + Map params = new HashMap(2, 1.0f); + params.put("version", "#{" + REQUEST_SNAPVERSION + "}"); + action = createAction(context, sandbox, ACT_SNAPSHOT_DEPLOY, "/images/icons/deploy.gif", + "#{DialogManager.setupParameters}", "dialog:deploySnapshot", null, params); + } + + Utils.encodeRecursive(context, action); } - Utils.encodeRecursive(context, action); - requestMap.remove(REQUEST_SNAPVERSION); - //out.write(" "); - // TODO: restore once preview of a store by version is implemented in vserver + //out.write("  "); /*Utils.encodeRecursive(context, aquireAction( context, sandbox, ACT_SNAPSHOT_PREVIEW, null, null, null)); out.write(" ");*/ + requestMap.remove(REQUEST_SNAPVERSION); + out.write(""); } } @@ -463,11 +478,10 @@ public class UISandboxSnapshots extends SelfRenderingComponent return control; } - private void determineDeploymentStatus(FacesContext context, String sandbox) + private void determineDeploymentStatus(FacesContext context, NodeRef webProjectRef, + String sandbox, NodeService nodeService) { // work out what status to show against which snapshot - NodeRef webProjectRef = AVMConstants.getWebProjectNodeFromStore(sandbox); - NodeService nodeService = Repository.getServiceRegistry(context).getNodeService(); List selectedServers = (List)nodeService.getProperty(webProjectRef, WCMAppModel.PROP_SELECTEDDEPLOYTO); Integer ver = (Integer)nodeService.getProperty(webProjectRef, diff --git a/source/java/org/alfresco/web/ui/wcm/component/UIUserSandboxes.java b/source/java/org/alfresco/web/ui/wcm/component/UIUserSandboxes.java index e01e2cbca8..887c9d7c75 100644 --- a/source/java/org/alfresco/web/ui/wcm/component/UIUserSandboxes.java +++ b/source/java/org/alfresco/web/ui/wcm/component/UIUserSandboxes.java @@ -58,6 +58,7 @@ import org.alfresco.service.namespace.RegexQNamePattern; import org.alfresco.util.NameMatcher; import org.alfresco.web.app.Application; import org.alfresco.web.app.servlet.DownloadContentServlet; +import org.alfresco.web.app.servlet.FacesHelper; import org.alfresco.web.bean.BrowseBean; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.bean.repository.User; @@ -1001,7 +1002,7 @@ public class UIUserSandboxes extends SelfRenderingComponent private UIActionLink findAction(String name, String store) { UIActionLink action = null; - String actionId = name + '_' + store; + String actionId = name + '_' + FacesHelper.makeLegalId(store); if (logger.isDebugEnabled()) logger.debug("Finding action Id: " + actionId); for (UIComponent component : (List)getChildren()) @@ -1038,7 +1039,7 @@ public class UIUserSandboxes extends SelfRenderingComponent javax.faces.application.Application facesApp = fc.getApplication(); UIActionLink control = (UIActionLink)facesApp.createComponent(UIActions.COMPONENT_ACTIONLINK); - String id = name + '_' + store; + String id = name + '_' + FacesHelper.makeLegalId(store); if (logger.isDebugEnabled()) logger.debug("...creating action Id: " + id); control.setRendererType(UIActions.RENDERER_ACTIONLINK); diff --git a/source/web/jsp/wcm/create-website-wizard/details.jsp b/source/web/jsp/wcm/create-website-wizard/details.jsp index 9888cd822f..976fe09577 100644 --- a/source/web/jsp/wcm/create-website-wizard/details.jsp +++ b/source/web/jsp/wcm/create-website-wizard/details.jsp @@ -162,7 +162,7 @@