after client validation is skipped,
you have to catch the selected event from that button
and clear validation errors on form


something like this:

public void onSelectedFromCancel(){
    _form.clearErrors();
}

Davor Hrg

On Fri, Apr 18, 2008 at 9:28 AM, Jan Vissers <[EMAIL PROTECTED]> wrote:

> Using this script - indeed skips client side validation.
> However when I come back to the form - the respective fields are (still)
> marked as erroneous. Any way around that?
>
> -J.
>
> On Tue, 2008-04-15 at 20:38 +0200, Davor Hrg wrote:
> > you can do it with javascript... sth like this (not tested)
> >
> > put a normal
> > <input type="submit" value="${cancel}" onclick="return
> > avoidValidation(this)">
> >
> >
> > function avoidValidation(elem){
> >     var form = elem.parentNode;
> >     //find form
> >     while(form && form.tagName != "FORM") form = form.parentNode;
> >     form.onsubmit = null;
> >     return true;
> > }
> >
> > I've added a jira for this some time ago ... and it got prolonged to
> T5.1
> > somehow :(
> >
> > https://issues.apache.org/jira/browse/TAPESTRY-2109
> >
> >
> >
> >
> > On Tue, Apr 15, 2008 at 7:35 PM, Filip S. Adamsen <[EMAIL PROTECTED]>
> wrote:
> >
> > > There is no way to do this as far as I know. I believe the current
> > > workaround is to create an action link styled as a button and do
> whatever
> > > needs doing there.
> > >
> > > -Filip
> > >
> > >
> > > On 2008-04-15 19:34, Jan Vissers wrote:
> > >
> > > > I'm getting the hang of it --- and liking it!
> > > >
> > > > Yet another question;
> > > > How can I bypass normal client side validation, in case I have a
> form
> > > > that includes a 'Cancel' button. Currently I need to enter something
> > > > valid before I can 'Cancel' my action - not really what I want ;-)
> > > >
> > > > -J.
> > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > 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]
>
>

Reply via email to