mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
AWC-1039: Association editors were giving the impression items were disappearing, single association now also use a select box rather than drop down list and items are not filtered out of the result set.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5061 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -486,8 +486,7 @@ public abstract class BaseAssociationEditor extends UIInput
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the size of the select control when multiple items
|
||||
* can be selected
|
||||
* Returns the size of the select control
|
||||
*
|
||||
* @return The size of the select control
|
||||
*/
|
||||
@@ -502,8 +501,7 @@ public abstract class BaseAssociationEditor extends UIInput
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the size of the select control used when multiple items can
|
||||
* be selected
|
||||
* Sets the size of the select control
|
||||
*
|
||||
* @param availableOptionsSize The size
|
||||
*/
|
||||
@@ -818,14 +816,11 @@ public abstract class BaseAssociationEditor extends UIInput
|
||||
out.write("name='");
|
||||
out.write(getClientId(context) + FIELD_AVAILABLE);
|
||||
out.write("' size='");
|
||||
out.write(getAvailableOptionsSize());
|
||||
out.write("'");
|
||||
if (allowMany)
|
||||
{
|
||||
out.write(getAvailableOptionsSize());
|
||||
out.write("' multiple");
|
||||
}
|
||||
else
|
||||
{
|
||||
out.write("1'");
|
||||
out.write(" multiple");
|
||||
}
|
||||
out.write(">");
|
||||
|
||||
@@ -834,10 +829,9 @@ public abstract class BaseAssociationEditor extends UIInput
|
||||
Node currentNode = (Node)getValue();
|
||||
for (NodeRef item : this.availableOptions)
|
||||
{
|
||||
// NOTE: only show the items that are not already associated to and don't show the current node
|
||||
if ((this.originalAssocs.containsKey(item.toString()) == false && this.added.containsKey(item.toString()) == false &&
|
||||
item.toString().equals(currentNode.getNodeRef().toString()) == false) ||
|
||||
this.removed.containsKey(item.toString()))
|
||||
// show all the available options apart from the current node as we don't
|
||||
// want to create recursive associations!!
|
||||
if (item.toString().equals(currentNode.getNodeRef().toString()) == false)
|
||||
{
|
||||
if (ContentModel.TYPE_PERSON.equals(nodeService.getType(item)))
|
||||
{
|
||||
|
Reference in New Issue
Block a user