You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Julio C. Rivera" <ju...@ya.com> on 2005/01/06 10:57:48 UTC
Re: Cancel Client Side Validation
I solve it making cancel button a DirectLink, so form isn't submitted
and client side validation isn't executed.
See http://thread.gmane.org/gmane.comp.java.tapestry.user/13563, its a
discussion about it.
Best regards.
Julio
El jue, 06-01-2005 a las 09:57, Steven escribió:
> Hello,
>
> This is my first post on this mailing list and i'm quite newbie with
> tapestry, so this question might be as easy as developing application
> with tapestry to answer.
>
> I wondered how to disable client-side validation (when canceling a form
> for exemple).
> Is this possible or should i use sever validation everywhere user can
> cancel a form.
>
> Thx in advance,
> Best regards,
>
> Steven
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Cancel Client Side Validation
Posted by Howard Lewis Ship <hl...@gmail.com>.
That's really clever, Matt.
I've hit these same problems myself.
My current thinking is that there needs to be a client-side library
to manage this stuff.
There's really three reasons to submit a form:
1. To process the provided input and continue
2. To cancel the form submission
3. To refresh the page
Tapestry only handles the first case well.
#2 could use a special Form listener.
The latter two cases should bypass onsubmit validation handlers.
In the final case, some onsubmit handlers should still fire, however;
for example, the Palette hooks the form's onsubmit and that still
needs to work, even if the form is being resubmitted for update.
On Thu, 6 Jan 2005 16:53:37 -0700, Matt Raible <li...@raibledesigns.com> wrote:
> The easiest way I've found to cancel client side validation is to add
> the following to your cancel button:
>
> onclick="form.onsubmit = null"
>
> Here's my full cancel button that calls a cancel() listener method:
>
> <input type="submit" class="button" jwcid="@Submit"
> value="message:button.cancel" id="cancel"
> listener="ognl:listeners.cancel"
> onclick="form.onsubmit = null"/>
>
> Matt
>
> Julio C. Rivera wrote:
>
> > I solve it making cancel button a DirectLink, so form isn't submitted
> > and client side validation isn't executed.
> >
> > See http://thread.gmane.org/gmane.comp.java.tapestry.user/13563, its a
> > discussion about it.
> >
> > Best regards.
> > Julio
> >
> > El jue, 06-01-2005 a las 09:57, Steven escribió:
> >
> >> Hello,
> >>
> >> This is my first post on this mailing list and i'm quite newbie with
> >> tapestry, so this question might be as easy as developing application
> >> with tapestry to answer.
> >>
> >> I wondered how to disable client-side validation (when canceling a
> >> form for exemple).
> >> Is this possible or should i use sever validation everywhere user can
> >> cancel a form.
> >>
> >> Thx in advance,
> >> Best regards,
> >>
> >> Steven
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
Professional Tapestry training, mentoring, support
and project work. http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Cancel Client Side Validation
Posted by Matt Raible <li...@raibledesigns.com>.
The easiest way I've found to cancel client side validation is to add
the following to your cancel button:
onclick="form.onsubmit = null"
Here's my full cancel button that calls a cancel() listener method:
<input type="submit" class="button" jwcid="@Submit"
value="message:button.cancel" id="cancel"
listener="ognl:listeners.cancel"
onclick="form.onsubmit = null"/>
Matt
Julio C. Rivera wrote:
> I solve it making cancel button a DirectLink, so form isn't submitted
> and client side validation isn't executed.
>
> See http://thread.gmane.org/gmane.comp.java.tapestry.user/13563, its a
> discussion about it.
>
> Best regards.
> Julio
>
> El jue, 06-01-2005 a las 09:57, Steven escribió:
>
>> Hello,
>>
>> This is my first post on this mailing list and i'm quite newbie with
>> tapestry, so this question might be as easy as developing application
>> with tapestry to answer.
>>
>> I wondered how to disable client-side validation (when canceling a
>> form for exemple).
>> Is this possible or should i use sever validation everywhere user can
>> cancel a form.
>>
>> Thx in advance,
>> Best regards,
>>
>> Steven
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org