mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Added mandatory validation checks to category/space selectors, association editors and multi value editor
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2677 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -392,6 +392,20 @@ public abstract class BaseAssociationEditor extends UIInput
|
||||
|
||||
// close table
|
||||
out.write("</table>");
|
||||
|
||||
// output a hidden field containing the current value
|
||||
out.write("<input type='hidden' name='");
|
||||
out.write(this.getClientId(context));
|
||||
out.write("_current_value");
|
||||
out.write("' value='");
|
||||
// if the current state will leave the node without any associations
|
||||
// do not set a value for the hidden field
|
||||
int numberAssocs = (this.originalAssocs.size() + this.added.size()) - this.removed.size();
|
||||
if (numberAssocs > 0)
|
||||
{
|
||||
out.write(Integer.toString(numberAssocs));
|
||||
}
|
||||
out.write("' />");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user