Last refactor of forms API before Labs release - FieldConstraints API now receives and returns a Map<String, Object> rather than Map<String, String>, a method to return the parameters as JSON has also been added and is used in the REST API. This means that parameters go all the way to client side validation handlers in their native form.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14727 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2009-06-15 23:32:40 +00:00
parent 97e28176a0
commit 4ed7957b63
6 changed files with 64 additions and 30 deletions

View File

@@ -86,7 +86,7 @@ function testGetFormForContentNode()
test.assertEquals(1, constraints.size());
var constraint = constraints.get(0);
test.assertEquals("REGEX", constraint.type);
var params = constraint.params;
var params = constraint.parameters;
test.assertNotNull(params, "params should not be null.");
test.assertEquals(2, params.length);
test.assertNotNull(params["expression"], "params['expression'] should not be null.");