You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Alex Kwan <er...@hotmail.com> on 2004/04/19 15:11:36 UTC

[Strange Behavior] Submit Listener and the Form Listener

Hi, All
    I found a inconsistent and strange behavior when submitting a form.

    If a form only contains a validFiled and a Submit, when user enter some
data in the valid field and press enter.
The form submitted. But only the form listener is invoked. The listener of
the submit button did not hear anything.

    But in some completed form, the submit button listener will be invoke
too.

    I do not know whether this is a bug of browser or a bug of Tapestry.
Anybody has this similar problem?
    How do I let the tapestry always fire the listener of the submit button?

    Thanks in advance.

Alex



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


Re: [Strange Behavior] Submit Listener and the Form Listener

Posted by Alex Kwan <er...@hotmail.com>.
Maybe this problem was caused by the browser, has anybody encounter this
problem too?

----- Original Message ----- 
From: "Alex Kwan" <er...@hotmail.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Monday, April 19, 2004 9:29 PM
Subject: Re: [Strange Behavior] Submit Listener and the Form Listener


> In Some browser, if you press enter in some field, that action equals to
> clicking the default submit button, that's why this form can be submitted.
> And in some form, the listener of the submit button will be invoked if you
> press enter in some fields, that's why I say this behavior is
inconsistent.
>
>
> ----- Original Message ----- 
> From: "Programozás" <pr...@hotmail.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Monday, April 19, 2004 9:20 PM
> Subject: Re: [Strange Behavior] Submit Listener and the Form Listener
>
>
> > It's logical I think:
> > - you press a submit button: your button's listener is invoked
> > - you press the enter in a field: nobody knows which submit button's
> > listener should be invoked
> >
> > In your case simply do not specify the listener of the submit button
(you
> > may not use the Submit component at all, only simple html submit).
> > Only specify the listener of the Form.
> >
> > Norbi
> >
> > ----- Original Message ----- 
> > From: "Alex Kwan" <er...@hotmail.com>
> > To: "Tapestry users" <ta...@jakarta.apache.org>
> > Sent: Monday, April 19, 2004 3:11 PM
> > Subject: [Strange Behavior] Submit Listener and the Form Listener
> >
> >
> > > Hi, All
> > >     I found a inconsistent and strange behavior when submitting a
form.
> > >
> > >     If a form only contains a validFiled and a Submit, when user enter
> > some
> > > data in the valid field and press enter.
> > > The form submitted. But only the form listener is invoked. The
listener
> of
> > > the submit button did not hear anything.
> > >
> > >     But in some completed form, the submit button listener will be
> invoke
> > > too.
> > >
> > >     I do not know whether this is a bug of browser or a bug of
Tapestry.
> > > Anybody has this similar problem?
> > >     How do I let the tapestry always fire the listener of the submit
> > button?
> > >
> > >     Thanks in advance.
> > >
> > > Alex
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
>
> ---------------------------------------------------------------------
> 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: [Strange Behavior] Submit Listener and the Form Listener

Posted by Alex Kwan <er...@hotmail.com>.
In Some browser, if you press enter in some field, that action equals to
clicking the default submit button, that's why this form can be submitted.
And in some form, the listener of the submit button will be invoked if you
press enter in some fields, that's why I say this behavior is inconsistent.


----- Original Message ----- 
From: "Programozás" <pr...@hotmail.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Monday, April 19, 2004 9:20 PM
Subject: Re: [Strange Behavior] Submit Listener and the Form Listener


> It's logical I think:
> - you press a submit button: your button's listener is invoked
> - you press the enter in a field: nobody knows which submit button's
> listener should be invoked
>
> In your case simply do not specify the listener of the submit button (you
> may not use the Submit component at all, only simple html submit).
> Only specify the listener of the Form.
>
> Norbi
>
> ----- Original Message ----- 
> From: "Alex Kwan" <er...@hotmail.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Monday, April 19, 2004 3:11 PM
> Subject: [Strange Behavior] Submit Listener and the Form Listener
>
>
> > Hi, All
> >     I found a inconsistent and strange behavior when submitting a form.
> >
> >     If a form only contains a validFiled and a Submit, when user enter
> some
> > data in the valid field and press enter.
> > The form submitted. But only the form listener is invoked. The listener
of
> > the submit button did not hear anything.
> >
> >     But in some completed form, the submit button listener will be
invoke
> > too.
> >
> >     I do not know whether this is a bug of browser or a bug of Tapestry.
> > Anybody has this similar problem?
> >     How do I let the tapestry always fire the listener of the submit
> button?
> >
> >     Thanks in advance.
> >
> > Alex
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>

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


Re: [Strange Behavior] Submit Listener and the Form Listener

Posted by Programozás <pr...@hotmail.com>.
It's logical I think:
- you press a submit button: your button's listener is invoked
- you press the enter in a field: nobody knows which submit button's
listener should be invoked

In your case simply do not specify the listener of the submit button (you
may not use the Submit component at all, only simple html submit).
Only specify the listener of the Form.

Norbi

----- Original Message ----- 
From: "Alex Kwan" <er...@hotmail.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Monday, April 19, 2004 3:11 PM
Subject: [Strange Behavior] Submit Listener and the Form Listener


> Hi, All
>     I found a inconsistent and strange behavior when submitting a form.
>
>     If a form only contains a validFiled and a Submit, when user enter
some
> data in the valid field and press enter.
> The form submitted. But only the form listener is invoked. The listener of
> the submit button did not hear anything.
>
>     But in some completed form, the submit button listener will be invoke
> too.
>
>     I do not know whether this is a bug of browser or a bug of Tapestry.
> Anybody has this similar problem?
>     How do I let the tapestry always fire the listener of the submit
button?
>
>     Thanks in advance.
>
> Alex
>
>
>
> ---------------------------------------------------------------------
> 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