cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Deshaies <bdesha...@yahoo.com>
Subject Re: how to do form custom validators
Date Tue, 25 May 2004 22:53:01 GMT
I looked at the sample you posted Vadim. I have a question and a
comment regarding validation using <fd:javascript>. In those JS
snippets, can you access the cocoon object (like session) and can you
load your own Java classes (Packages.com.xyz.Object)?

And my comment is this: for simple forms, including the validation
rules such as which fields are required in the form definition itself
is probably fine. But on larger applications with complex validation
logic (think income tax report), people are likely to implement some
sort of external validator component. My concern is that by including
the validation code in the form definition, you're mixing the
presentation and business layer. In that respect, I preferred the
old-style JS validation function, which correctly put the business
logic out of the presentation layer.

Benoit Deshaies

--- Vadim Gritsenko <vadim@reverycodes.com> wrote:
> See <fd:validation> tags in:
>
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/forms/samples/forms/form1.xml?rev=1.7&view=auto



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message