cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Gianni <>
Subject Re: setting a validation error on another field
Date Fri, 10 Feb 2006 04:48:53 GMT
Hi Joost,
there is one situation in which .validate() returns true even if there 
are errors, when the widget (in this case the Group) or one of its 
ancestors, are in any state different from ACTIVE. Looking your code 
snippet it seems like you set the group state AFTER calling validate(), 
but i think you could try to put some println here and there so see if 
BEFORE calling validate() something else placed the group or its 
ancestors in an invisible, output or disbled state.

You can try by calling parent.getCombinedState() to see the "combined" 
state of the widget (that is, his state or its ancestors one), or even 
calling parent.getCombinedState().isValidatingValues() .. if this last 
statement returns false, then this is the problem, if return true, then 
something else is going on :)

Joost Kuif wrote:

>Andrew, thanks for your help. It's working, ALMOST.. 
>		<fd:action id="next">
>			<fd:label><i18n:text
>			<fd:on-action>
>				<fd:javascript>
>					var parent =
java.lang.System.out.println("Will i really validate? " + 

>					if (parent.validate()) {

Hope this helps,

Simone Gianni

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

View raw message