Praise Tapestry! I guessed the solution just by intuition.
To retrieve the new value you just need to introduce a parameter.

Field validation is done before setting actual properties.
I read the documentation but I missed the parameter of onValidate. 
http://tapestry.apache.org/tapestry5/tapestry-core/guide/validation.html
(At bottom)

so correct would be:

onValidateFromNewItem(String newItemValue) throws ValidationException { }

-----Ursprüngliche Nachricht-----
Von: Martin Kersten [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 19. März 2008 11:40
An: Tapestry users
Betreff: OnValidate and OnSuccess

Having a simple form containing a simple field (TextField) I have problems 
validating its content.

<t:form id="newItemForm">
   <input t:type="textarea" t:id="newItem" t:value="newItem"/><br/> </t:form>


The validation is done using onValidate. The Form is processed using onSuccess. 
The problem arises that onValidate is invoked *before* the property is updated 
with the value to validate.

Do I have to inject the textarea with the given id?


Cheers,

Martin (Kersten)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to