BIN P621c Documentation
Author: Michele Vivoda
Version: 21
Description: Sum must be 100 - Optional Field - Velocity Grammar Variation - Instance constraint example from Eleusoft Application Documentation
Created: 2014-09-29
Modified: 2014-09-29
Source:
Modifica Bin W3C Schema Json-Schema Java Bean Code Default Value as XML<complexType name='Form' description='Sum must be 100 - Optional Field - Velocity Grammar Variation - Instance constraint example from Eleusoft Application Documentation'> <field name='A' minOccurs='0' type='xs:int' node='attribute'></field> <field name='B' minOccurs='0' type='xs:int' node='attribute'></field> <!-- optional <constraint name='BothA_andB_MustBePresent' category='boolean' selector='.'> <expression grammar='velocity' path='#if($value.isNotAbsent("A") && $value.isNotAbsent("B")) true #end'/> </constraint> --> <constraint name='SumMustBeHundred' category='boolean' selector='.'> <expression grammar='velocity' path='#if( ($value.isNotAbsent("A") and $value.isNotAbsent("B")) && (($value.getInteger("A") + $value.getInteger("B"))==100)) true #end'></expression> </constraint> </complexType>application/xml //efbin.org/osk/P621c //efbin.org/bin/P621c Eleusoft ARIA