mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Humongous merge. It is incomplete, however; faces-config-navigation.xml and ClientConfigElement
were both beyond me, and are just the raw conflict merge data. If Kev can't figure out how they should go together by tomorrow AM (for me) I'll dig back in. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4306 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,7 +30,9 @@ import javax.faces.el.ValueBinding;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.search.LimitBy;
|
||||
import org.alfresco.service.cmr.search.ResultSet;
|
||||
import org.alfresco.service.cmr.search.SearchParameters;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
@@ -353,15 +355,30 @@ public class UIContentSelector extends UIInput
|
||||
|
||||
query.append(":*" + safeContains + "*");
|
||||
}
|
||||
|
||||
int maxResults = Application.getClientConfig(context).getSelectorsSearchMaxResults();
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Query: " + query.toString());
|
||||
logger.debug("Max results size: " + maxResults);
|
||||
}
|
||||
|
||||
// setup search parameters, including limiting the results
|
||||
SearchParameters searchParams = new SearchParameters();
|
||||
searchParams.addStore(Repository.getStoreRef());
|
||||
searchParams.setLanguage(SearchService.LANGUAGE_LUCENE);
|
||||
searchParams.setQuery(query.toString());
|
||||
if (maxResults > 0)
|
||||
{
|
||||
searchParams.setLimit(maxResults);
|
||||
searchParams.setLimitBy(LimitBy.FINAL_SIZE);
|
||||
}
|
||||
|
||||
ResultSet results = null;
|
||||
try
|
||||
{
|
||||
results = Repository.getServiceRegistry(context).getSearchService().query(
|
||||
Repository.getStoreRef(), SearchService.LANGUAGE_LUCENE, query.toString());
|
||||
results = Repository.getServiceRegistry(context).getSearchService().query(searchParams);
|
||||
this.availableOptions = results.getNodeRefs();
|
||||
}
|
||||
finally
|
||||
|
@@ -36,6 +36,7 @@ import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.cmr.dictionary.AssociationDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.search.LimitBy;
|
||||
import org.alfresco.service.cmr.search.ResultSet;
|
||||
import org.alfresco.service.cmr.search.SearchParameters;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
@@ -914,8 +915,31 @@ public abstract class BaseAssociationEditor extends UIInput
|
||||
}
|
||||
}
|
||||
|
||||
int maxResults = Application.getClientConfig(context).getSelectorsSearchMaxResults();
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Query: " + query.toString());
|
||||
logger.debug("Max results size: " + maxResults);
|
||||
}
|
||||
|
||||
SearchParameters searchParams = new SearchParameters();
|
||||
searchParams.addStore(Repository.getStoreRef());
|
||||
searchParams.setLanguage(SearchService.LANGUAGE_LUCENE);
|
||||
searchParams.setQuery(query.toString());
|
||||
if (maxResults > 0)
|
||||
{
|
||||
searchParams.setLimit(maxResults);
|
||||
searchParams.setLimitBy(LimitBy.FINAL_SIZE);
|
||||
}
|
||||
|
||||
if (type.equals(ContentModel.TYPE_PERSON.toString()))
|
||||
{
|
||||
searchParams.addSort("@" + ContentModel.PROP_LASTNAME, true);
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Added lastname as sort column to query for people");
|
||||
}
|
||||
|
||||
SearchParameters searchParams = new SearchParameters();
|
||||
searchParams.addStore(Repository.getStoreRef());
|
||||
|
@@ -176,10 +176,11 @@ public class UIProperty extends PropertySheetItem
|
||||
// if we're in edit mode ensure that we don't allow editing of system properties or scenarios we don't support
|
||||
if (propSheet.inEditMode())
|
||||
{
|
||||
// if we are trying to edit a NodeRef or Path property type set it to read-only as
|
||||
// these are internal properties that shouldn't be edited.
|
||||
// if we are trying to edit a system property type set it to read-only as these are internal
|
||||
// properties that shouldn't be edited.
|
||||
if (typeName.equals(DataTypeDefinition.NODE_REF) || typeName.equals(DataTypeDefinition.PATH) ||
|
||||
typeName.equals(DataTypeDefinition.CONTENT))
|
||||
typeName.equals(DataTypeDefinition.CONTENT) || typeName.equals(DataTypeDefinition.QNAME) ||
|
||||
typeName.equals(DataTypeDefinition.CHILD_ASSOC_REF) || typeName.equals(DataTypeDefinition.ASSOC_REF))
|
||||
{
|
||||
logger.warn("Setting property " + propDef.getName().toString() + " to read-only as it can not be edited");
|
||||
control.getAttributes().put("disabled", Boolean.TRUE);
|
||||
|
Reference in New Issue
Block a user