Merged V2.1 to HEAD

6606: Removed annoying warning message shown when developing custom client side validation handlers
   6607: Fixed lock removal bug when deleting sandbox.
   6608: Fix for AWC-601  - simple/advanced search user error message now "friendly" when lucene query parser exception occurs.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6747 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-09-11 03:16:28 +00:00
parent 1ef35756f8
commit fd2ee9fde1
4 changed files with 12 additions and 5 deletions

View File

@@ -43,6 +43,7 @@ import org.alfresco.config.ConfigElement;
import org.alfresco.config.ConfigService;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.search.SearcherException;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.dictionary.TypeDefinition;
import org.alfresco.service.cmr.lock.LockService;
@@ -1011,9 +1012,17 @@ public class BrowseBean implements IContextListener
this.contentNodes = Collections.<Node>emptyList();
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
}
catch (SearcherException serr)
{
logger.info("Search failed for: " + query, serr);
Utils.addErrorMessage(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_QUERY));
this.containerNodes = Collections.<Node>emptyList();
this.contentNodes = Collections.<Node>emptyList();
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
}
catch (Throwable err)
{
logger.info("Search failed for: " + query);
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_SEARCH), new Object[] {err.getMessage()}), err );
this.containerNodes = Collections.<Node>emptyList();

View File

@@ -500,10 +500,6 @@ public abstract class BaseComponentGenerator implements IComponentGenerator
// NOTE: This is dealt with at the component creation stage
// as a different component is usually required.
}
else
{
logger.warn("Unrecognized constaint object: " + constraint.getClass().getName());
}
}
}
}

View File

@@ -81,6 +81,7 @@ public final class Repository
public static final String ERROR_GENERIC = "error_generic";
public static final String ERROR_NOHOME = "error_homespace";
public static final String ERROR_SEARCH = "error_search";
public static final String ERROR_QUERY = "error_search_query";
public static final String ERROR_EXISTS = "error_exists";
private static final String METADATA_EXTACTER_REGISTRY = "metadataExtracterRegistry";