You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Fritz Pröbstle (JIRA)" <de...@tapestry.apache.org> on 2008/07/14 08:49:32 UTC
[jira] Issue Comment Edited: (TAPESTRY-2514) onValidate and
property-setters are called in wrong execution order
[ https://issues.apache.org/jira/browse/TAPESTRY-2514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613247#action_12613247 ]
fritz.pro edited comment on TAPESTRY-2514 at 7/13/08 11:49 PM:
--------------------------------------------------------------------
I did not realize how to get the value of the Filed i want to validate.
Now I saw that you can transfer it to the onValidateXX(..) by Parameter.
-----------------------------
void onValidateFromCount(Integer value) throws ValidationException
{
if (value.equals(13)) throw new ValidationException("Thirteen is an unlucky number.");
}
+---+
This event gets fired <<after>> the normal validators. It is passed the <parsed> value (not the string from
the client, but the object value from the translator, or from the "parseclient" event handler).
The method may not return a value, but may throw a ValidationException to indicate a problem with
the value.
-----------------
was (Author: fritz.pro):
I did not realize how to get the value of the Filed i want to validate.
Now I saw that you can transfer it to the onValidateXX(..) by Parameter.
> onValidate and property-setters are called in wrong execution order
> --------------------------------------------------------------------
>
> Key: TAPESTRY-2514
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2514
> Project: Tapestry
> Issue Type: Bug
> Affects Versions: 5.0.13
> Reporter: Fritz Pröbstle
> Assignee: Howard M. Lewis Ship
>
> In a form submission first the onValidateXX() is called.
> (No Properties are yet set and you can not validate ).
> Then the setXX()-Property setters are called.
> Solution:
> Change the excution order: set Properties first then call onValidateXX() .
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org