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
|
* Returns the size of the select control
|
||||||
* can be selected
|
|
||||||
*
|
*
|
||||||
* @return 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
|
* Sets the size of the select control
|
||||||
* be selected
|
|
||||||
*
|
*
|
||||||
* @param availableOptionsSize The size
|
* @param availableOptionsSize The size
|
||||||
*/
|
*/
|
||||||
@@ -818,14 +816,11 @@ public abstract class BaseAssociationEditor extends UIInput
|
|||||||
out.write("name='");
|
out.write("name='");
|
||||||
out.write(getClientId(context) + FIELD_AVAILABLE);
|
out.write(getClientId(context) + FIELD_AVAILABLE);
|
||||||
out.write("' size='");
|
out.write("' size='");
|
||||||
|
out.write(getAvailableOptionsSize());
|
||||||
|
out.write("'");
|
||||||
if (allowMany)
|
if (allowMany)
|
||||||
{
|
{
|
||||||
out.write(getAvailableOptionsSize());
|
out.write(" multiple");
|
||||||
out.write("' multiple");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
out.write("1'");
|
|
||||||
}
|
}
|
||||||
out.write(">");
|
out.write(">");
|
||||||
|
|
||||||
@@ -834,10 +829,9 @@ public abstract class BaseAssociationEditor extends UIInput
|
|||||||
Node currentNode = (Node)getValue();
|
Node currentNode = (Node)getValue();
|
||||||
for (NodeRef item : this.availableOptions)
|
for (NodeRef item : this.availableOptions)
|
||||||
{
|
{
|
||||||
// NOTE: only show the items that are not already associated to and don't show the current node
|
// show all the available options apart from the current node as we don't
|
||||||
if ((this.originalAssocs.containsKey(item.toString()) == false && this.added.containsKey(item.toString()) == false &&
|
// want to create recursive associations!!
|
||||||
item.toString().equals(currentNode.getNodeRef().toString()) == false) ||
|
if (item.toString().equals(currentNode.getNodeRef().toString()) == false)
|
||||||
this.removed.containsKey(item.toString()))
|
|
||||||
{
|
{
|
||||||
if (ContentModel.TYPE_PERSON.equals(nodeService.getType(item)))
|
if (ContentModel.TYPE_PERSON.equals(nodeService.getType(item)))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user