AW: AW: OnValidate and OnSuccess

2008-03-19 Thread Martin Kersten
I allready use it and it is not set.

Give you an idea:

Page {

   private String item = "default";

   onSuccessFromItemForm() {
   print(item) -> "item";
   }

   onValidateFromItem() throws ValidationException {
print(item) -> "default";
   }
}

You see. I would have expected that onValidateFromItem that item is set.

> Yes, I know. And if you use onValidateFromNewItem 
> (with newItem the id of the field, not the form) you will see that 
> the value of the property is set. Or are you already using the id from the 
> field?


Regards,
Olivier


On Wed, 19 Mar 2008 13:47:37 +0100, "Martin Kersten"
<[EMAIL PROTECTED]> wrote:
> Hi Oivier,
> 
>I actually use onValidateFromComponent. The problem is that the 
> property in question was not set to the field value to check.
> 
> 
> Cheers,
> 
> Martin (Kersten)
> 
> -Ursprüngliche Nachricht-
> Von: Olivier Jacquet [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 19. März 2008 12:47
> An: Tapestry users
> Betreff: Re: OnValidate and OnSuccess
> 
> 
> Hi,
> 
> 
> I ran into this issue as well. onValidate() is actually called 
> multiple times. Try it with onValidateFromNewItem(). I can't check if 
> that's how I solved it here.
> 
> 
> Regards,
> Olivier
> 
> 
> 
> 
> On Wed, 19 Mar 2008 11:39:55 +0100, "Martin Kersten"
> <[EMAIL PROTECTED]> wrote:
>> Having a simple form containing a simple field (TextField) I have 
>> problems validating its content.
>> 
>> 
>> 
>> 
>> 
>> 
>> 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]
> 
> 
> -
> 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]


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



Re: AW: OnValidate and OnSuccess

2008-03-19 Thread Olivier Jacquet


Yes, I know. And if you use onValidateFromNewItem (with newItem the id of
the field, not the form) you will see that the value of the property is
set. Or are you already using the id from the field?


Regards,
Olivier


On Wed, 19 Mar 2008 13:47:37 +0100, "Martin Kersten"
<[EMAIL PROTECTED]> wrote:
> Hi Oivier,
> 
>I actually use onValidateFromComponent. The problem is that the
> property
> in question was not set to the field value to check.
> 
> 
> Cheers,
> 
> Martin (Kersten)
> 
> -Ursprüngliche Nachricht-
> Von: Olivier Jacquet [mailto:[EMAIL PROTECTED] 
> Gesendet: Mittwoch, 19. März 2008 12:47
> An: Tapestry users
> Betreff: Re: OnValidate and OnSuccess
> 
> 
> Hi,
> 
> 
> I ran into this issue as well. onValidate() is actually called multiple
> times. Try it with onValidateFromNewItem(). I can't check if that's how I
> solved it here.
> 
> 
> Regards,
> Olivier
> 
> 
> 
> 
> On Wed, 19 Mar 2008 11:39:55 +0100, "Martin Kersten"
> <[EMAIL PROTECTED]> wrote:
>> Having a simple form containing a simple field (TextField) I have 
>> problems validating its content.
>> 
>> 
>> 
>> 
>> 
>> 
>> 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]
> 
> 
> -
> 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]



AW: OnValidate and OnSuccess

2008-03-19 Thread Martin Kersten
Hi Oivier,

   I actually use onValidateFromComponent. The problem is that the property
in question was not set to the field value to check.


Cheers,

Martin (Kersten)

-Ursprüngliche Nachricht-
Von: Olivier Jacquet [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 19. März 2008 12:47
An: Tapestry users
Betreff: Re: OnValidate and OnSuccess


Hi,


I ran into this issue as well. onValidate() is actually called multiple times. 
Try it with onValidateFromNewItem(). I can't check if that's how I solved it 
here.


Regards,
Olivier




On Wed, 19 Mar 2008 11:39:55 +0100, "Martin Kersten"
<[EMAIL PROTECTED]> wrote:
> Having a simple form containing a simple field (TextField) I have 
> problems validating its content.
> 
> 
> 
> 
> 
> 
> 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]


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