cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: [RT] Revisiting Woody's form definition
Date Wed, 30 Jul 2003 09:18:14 GMT
Carsten Ziegeler wrote:

>Sylvain Wallez wrote:
>>This calls for binding-specific validators that know both the
>>application model and the form model. I proposed to add XPath predicates
>>to the binding for this purpose. E.g :
>><wb:field id="foo-field" path="foo">
>>  <wb:validate>
>>    <wb:assert test="java:validateFoo($currentBean, $currentField/value)">
>>    <wi:fail-message>Business model rejects value for
>>  </wb:validate>
>>The variables are predefined by the binding framework (this is at the
>>random thought state) :
>>- $currentBean is the bean holding the current property ("foo").
>>- $currentField is the "foo-field" that is currently being bound.
>>The "test" expression would thus call the "validateFoo" method on the
>>business object.
>Ok, this is a possibility, but I don't like it :)
>I don't want to "code" this in the xml; it could be done automatically
>by some rules, like a validateXXX() method in the business model.
>I agree, that your suggestion makes sense in some cases, so I would still
>go for both :)

Not a problem, since <wb:assert> is just a particular implementation of 
Validator. So what about :



Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -

View raw message