Thanks for the reply Filip. I have bound the zone parameter on the form like this:
<form t:type="form" t:id="resort" t:zone="lor"> <t:label for="sortType"/>: <select t:type="select" t:id="sortType" t:validate="required"/> <br/> <input type="submit" t:type="submit" t:id="resortButton" value="Resort"/> </form> <t:actionLink t:zone="lor" t:context="literal:oldestFirst">oldest first</t:actionLink> The action link works in an Ajax way, but the form submit doesn't. The even handlers are: Object onSubmit() { results.resort(sortType.name()); // sortType is the enum bound to the select box. return lor; } Object onAction(String st) { results.resort(st); return lor; } The form submit does the resort, but refreshes the entire page. I just can't figure this out. > -----Original Message----- > From: Filip S. Adamsen [mailto:[EMAIL PROTECTED] > Sent: 22 May 2008 10:52 > To: Tapestry users > Subject: Re: Updating a zone as a result of a form submission > > Hi Andy, > > Form has a zone parameter, if you bind it the zone will be updated when > the form has been submitted. > > Just make sure to check Request#isXHR to see if it's actually an > Ajaz-request before you return a block/component or Tapestry will bark. > The solution, then, is to just do a normal return like you would from a > non-Ajax event handler. > > http://tapestry.apache.org/tapestry5/tapestry- > core/ref/org/apache/tapestry/corelib/components/Form.html > has the lowdown on events emitted by Form, it's at the bottom of the > page. > > -Filip > > Blower, Andy skrev: > > Is it possible to update a zone as a result of a form submission, > rather than having the entire page refresh? > > > > I have a form with a select box and submit button to change the > sorting of a list of search results, and when I return a zone from the > event handler method onSubmit() the entire page is refreshed rather > than just the zone. The zone updates correctly from other actionlinks > on the page and their onAction() event handler. Is the answer to get > the form to fire action events somehow? > > > > I admit that I'm still a little confused still by events, is there a > complete list of the event types and their uses/behaviour somewhere > that I've missed? > > > > --------------------------------------------------------------------- > > 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]