Right now, in 5.0.11, there are some holes in the client side events and callbacks. You can get something to work, it requires a bit of wiring. You'll also want to know a bit about Zones and read tapestry.js to get a handle on what's going on.
If you attach your form to a zone, then when the form is submitted it uses AJAX to post the values to your component. When the ajax call returns it updates the linked zone with the results and will run the javascript included as a property of the JSON response. It does not run the javascript elements in the returned block (not sure if this is a bug, perhaps zones should be using prototype's update facility instead of innerHTML directly). You can get script into the response by including a component that uses PageRenderSupport.addScript in your Block that you return from your form submit handler. If the form is in the zone that is rendered you will get the t:errors updated with your form errors. There is no error handling in the tapestry client side form processing yet (no timeout for instance). I expect that before Tapestry 1.0 we'll get better client side javascript support. It helps me to have a second experimental project which contains a place to practice with these techniques without all the overhead of my full application (hibernate, service startup, etc.) Josh On Thu, May 8, 2008 at 2:14 AM, stuffhere <[EMAIL PROTECTED]> wrote: > > It was the only way I could think to do the javascript callback - using > onCompleteCallback. I'm pretty new to Tapestry, so most of what I've done > has been trial and error, is there a better way to do the callback? > > > -- > View this message in context: > http://www.nabble.com/Problem-with-form-submission-with-callback-tp17106416p17123069.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]