Hi, i just recently implemented a similar solution with Jquery
jQuery(document).ready(function() { jQuery("#county").change(function(){ var county = jQuery(this).val(); // Send the request and update sub category dropdown jQuery.ajax({ type: "GET", data: post_string, dataType: "json", cache: false, url: '/kalender/servlet/data?action=municipality&county=' +county, timeout: 20000, error: function() { alert("An error occured: "+county); }, success: function(data) { // Clear all options from sub category select jQuery("select#municipality option").remove(); // Fill sub category select jQuery.each(data, function(i, j){ var row = "<option value=\"" + j.value + "\">" + j.text + "</option>"; jQuery(row).appendTo("select#municipality"); }); } }); }); }); Whenever the select box with id=county is changed, the select box with id #municipality is populated. Not a full solution to your problem, but you get the idea. /Stefan 2010/7/23 Peter Stavrinides <p.stavrini...@albourne.com> > > To not lose the field values, submit the form. > Well thats kind of what I hoped to avoid > > > To update just one field, you can create an event and trigger and handle > > it with a little bit of custom JavaScript and the JSON classes in > Tapestry. > If this is the best approach then can someone suggest an example please > > Cheers, > Peter > > > ----- Original Message ----- > From: "Thiago H. de Paula Figueiredo" <thiag...@gmail.com> > To: "Tapestry users" <users@tapestry.apache.org> > Sent: Friday, 23 July, 2010 15:49:03 GMT +02:00 Athens, Beirut, Bucharest, > Istanbul > Subject: Re: Zoneupdater mixin best practice > > On Fri, 23 Jul 2010 07:40:18 -0300, Peter Stavrinides > <p.stavrini...@albourne.com> wrote: > > > Hi all, > > Hi! > > > To be more specific, I am using the Zoneupdater (code below) with a zone > > that encloses a form, and the form encloses several textfields. For my > > use case I only want to target one specific form element but don't know > > how to avoid the zone refreshing everything. I.e.: As it stands now, any > > input in other fields in the form is lost whenever I make a selection > > from the drop down menu due to the zone update, is there another way? > > To not lose the field values, submit the form. > > To update just one field, you can create an event and trigger and handle > it with a little bit of custom JavaScript and the JSON classes in Tapestry. > > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, > and instructor > Owner, Ars Machina Tecnologia da Informação Ltda. > http://www.arsmachina.com.br > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >