diff --git a/source/java/org/alfresco/web/bean/BrowseBean.java b/source/java/org/alfresco/web/bean/BrowseBean.java index 875a2b082a..47c387ea1a 100644 --- a/source/java/org/alfresco/web/bean/BrowseBean.java +++ b/source/java/org/alfresco/web/bean/BrowseBean.java @@ -1391,7 +1391,13 @@ public class BrowseBean implements IContextListener, Serializable public void closeSearch(ActionEvent event) { // set the current node Id ready for page refresh - this.navigator.setCurrentNodeId( this.navigator.getCurrentNodeId() ); + String currentNodeId = this.navigator.getCurrentNodeId(); + this.navigator.setCurrentNodeId(currentNodeId); + + // setup dispatch context so we go back to the right place + NodeRef currentNodeRef = new NodeRef(Repository.getStoreRef(), currentNodeId); + Node currentNode = new Node(currentNodeRef); + this.navigator.setupDispatchContext(currentNode); } /** diff --git a/source/java/org/alfresco/web/ui/repo/component/UIContentSelector.java b/source/java/org/alfresco/web/ui/repo/component/UIContentSelector.java index e79d63c744..314098c781 100644 --- a/source/java/org/alfresco/web/ui/repo/component/UIContentSelector.java +++ b/source/java/org/alfresco/web/ui/repo/component/UIContentSelector.java @@ -35,6 +35,7 @@ import javax.faces.context.ResponseWriter; import javax.faces.el.ValueBinding; import org.alfresco.model.ContentModel; +import org.alfresco.repo.search.impl.lucene.QueryParser; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeService; import org.alfresco.service.cmr.search.LimitBy; @@ -353,7 +354,7 @@ public class UIContentSelector extends UIInput if (contains != null && contains.length() > 0) { - String safeContains = Utils.remove(contains.trim(), "\""); + String safeContains = QueryParser.escape(contains.trim()); query.append(" AND +@"); String nameAttr = Repository.escapeQName(QName.createQName( diff --git a/source/java/org/alfresco/web/ui/repo/component/UIMultiValueEditor.java b/source/java/org/alfresco/web/ui/repo/component/UIMultiValueEditor.java index c2793a0c47..4fb8792fbf 100644 --- a/source/java/org/alfresco/web/ui/repo/component/UIMultiValueEditor.java +++ b/source/java/org/alfresco/web/ui/repo/component/UIMultiValueEditor.java @@ -24,6 +24,7 @@ */ package org.alfresco.web.ui.repo.component; +import java.io.IOException; import java.util.ArrayList; import java.util.Calendar; import java.util.GregorianCalendar; @@ -369,7 +370,16 @@ public class UIMultiValueEditor extends UIInput } } - + @Override + public void encodeChildren(FacesContext context) throws IOException + { + // if we need to hide the wrapped component don't encode the children + if (this.getRendersChildren() == false) + { + super.encodeChildren(context); + } + } + /** * @see javax.faces.component.UIComponent#getRendersChildren() */ diff --git a/source/java/org/alfresco/web/ui/repo/component/property/BaseAssociationEditor.java b/source/java/org/alfresco/web/ui/repo/component/property/BaseAssociationEditor.java index 21dd61a929..eb9eecb498 100644 --- a/source/java/org/alfresco/web/ui/repo/component/property/BaseAssociationEditor.java +++ b/source/java/org/alfresco/web/ui/repo/component/property/BaseAssociationEditor.java @@ -44,6 +44,7 @@ import javax.faces.event.FacesEvent; import javax.transaction.UserTransaction; import org.alfresco.model.ContentModel; +import org.alfresco.repo.search.impl.lucene.QueryParser; import org.alfresco.repo.security.authority.AuthorityDAO; import org.alfresco.service.cmr.dictionary.AssociationDefinition; import org.alfresco.service.cmr.repository.NodeRef; @@ -991,22 +992,19 @@ public abstract class BaseAssociationEditor extends UIInput if (contains != null && contains.length() > 0) { - String safeContains = Utils.remove(contains.trim(), "\""); + String safeContains = QueryParser.escape(contains.trim()); // if the association's target is the person type search on the // firstName and lastName properties instead of the name property if (type.equals(ContentModel.TYPE_PERSON.toString())) - { - query.append(" AND (@"); - String firstName = Repository.escapeQName(QName.createQName( - NamespaceService.CONTENT_MODEL_1_0_URI, "firstName")); - query.append(firstName); - query.append(":*" + safeContains + "*"); - query.append(" OR @"); - String lastName = Repository.escapeQName(QName.createQName( - NamespaceService.CONTENT_MODEL_1_0_URI, "lastName")); - query.append(lastName); - query.append(":*" + safeContains + "*)"); + { + query.append(" AND (@").append(NamespaceService.CONTENT_MODEL_PREFIX).append("\\:firstName:\"*"); + query.append(safeContains); + query.append("*\" @").append(NamespaceService.CONTENT_MODEL_PREFIX).append("\\:lastName:\"*"); + query.append(safeContains); + query.append("*\" @").append(NamespaceService.CONTENT_MODEL_PREFIX).append("\\:userName:"); + query.append(safeContains); + query.append("*)"); } else { diff --git a/source/web/jsp/wcm/create-website-wizard/notify.jsp b/source/web/jsp/wcm/create-website-wizard/notify.jsp index cb25b29087..561b68c34d 100644 --- a/source/web/jsp/wcm/create-website-wizard/notify.jsp +++ b/source/web/jsp/wcm/create-website-wizard/notify.jsp @@ -38,8 +38,8 @@ function pageLoaded() { - document.getElementById("dialog:dialog-body:subject").focus(); - okEnabled = !document.getElementById("dialog:finish-button").disabled; + document.getElementById("wizard:wizard-body:subject").focus(); + okEnabled = !document.getElementById("wizard:finish-button").disabled; checkButtonState(); } @@ -47,13 +47,13 @@ { if (okEnabled) { - if (document.getElementById("dialog:dialog-body:subject").value.length == 0) + if (document.getElementById("wizard:wizard-body:subject").value.length == 0) { - document.getElementById("dialog:finish-button").disabled = true; + document.getElementById("wizard:finish-button").disabled = true; } else { - document.getElementById("dialog:finish-button").disabled = false; + document.getElementById("wizard:finish-button").disabled = false; } } }