Preface
TC 2007 web-side, the page concise is simple.
For non-null verification, add a red arrow + "Required value is not specified."
This verification appears to be managed in the same definition as the CF-side form.
This validation is done with attributes defined as require.
So what is the mechanism for implementing the web-side? Is it possible to do this verification directly on the web side without binding to the CF side?
Implementation Mechanism
To create an object, for example, the key action-component is
Modelentity--This is the object that the Web side uses to display
Outvalidationexception-A set of objects containing exception information.
With these concepts, it is easy to look at the Enterprisevalidationactioncomponent.java code to conclude:
Use Attributevalidationexception to get the results you want, and that's true.
Paste a code snippet:
attributevalidationexception[] attr_exceptions = new Attributevalidationexception[1]; Attributevalidationexception attr_exception = new Attributevalidationexception ("Description", "Required value is not" specified. "); Attr_exceptions[0] = attr_exception; Validationexception ve = new Validationexception (dialogmodelentity,attr_exceptions); Arguments.setobject (" Outvalidatedmodelentity ", dialogmodelentity); Arguments.setobject ("Outvalidationexception", ve); OptionSet options = Action_context.getoptionset (); Option LocalOption2 = options.getoption ("Validation-error");
Application Status
If you need to use your own defined non-Create, Update dialog is validated,
or update depending on the status of the updated fields and required validation is different, you can consider this way.
(Of course, in addition to this side of the processing, but also need to combine other parts to complete the function)