cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Client side validation
Date Mon, 22 Nov 2004 22:49:04 GMT
Luca Garulli wrote:

>In theory we can have some JS script that can be usable in client AND
>server sides. If these scripts contains no dependencies with
>flowscript objects (cocoon, etc) and Java code we can deploy to both
>sides!
>  
>

Considering that the object model are very different in the form and in 
the client, that seems difficult to me.

>However what I'd like to see is to reuse the validation rules in the
>form-definition. Implementing "assert" is much more difficult. As
>Sylvain wrote, should be quite simple to implement three kinds of
>validations: check on field presence, basic format checks and a custom
>function.
>
>This should cover the 90% of user requirements.
>
>We need this feature soon, so I've thinked to write a transformer that
>enrich the form instance with javascript functions (Decorator Pattern)
>and can be placed in the pipeline just before the final XSL.
>  
>

Please consider my proposal of having validators output an XML fragment 
that is later transformed to JS by the presentation stylesheets. It 
would just require to upgrade the XSLs.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


Mime
View raw message