You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ben Eng <be...@jetpen.com> on 2005/03/26 19:06:08 UTC

Re: form validation

On Sat, Mar 26, 2005 at 08:03:42AM -0500, Erik Hatcher wrote:
> Do you have specific patches/suggestions for the improvement of 
> validation?

How about having the form component enforce refresh-resubmit
prevention as an option?

Ben

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


Re: form validation

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Mar 27, 2005, at 3:31 PM, Ben Eng wrote:
> On Sat, Mar 26, 2005 at 08:49:30PM -0500, Erik Hatcher wrote:
>>
>> On Mar 26, 2005, at 1:06 PM, Ben Eng wrote:
>>
>>> On Sat, Mar 26, 2005 at 08:03:42AM -0500, Erik Hatcher wrote:
>>>> Do you have specific patches/suggestions for the improvement of
>>>> validation?
>>>
>>> How about having the form component enforce refresh-resubmit
>>> prevention as an option?
>>
>> Could you elaborate on specifically what you desire here?
>>
>> What I've done in the past to prevent forms from being submitted
>> successively (double-clicking the submit button is the prime culprit)
>> is to disable the submit button with JavaScript after the first click.
>
> This is related to your other thread of discussion. Hitting the
> browser refresh button or using the browser back button can resubmit
> the form. If the Flow Synchronizer Token pattern is the best way to
> detect and prevent the resubmit, I think it would be nice for the Form
> component to implement this.

My approach is to redirect after a form submit that I don't want to be 
resubmittable.  The token trick would be good for situations where a 
user might hit the back button and press submit again, though this 
isn't of much concern for my applications.

Adding the form token check into Tapestry makes sense to me.  Has 
someone implemented this and willing to donate their code?

	Erik


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


Programmatic validation - How to have same behavior as Tapestry?

Posted by david joffrin <da...@hotmail.com>.
Hi,

If I have Label and an Entry field linked together, Tapestry will 
automatically turn the label in RED if there is an error on that entry 
field.
How can I implement the same behavior for programmatic exception; I mean by 
that in my application code.

Thanks.
DvJ



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


Re: form validation

Posted by Ben Eng <be...@jetpen.com>.
On Sat, Mar 26, 2005 at 08:49:30PM -0500, Erik Hatcher wrote:
> 
> On Mar 26, 2005, at 1:06 PM, Ben Eng wrote:
> 
> >On Sat, Mar 26, 2005 at 08:03:42AM -0500, Erik Hatcher wrote:
> >>Do you have specific patches/suggestions for the improvement of
> >>validation?
> >
> >How about having the form component enforce refresh-resubmit
> >prevention as an option?
> 
> Could you elaborate on specifically what you desire here?
> 
> What I've done in the past to prevent forms from being submitted 
> successively (double-clicking the submit button is the prime culprit) 
> is to disable the submit button with JavaScript after the first click.

This is related to your other thread of discussion. Hitting the
browser refresh button or using the browser back button can resubmit
the form. If the Flow Synchronizer Token pattern is the best way to
detect and prevent the resubmit, I think it would be nice for the Form
component to implement this.

Ben

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


Re: form validation

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Mar 26, 2005, at 1:06 PM, Ben Eng wrote:

> On Sat, Mar 26, 2005 at 08:03:42AM -0500, Erik Hatcher wrote:
>> Do you have specific patches/suggestions for the improvement of
>> validation?
>
> How about having the form component enforce refresh-resubmit
> prevention as an option?

Could you elaborate on specifically what you desire here?

What I've done in the past to prevent forms from being submitted 
successively (double-clicking the submit button is the prime culprit) 
is to disable the submit button with JavaScript after the first click.

	Erik


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