cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raphaël Piéroni <>
Subject Re: [Cocoon 2.2 + Cforms] Validation a field using the Databas e
Date Thu, 08 Nov 2007 09:18:29 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<body bgcolor="#ffffff" text="#000000">
Grzegorz Kossakowski a &eacute;crit&nbsp;:
<blockquote cite="" type="cite">
  <pre wrap="">Rapha&euml;l Pi&eacute;roni pisze:
  <blockquote type="cite">
    <pre wrap="">Thanks for the answer.

Is this functionnality avaliable in 1.0.0-RC1 ? It seems not.

When that new version wil be released ?
  <pre wrap=""><!---->
As I pointed out, Spring-based Forms will be released as 1.1.0. I don't know what are current
and if there any show-stoppers for 1.1.0's first milestone release. I guess it's better to
ask on
dev list. Hint: usually pleasant bugging developers to push the release can give good result.

Meanwhile having the springified validator, i added them myself in the
like in :<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var form = new Form("view/user/create.cform");<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var validator = spring.getBean("createUserValidator");<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; form.lookupWidget('userName').addValidator(validator);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; form.lookupWidget('unixLogin').addValidator(validator);<br>
In the validator i do :<br>
ValidationError error = new
ValidationError("error.createUser.userName", true);<br>
((Field) widget).setValidationError(error);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
&nbsp;&nbsp; return false;<br>
I saw (using logs) that the validation is false (which is what i test)<br>
But the form completes as if it was validated.<br>
<blockquote cite="" type="cite">
  <pre wrap="">Anyway, you can still develop Avalon-based validator using 1.0.0-RC1
version of Forms. The choice is


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message