Ah! this seems to have got to the root of the problem. Request.isXHR() is returning false. I understand that this method is looking for the presence of an Http Header called X-Requested-With with the value XMLHttpRequest. Snooping the request I notice that this has not been set. How does this header get set, and what in my example could cause this not to be getting set?
Ulrich Stärk wrote: > > You should @InjectComponent private Zone otherCommentsZone and return > otherCommentsZone.getBody() > from your onSuccess handler method after checking whether this is a XHR > request (@Inject Request and > do request.isXHR()). > > Uli > > On 01.02.2010 09:29 schrieb lebenski: >> >> I have a loop that contains a form and a zone. In each iteration of the >> loop, submission of that form should update it's relevant zone: >> >> <t:loop source="draft.draftPicks" value="draftPick" volatile="true"> >> <t:form t:id="pickCommentForm" context="draftPick" >> t:zone="${zoneId}"> >> ... >> <t:submit/> >> </t:form> >> <t:zone t:id="otherCommentsZone" id="${zoneId}"> >> <div class="otherCommentsBody"> >> ... >> </div> >> </t:zone> >> </t:loop> >> >> Object onSuccessFromPickCommentForm(DraftPick draftPick) { >> createPickComment(draft.get(draftPick.getPackNumber(), >> draftPick.getPickNumber())); >> >> loadDraft(); >> >> return otherCommentsZone; >> } >> >> So i'm binding the zone parameter of the form to the generated client id >> (not the component id) as suggested in the documentation here: >> >> http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Zone.html >> >> After I submit the form the page refreshes rather that updating the zone. >> The loop runs 45 times so I end up with 45 micro forms and 45 zones on my >> page. Can anyone see what I'm doing wrong here? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > -- View this message in context: http://old.nabble.com/-T5--Form-and-Zone-inside-a-loop-tp27400993p27402655.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org