You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joel Trunick <Jo...@SmartPrice.com> on 2003/04/17 16:39:27 UTC

Form Listener vs. Submit Listener

Is there a difference whether you "do stuff" in the Form listener as opposed
to the Submit listener for the same form? Does it matter in regard to rewind
or other considerations? Is one preferable to other? 

I get the impression there may be an important distinction, but not sure
what it is. Anyone?

Joel

RE: Form Listener vs. Submit Listener

Posted by Viktor Szathmary <ph...@imapmail.org>.
hi,

> Only if you are doing a looping operation; in that case, the 
> Submit's listener must not upset the loop (add or remove 
> elements).  The rewind must exactly match the render.  Short 
> answer: only if you're doing something tricky.

you would probably want to bind the listeners to the Submit buttons by
default, eg. you can have more than one button and you wish to perform
different actions.. also, make sure you dont have the listener set for
both the Form and Submit (unless you know what you're doing :), since it
will be invoked twice then...

regards,
    viktor

-- 
http://www.fastmail.fm - Same, same, but differentÂ…

RE: Form Listener vs. Submit Listener

Posted by Lieven Govaerts <lg...@axelera.net>.
1. No they are not! I'm sorry this may seem confusing, but:
I commented out the setter's as a means of debugging. When tapestry 
tries to find them, it will throw an exception. This is a good
indication that the setter is being called.

In my case I don't get any exception, so they are definitely not being 
called.

2. tapestry has been doing some magical things until now for me, maybe
I'm getting a bit overdemanding :)

This is getting a bit too complicated to explain by email. I will 
debug this with Eclipse/Tomcat tomorrow at the office and let you know
what went wrong.

regards,

Lieven.


-----Original Message-----
From: Howard M. Lewis Ship [mailto:hlship@attbi.com]
Sent: Thursday, April 17, 2003 11:33 PM
To: 'Tapestry users'
Subject: RE: Form Listener vs. Submit Listener




> -----Original Message-----
> From: Lieven Govaerts [mailto:lgo@axelera.net] 
> Sent: Thursday, April 17, 2003 5:05 PM
> To: Tapestry users
> Subject: RE: Form Listener vs. Submit Listener
> 
> 
> 1. I commented them out, so I get an exception when trying to 
> be called.

So, your accessor methods ARE getting called?  Then what exactly is the
problem?

 
> 2. No

I have a sneaking suspicion that Tapestry is doing exactly what you are
telling it to do, but you may be expecting it to do some magic instead ...

> 
> I can send you some stripped down page/code if your willing to take a 
> moment to look into it.
> 
> Lieven.
> 
> -----Original Message-----
> From: Howard M. Lewis Ship [mailto:hlship@attbi.com]
> Sent: Thursday, April 17, 2003 10:40 PM
> To: 'Tapestry users'
> Subject: RE: Form Listener vs. Submit Listener
> 
> 
> You've set breakpoints on the setXXX() methods, to verify 
> that they aren't being called?
> 
> Your listener method does not throw an exception?
> 
> 


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


RE: Form Listener vs. Submit Listener

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.

> -----Original Message-----
> From: Lieven Govaerts [mailto:lgo@axelera.net] 
> Sent: Thursday, April 17, 2003 5:05 PM
> To: Tapestry users
> Subject: RE: Form Listener vs. Submit Listener
> 
> 
> 1. I commented them out, so I get an exception when trying to 
> be called.

So, your accessor methods ARE getting called?  Then what exactly is the
problem?

 
> 2. No

I have a sneaking suspicion that Tapestry is doing exactly what you are
telling it to do, but you may be expecting it to do some magic instead ...

> 
> I can send you some stripped down page/code if your willing to take a 
> moment to look into it.
> 
> Lieven.
> 
> -----Original Message-----
> From: Howard M. Lewis Ship [mailto:hlship@attbi.com]
> Sent: Thursday, April 17, 2003 10:40 PM
> To: 'Tapestry users'
> Subject: RE: Form Listener vs. Submit Listener
> 
> 
> You've set breakpoints on the setXXX() methods, to verify 
> that they aren't being called?
> 
> Your listener method does not throw an exception?
> 
> 


RE: Form Listener vs. Submit Listener

Posted by Lieven Govaerts <lg...@axelera.net>.
1. I commented them out, so I get an exception when trying to be called. 
2. No

I can send you some stripped down page/code if your willing to take a 
moment to look into it.

Lieven.

-----Original Message-----
From: Howard M. Lewis Ship [mailto:hlship@attbi.com]
Sent: Thursday, April 17, 2003 10:40 PM
To: 'Tapestry users'
Subject: RE: Form Listener vs. Submit Listener


You've set breakpoints on the setXXX() methods, to verify that they aren't
being called?

Your listener method does not throw an exception?

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: Lieven Govaerts [mailto:lgo@axelera.net] 
> Sent: Thursday, April 17, 2003 4:38 PM
> To: Tapestry users
> Subject: RE: Form Listener vs. Submit Listener
> 
> 
> Ok, I have a simple page with a form, some textfields and one 
> submit button, connected in the form object with a 'store' 
> function in my page object.
> 
> My form fields are correctly initialised with the values 
> through getXXX() methods, and after I submit, values are 
> copied correctly back through the setXXX() functions.
> 
> ->
> Now I add a second submit button, and define the binding of 
> the buttons and their listeners in the Submit buttons ( as 
> shown in my previous mail with the 'store' and 'checkout' 
> buttons ). I remove the listener defined in the Form component.
> 
> What happens now, is that the form fields are still correctly 
> initialised, but after I press one of the submit buttons, 
> data is not copied back to the Bean/Page object.
> 
> I don't get any exception, only empty data fields.
> 
> I hope this makes my problem more clear, if not, I will go 
> through the code with the debugger tomorrow and see what is 
> different in the two methods.
> 
> Lieven.
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Howard M. Lewis Ship [mailto:hlship@attbi.com]
> Sent: Thursday, April 17, 2003 9:51 PM
> To: 'Tapestry users'
> Subject: RE: Form Listener vs. Submit Listener
> 
> 
> It basically comes down to what the listener methods on the 
> Submits actually do. The best thing is for these listeners to 
> set flags and/or store information that is only utilized in 
> the form's listener method.
> 
> PLEASE be more specific when things fail.  Do you get a Stale 
> Link page?  Do things just not work?
> 
> --
> Howard M. Lewis Ship
> Creator, Tapestry: Java Web Components 
> http://jakarta.apache.org/tapestry
> 
> 
> 
> > -----Original Message-----
> > From: Lieven Govaerts [mailto:lgo@axelera.net]
> > Sent: Thursday, April 17, 2003 3:24 PM
> > To: Tapestry users
> > Subject: RE: Form Listener vs. Submit Listener
> >
> >
> > I seem to have another experience in tapestry 2.3rc1:
> >     <component id="newOrder" type="Form"/>
> >     <component id="checkout" type="Submit">
> >         <static-binding name="label">Checkout</static-binding>
> >         <binding name="listener" expression="listeners.checkout"/>
> >     </component>
> >     <component id="store" type="Submit">
> >         <static-binding name="label">Continue</static-binding>
> >         <binding name="listener" expression="listeners.store"/>
> >     </component>
> >
> > Using the store or checkout button, the rest of the fields 
> are not not 
> > rewound to their value objects. When I use:
> >
> >     <component id="newOrder" type="Form">
> >             <binding name="listener" expression="listeners.store"/>
> >     </component>
> >
> > the rewind is working ok ( and my data saved to the database ).
> >
> > I fail to see a decent solution to this problem, can anyone help me 
> > out? ( upgrading to 2.4 is not an option! )
> >
> > regards,
> >
> > Lieven.
> >
> >
> >
> >
> > -----Original Message-----
> > From: Howard M. Lewis Ship [mailto:hlship@attbi.com]
> > Sent: donderdag 17 april 2003 20:42
> > To: 'Tapestry users'
> > Subject: RE: Form Listener vs. Submit Listener
> >
> >
> > Only if you are doing a looping operation; in that case, 
> the Submit's 
> > listener must not upset the loop (add or remove elements).  
> The rewind 
> > must exactly match the render.  Short
> > answer: only if you're doing something tricky.
> >
> > --
> > Howard M. Lewis Ship
> > Creator, Tapestry: Java Web Components 
> > http://jakarta.apache.org/tapestry
> >
> >
> >
> > > -----Original
> > Message-----
> > > From: Joel Trunick [mailto:Joel@SmartPrice.com]
> > > Sent: Thursday, April 17, 2003 10:39 AM
> > > To: 'Tapestry users'
> > > Subject: Form Listener vs. Submit Listener
> > >
> > >
> > >
> > > Is there a difference whether you "do stuff" in the Form 
> listener as 
> > > opposed to the Submit listener for the same form? Does it 
> matter in 
> > > regard to rewind or other considerations? Is one preferable to 
> > > other?
> > >
> > > I get the impression there may be an important 
> distinction, but not 
> > > sure what it is. Anyone?
> > >
> > > Joel
> > >
> >
> >
> > 
> ---------------------------------------------------------------------
> > 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
> 


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


RE: Form Listener vs. Submit Listener

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
You've set breakpoints on the setXXX() methods, to verify that they aren't
being called?

Your listener method does not throw an exception?

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: Lieven Govaerts [mailto:lgo@axelera.net] 
> Sent: Thursday, April 17, 2003 4:38 PM
> To: Tapestry users
> Subject: RE: Form Listener vs. Submit Listener
> 
> 
> Ok, I have a simple page with a form, some textfields and one 
> submit button, connected in the form object with a 'store' 
> function in my page object.
> 
> My form fields are correctly initialised with the values 
> through getXXX() methods, and after I submit, values are 
> copied correctly back through the setXXX() functions.
> 
> ->
> Now I add a second submit button, and define the binding of 
> the buttons and their listeners in the Submit buttons ( as 
> shown in my previous mail with the 'store' and 'checkout' 
> buttons ). I remove the listener defined in the Form component.
> 
> What happens now, is that the form fields are still correctly 
> initialised, but after I press one of the submit buttons, 
> data is not copied back to the Bean/Page object.
> 
> I don't get any exception, only empty data fields.
> 
> I hope this makes my problem more clear, if not, I will go 
> through the code with the debugger tomorrow and see what is 
> different in the two methods.
> 
> Lieven.
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Howard M. Lewis Ship [mailto:hlship@attbi.com]
> Sent: Thursday, April 17, 2003 9:51 PM
> To: 'Tapestry users'
> Subject: RE: Form Listener vs. Submit Listener
> 
> 
> It basically comes down to what the listener methods on the 
> Submits actually do. The best thing is for these listeners to 
> set flags and/or store information that is only utilized in 
> the form's listener method.
> 
> PLEASE be more specific when things fail.  Do you get a Stale 
> Link page?  Do things just not work?
> 
> --
> Howard M. Lewis Ship
> Creator, Tapestry: Java Web Components 
> http://jakarta.apache.org/tapestry
> 
> 
> 
> > -----Original Message-----
> > From: Lieven Govaerts [mailto:lgo@axelera.net]
> > Sent: Thursday, April 17, 2003 3:24 PM
> > To: Tapestry users
> > Subject: RE: Form Listener vs. Submit Listener
> >
> >
> > I seem to have another experience in tapestry 2.3rc1:
> >     <component id="newOrder" type="Form"/>
> >     <component id="checkout" type="Submit">
> >         <static-binding name="label">Checkout</static-binding>
> >         <binding name="listener" expression="listeners.checkout"/>
> >     </component>
> >     <component id="store" type="Submit">
> >         <static-binding name="label">Continue</static-binding>
> >         <binding name="listener" expression="listeners.store"/>
> >     </component>
> >
> > Using the store or checkout button, the rest of the fields 
> are not not 
> > rewound to their value objects. When I use:
> >
> >     <component id="newOrder" type="Form">
> >             <binding name="listener" expression="listeners.store"/>
> >     </component>
> >
> > the rewind is working ok ( and my data saved to the database ).
> >
> > I fail to see a decent solution to this problem, can anyone help me 
> > out? ( upgrading to 2.4 is not an option! )
> >
> > regards,
> >
> > Lieven.
> >
> >
> >
> >
> > -----Original Message-----
> > From: Howard M. Lewis Ship [mailto:hlship@attbi.com]
> > Sent: donderdag 17 april 2003 20:42
> > To: 'Tapestry users'
> > Subject: RE: Form Listener vs. Submit Listener
> >
> >
> > Only if you are doing a looping operation; in that case, 
> the Submit's 
> > listener must not upset the loop (add or remove elements).  
> The rewind 
> > must exactly match the render.  Short
> > answer: only if you're doing something tricky.
> >
> > --
> > Howard M. Lewis Ship
> > Creator, Tapestry: Java Web Components 
> > http://jakarta.apache.org/tapestry
> >
> >
> >
> > > -----Original
> > Message-----
> > > From: Joel Trunick [mailto:Joel@SmartPrice.com]
> > > Sent: Thursday, April 17, 2003 10:39 AM
> > > To: 'Tapestry users'
> > > Subject: Form Listener vs. Submit Listener
> > >
> > >
> > >
> > > Is there a difference whether you "do stuff" in the Form 
> listener as 
> > > opposed to the Submit listener for the same form? Does it 
> matter in 
> > > regard to rewind or other considerations? Is one preferable to 
> > > other?
> > >
> > > I get the impression there may be an important 
> distinction, but not 
> > > sure what it is. Anyone?
> > >
> > > Joel
> > >
> >
> >
> > 
> ---------------------------------------------------------------------
> > 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: Form Listener vs. Submit Listener

Posted by Lieven Govaerts <lg...@axelera.net>.
Ok, I have a simple page with a form, some textfields and one submit
button, connected in the form object with a 'store' function in my
page object.

My form fields are correctly initialised with the values through getXXX()
methods, and after I submit, values are copied correctly back through
the setXXX() functions.

->
Now I add a second submit button, and define the binding of the buttons
and their listeners in the Submit buttons ( as shown in my previous
mail with the 'store' and 'checkout' buttons ). I remove the listener
defined in the Form component.

What happens now, is that the form fields are still correctly initialised,
but after I press one of the submit buttons, data is not copied back to
the Bean/Page object.

I don't get any exception, only empty data fields.

I hope this makes my problem more clear, if not, I will go through the code
with the debugger tomorrow and see what is different in the two methods.

Lieven.





-----Original Message-----
From: Howard M. Lewis Ship [mailto:hlship@attbi.com]
Sent: Thursday, April 17, 2003 9:51 PM
To: 'Tapestry users'
Subject: RE: Form Listener vs. Submit Listener


It basically comes down to what the listener methods on the Submits actually
do. The best thing is for these listeners to set flags and/or store
information that is only utilized in the form's listener method.

PLEASE be more specific when things fail.  Do you get a Stale Link page?  Do
things just not work?

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: Lieven Govaerts [mailto:lgo@axelera.net]
> Sent: Thursday, April 17, 2003 3:24 PM
> To: Tapestry users
> Subject: RE: Form Listener vs. Submit Listener
>
>
> I seem to have another experience in tapestry 2.3rc1:
>     <component id="newOrder" type="Form"/>
>     <component id="checkout" type="Submit">
>         <static-binding name="label">Checkout</static-binding>
>         <binding name="listener" expression="listeners.checkout"/>
>     </component>
>     <component id="store" type="Submit">
>         <static-binding name="label">Continue</static-binding>
>         <binding name="listener" expression="listeners.store"/>
>     </component>
>
> Using the store or checkout button, the rest of the fields are not
> not rewound to their value objects. When I use:
>
>     <component id="newOrder" type="Form">
>             <binding name="listener" expression="listeners.store"/>
>     </component>
>
> the rewind is working ok ( and my data saved to the database ).
>
> I fail to see a decent solution to this problem, can anyone
> help me out? ( upgrading to 2.4 is not an option! )
>
> regards,
>
> Lieven.
>
>
>
>
> -----Original Message-----
> From: Howard M. Lewis Ship [mailto:hlship@attbi.com]
> Sent: donderdag 17 april 2003 20:42
> To: 'Tapestry users'
> Subject: RE: Form Listener vs. Submit Listener
>
>
> Only if you are doing a looping operation; in that case, the
> Submit's listener must not upset the loop (add or remove
> elements).  The rewind must exactly match the render.  Short
> answer: only if you're doing something tricky.
>
> --
> Howard M. Lewis Ship
> Creator, Tapestry: Java Web Components
> http://jakarta.apache.org/tapestry
>
>
>
> > -----Original
> Message-----
> > From: Joel Trunick [mailto:Joel@SmartPrice.com]
> > Sent: Thursday, April 17, 2003 10:39 AM
> > To: 'Tapestry users'
> > Subject: Form Listener vs. Submit Listener
> >
> >
> >
> > Is there a difference whether you "do stuff" in the Form
> > listener as opposed to the Submit listener for the same form?
> > Does it matter in regard to rewind or other considerations?
> > Is one preferable to other?
> >
> > I get the impression there may be an important distinction,
> > but not sure what it is. Anyone?
> >
> > Joel
> >
>
>
> ---------------------------------------------------------------------
> 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: Form Listener vs. Submit Listener

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
It basically comes down to what the listener methods on the Submits actually
do. The best thing is for these listeners to set flags and/or store
information that is only utilized in the form's listener method.

PLEASE be more specific when things fail.  Do you get a Stale Link page?  Do
things just not work?

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: Lieven Govaerts [mailto:lgo@axelera.net] 
> Sent: Thursday, April 17, 2003 3:24 PM
> To: Tapestry users
> Subject: RE: Form Listener vs. Submit Listener
> 
> 
> I seem to have another experience in tapestry 2.3rc1:
>     <component id="newOrder" type="Form"/>
>     <component id="checkout" type="Submit">
>         <static-binding name="label">Checkout</static-binding>
>         <binding name="listener" expression="listeners.checkout"/>
>     </component>    
>     <component id="store" type="Submit">
>         <static-binding name="label">Continue</static-binding>
>         <binding name="listener" expression="listeners.store"/>
>     </component>  
> 
> Using the store or checkout button, the rest of the fields are not 
> not rewound to their value objects. When I use:
> 
>     <component id="newOrder" type="Form">
>             <binding name="listener" expression="listeners.store"/>  
>     </component> 
> 
> the rewind is working ok ( and my data saved to the database ).
> 
> I fail to see a decent solution to this problem, can anyone 
> help me out? ( upgrading to 2.4 is not an option! )
> 
> regards,
> 
> Lieven.
> 
> 
> 
> 
> -----Original Message-----
> From: Howard M. Lewis Ship [mailto:hlship@attbi.com]
> Sent: donderdag 17 april 2003 20:42
> To: 'Tapestry users'
> Subject: RE: Form Listener vs. Submit Listener
> 
> 
> Only if you are doing a looping operation; in that case, the 
> Submit's listener must not upset the loop (add or remove 
> elements).  The rewind must exactly match the render.  Short 
> answer: only if you're doing something tricky.
> 
> --
> Howard M. Lewis Ship
> Creator, Tapestry: Java Web Components 
> http://jakarta.apache.org/tapestry
> 
> 
> 
> > -----Original 
> Message-----
> > From: Joel Trunick [mailto:Joel@SmartPrice.com]
> > Sent: Thursday, April 17, 2003 10:39 AM
> > To: 'Tapestry users'
> > Subject: Form Listener vs. Submit Listener
> > 
> > 
> > 
> > Is there a difference whether you "do stuff" in the Form
> > listener as opposed to the Submit listener for the same form? 
> > Does it matter in regard to rewind or other considerations? 
> > Is one preferable to other? 
> > 
> > I get the impression there may be an important distinction,
> > but not sure what it is. Anyone?
> > 
> > Joel
> > 
> 
> 
> ---------------------------------------------------------------------
> 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: Form Listener vs. Submit Listener

Posted by Lieven Govaerts <lg...@axelera.net>.
I seem to have another experience in tapestry 2.3rc1:
    <component id="newOrder" type="Form"/>
    <component id="checkout" type="Submit">
        <static-binding name="label">Checkout</static-binding>
        <binding name="listener" expression="listeners.checkout"/>
    </component>    
    <component id="store" type="Submit">
        <static-binding name="label">Continue</static-binding>
        <binding name="listener" expression="listeners.store"/>
    </component>  

Using the store or checkout button, the rest of the fields are not 
not rewound to their value objects. When I use:

    <component id="newOrder" type="Form">
            <binding name="listener" expression="listeners.store"/>  
    </component> 

the rewind is working ok ( and my data saved to the database ).

I fail to see a decent solution to this problem, can anyone help me
out? ( upgrading to 2.4 is not an option! )

regards,

Lieven.




-----Original Message-----
From: Howard M. Lewis Ship [mailto:hlship@attbi.com]
Sent: donderdag 17 april 2003 20:42
To: 'Tapestry users'
Subject: RE: Form Listener vs. Submit Listener


Only if you are doing a looping operation; in that case, the Submit's
listener must not upset the loop (add or remove elements).  The rewind must
exactly match the render.  Short answer: only if you're doing something
tricky.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: Joel Trunick [mailto:Joel@SmartPrice.com] 
> Sent: Thursday, April 17, 2003 10:39 AM
> To: 'Tapestry users'
> Subject: Form Listener vs. Submit Listener
> 
> 
> 
> Is there a difference whether you "do stuff" in the Form 
> listener as opposed to the Submit listener for the same form? 
> Does it matter in regard to rewind or other considerations? 
> Is one preferable to other? 
> 
> I get the impression there may be an important distinction, 
> but not sure what it is. Anyone?
> 
> Joel
> 


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


RE: Form Listener vs. Submit Listener

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
Only if you are doing a looping operation; in that case, the Submit's
listener must not upset the loop (add or remove elements).  The rewind must
exactly match the render.  Short answer: only if you're doing something
tricky.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: Joel Trunick [mailto:Joel@SmartPrice.com] 
> Sent: Thursday, April 17, 2003 10:39 AM
> To: 'Tapestry users'
> Subject: Form Listener vs. Submit Listener
> 
> 
> 
> Is there a difference whether you "do stuff" in the Form 
> listener as opposed to the Submit listener for the same form? 
> Does it matter in regard to rewind or other considerations? 
> Is one preferable to other? 
> 
> I get the impression there may be an important distinction, 
> but not sure what it is. Anyone?
> 
> Joel
>