From c473277dbcf677fed05e435c1693aaa520d17f64 Mon Sep 17 00:00:00 2001 From: Derek Hulley Date: Mon, 10 Mar 2008 16:37:15 +0000 Subject: [PATCH] Merged V2.2 to HEAD 8205: Benchmark fixes 8212: AR-1663: OnCopyCompletePolicy is only being executed once per transaction, and not once per node being copied. 8250: Test for long strings 8251: Stopped chiba:match function from being generated into xforms constraints in XForms model bindings. see WCM-952. 8260: AVMServiceTest is mostly repeatable without doing a clean bootstrap. 8266: Andy Hind supplied replacement for query used in AVMNode GC. 8267: Fix for AR-1909 - Updated Openoffice bootstrap for installer 8270: Fix for WCM-1070 8271: Fix for WCM-1007 8284: AR-2069: WebService tickets are expired when upload and download sessions they have used are timed out 8287: Fix for WCM-499 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8484 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../alfresco/web/bean/wcm/AVMBrowseBean.java | 21 ++++++++++++++++++- .../web/forms/xforms/Schema2XForms.java | 4 ---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/source/java/org/alfresco/web/bean/wcm/AVMBrowseBean.java b/source/java/org/alfresco/web/bean/wcm/AVMBrowseBean.java index 3a9fe64bf4..7dc22ccc80 100644 --- a/source/java/org/alfresco/web/bean/wcm/AVMBrowseBean.java +++ b/source/java/org/alfresco/web/bean/wcm/AVMBrowseBean.java @@ -206,6 +206,8 @@ public class AVMBrowseBean implements IContextListener private SearchContext searchContext = null; + private String searchOrigin; + /** The NodeService to be used by the bean */ transient private NodeService nodeService; @@ -1393,6 +1395,7 @@ public class AVMBrowseBean implements IContextListener setCurrentPath(null); setAvmActionNode(null); this.allItemsAction = false; + this.searchOrigin = null; } this.websiteQuery = null; @@ -1533,8 +1536,11 @@ public class AVMBrowseBean implements IContextListener { // normal downloadable document outcome = "dialog:editAvmFile"; - } + // we need to mark the file as modified so it gets a lock + this.getAvmService().forceCopy(avmPath); + } + logger.debug("outcome " + outcome + " for path " + path); FacesContext fc = FacesContext.getCurrentInstance(); @@ -1740,6 +1746,10 @@ public class AVMBrowseBean implements IContextListener // set the search context - when the view is refreshed, this will be detected and // the search results mode of the AVM Browse screen will be displayed this.searchContext = searchContext; + + // set the search origin so that when the search is closed we know + // to go back to the website view and not the browse view (WCM-1007) + this.searchOrigin = "formContent"; } /** @@ -1883,6 +1893,15 @@ public class AVMBrowseBean implements IContextListener { this.searchContext = null; resetFileFolderLists(); + + if (this.searchOrigin != null) + { + // if the search was from elsewhere navigate back to the website view + this.searchOrigin = null; + + FacesContext fc = FacesContext.getCurrentInstance(); + fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "browseWebsite"); + } } diff --git a/source/java/org/alfresco/web/forms/xforms/Schema2XForms.java b/source/java/org/alfresco/web/forms/xforms/Schema2XForms.java index 8a8d8e823c..c0ecd479cd 100644 --- a/source/java/org/alfresco/web/forms/xforms/Schema2XForms.java +++ b/source/java/org/alfresco/web/forms/xforms/Schema2XForms.java @@ -2804,10 +2804,6 @@ public class Schema2XForms implements Serializable typeName); } final StringList lexicalPatterns = ((XSSimpleTypeDefinition)controlType).getLexicalPattern(); - for (int i = 0; lexicalPatterns != null && i < lexicalPatterns.getLength(); i++) - { - constraints.add("chiba:match(., '" + lexicalPatterns.item(i) + "',null)"); - } } final short constraintType =