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:
Gavin Cornwell
2006-04-20 20:51:08 +00:00
parent 4a0fefc4bd
commit 28bac72958
7 changed files with 153 additions and 32 deletions

View File

@@ -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("' />");
}
}
}