You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ryon Day <ry...@yahoo.com> on 2013/06/13 18:24:04 UTC

Disabling filling form with old values on validation failure

I have a situation where the old form values are absolutely NOT helpful in any way after a validation failure; I cannot find a way to prevent tapestry from autofilling the old form values.

Is this a possibility or am I going to have to subclass the validation tracker implementation to provide value clearing? I do not want to clear the whole tracker because I want to form to be in error, but I do not want the old input in the form fields.

Thanks!


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Disabling filling form with old values on validation failure

Posted by Ivan Khalopik <ik...@gmail.com>.
You can reset field recorded value by calling recordInput method with null
parameter value:

tracker.recordInput(myField, null);

The same way to reset recorded error for field:

tracker.recordError(myField, null);




On Fri, Jun 14, 2013 at 2:11 AM, Ryan How <ry...@zbit.net.au> wrote:

> It's really simple to make a validation tracker!. I'd just make your own
> one to do what you want. Will take you less than 5 minutes I'm sure!
>
> But yes the tapestry auto tracking thing is a pain in the bum sometimes,
> I've always struggled with it being too smart and not being able to turn it
> off easily. Especially with AJAX because it doesn't work as 2 requests like
> usual tapestry request, so storing the values in a flash variable then
> resets the form the following request and arrgg!
>
>
>
>
> On 14/06/2013 12:39 AM, Muhammad Gelbana wrote:
>
>> I haven't tried this but in your validation method, have you tried
>> clearing
>> the variable bound to your field ?
>>
>>
>> On Thu, Jun 13, 2013 at 6:24 PM, Ryon Day <ry...@yahoo.com> wrote:
>>
>>  I have a situation where the old form values are absolutely NOT helpful
>>> in
>>> any way after a validation failure; I cannot find a way to prevent
>>> tapestry
>>> from autofilling the old form values.
>>>
>>> Is this a possibility or am I going to have to subclass the validation
>>> tracker implementation to provide value clearing? I do not want to clear
>>> the whole tracker because I want to form to be in error, but I do not
>>> want
>>> the old input in the form fields.
>>>
>>> Thanks!
>>>
>>>
>>> ------------------------------**------------------------------**
>>> ---------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
BR
Ivan

Re: Disabling filling form with old values on validation failure

Posted by Ryan How <ry...@zbit.net.au>.
It's really simple to make a validation tracker!. I'd just make your own 
one to do what you want. Will take you less than 5 minutes I'm sure!

But yes the tapestry auto tracking thing is a pain in the bum sometimes, 
I've always struggled with it being too smart and not being able to turn 
it off easily. Especially with AJAX because it doesn't work as 2 
requests like usual tapestry request, so storing the values in a flash 
variable then resets the form the following request and arrgg!



On 14/06/2013 12:39 AM, Muhammad Gelbana wrote:
> I haven't tried this but in your validation method, have you tried clearing
> the variable bound to your field ?
>
>
> On Thu, Jun 13, 2013 at 6:24 PM, Ryon Day <ry...@yahoo.com> wrote:
>
>> I have a situation where the old form values are absolutely NOT helpful in
>> any way after a validation failure; I cannot find a way to prevent tapestry
>> from autofilling the old form values.
>>
>> Is this a possibility or am I going to have to subclass the validation
>> tracker implementation to provide value clearing? I do not want to clear
>> the whole tracker because I want to form to be in error, but I do not want
>> the old input in the form fields.
>>
>> Thanks!
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Disabling filling form with old values on validation failure

Posted by Muhammad Gelbana <m....@gmail.com>.
I haven't tried this but in your validation method, have you tried clearing
the variable bound to your field ?


On Thu, Jun 13, 2013 at 6:24 PM, Ryon Day <ry...@yahoo.com> wrote:

> I have a situation where the old form values are absolutely NOT helpful in
> any way after a validation failure; I cannot find a way to prevent tapestry
> from autofilling the old form values.
>
> Is this a possibility or am I going to have to subclass the validation
> tracker implementation to provide value clearing? I do not want to clear
> the whole tracker because I want to form to be in error, but I do not want
> the old input in the form fields.
>
> Thanks!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>