As anybody done this AJAX way, without a full page reload. I'm thinking of extending the dropdown and tacos:Autocompleter to add this kind of behaviour. The only thing we want to get is an updated select, so, this would be the best solution. As anybody done this before? Any pointers? I'll pick this up next week so if someone has a good starter it will boost it up!
Regards, On 5/5/06, Sam Gendler <[EMAIL PROTECTED]> wrote:
I do this frequently, but I reload the entire page so that it doesn't get out of sync with rewind. Declare your form like this: <component id="form" type="Form"> <binding name="listener" value="listener:doSubmit"/> <binding name="refresh" value="listener:doRefresh"/> <binding name="delegate" value="beans.delegate"/> </component> Then, within the html element that will become the drop down, include the following: onchange="javascript:this.form.events.refresh();" This will cause the form to call your refresh listener (which bypasses validation), so you can change values before the form is rendered back to the client. Then a submit button will call the submit listener, which will perform validation and let you treat the form as though it was submitted. --sam On 5/5/06, Stephane Decleire <[EMAIL PROTECTED]> wrote: > But what about the errors that would come up during the rewind of the > form data ? > > Greg Cormier wrote: > > >I'd add a button next to your zipcode text field (maybe a "refresh" button), and that would invoke a listener to set your dropdown based on the area code. > > > >Greg > > > >-----Original Message----- > >From: Stephane Decleire [mailto:[EMAIL PROTECTED] > >Sent: Friday, May 05, 2006 7:37 AM > >To: tapestry-user@jakarta.apache.org > >Subject: Dependent drop down list > > > > > >Hi, > > > >I would like to reload a form to modify the content of a drop down list > >of cities depending on the zipcode set by the user in this form. > >As anybody seen a sample of code to implement such a behavior ? > > > >Thanks in advance. > > > > > > > > -- > Stéphane Decleire > > 05 56 57 99 20 > 06 63 78 69 06 > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Pedro Viegas