You should be able to monkey-patch just this function, rather than all of tapestry.js.
On Fri, Oct 15, 2010 at 1:59 AM, Blower, Andy <andy.blo...@proquest.co.uk> wrote: > Raised TAP5-1309. I will override & patch tapestry.js to T5.2.0 version of > this line of code. > >> -----Original Message----- >> From: Howard Lewis Ship [mailto:hls...@gmail.com] >> Sent: 14 October 2010 22:39 >> To: Tapestry users >> Subject: Re: [T5.2.1] TAP5-1177 In a partial page update request, if >> the server returns an empty string for the content, the client-side is >> left as is, rather than cleared >> >> I think you've found a bug ... I think Tapestry should not set the >> content property of the response when there's a MultiZoneUpdate >> response, so as to leave the Zone's current content unchanged. Please >> add to JIRA and I'll see about fixing it soon. >> >> On Thu, Oct 14, 2010 at 12:12 PM, Blower, Andy >> <andy.blo...@proquest.co.uk> wrote: >> > I've spent all day chasing down an issue that appeared when we >> upgraded to Tapestry 5.2.1 - it doesn't occur with T5.2.0, and I >> finally managed to find the change that is causing the problem. It's >> the fix for TAP5-1177 where tapestry.js was changed from >> >> > >> > Tapestry.loadScriptsInReply(reply, >> function() { >> > /* >> > * In a multi-zone >> update, the reply.content may be blank or >> > * missing. >> > */ >> > reply.content && >> this.show(reply.content); >> > to >> > Tapestry.loadScriptsInReply(reply, >> function() { >> > /* >> > * In a multi-zone >> update, the reply.content may be missing, >> > * in which case, >> leave the curent content in place. TAP5-1177 >> > */ >> > reply.content != >> undefined && this.show(reply.content); >> > >> > >> > The situation this is causing an issue for is where we have a form in >> a zone and submitting the form needs to update another zone so >> MultiZoneUpdate is used which has content in the json for the other >> zone. i.e. >> > >> > { >> > "content" : "", >> > "zones" : { >> > "someThingZone" : "<b>stuff</b>" >> > } >> > } >> > >> > This used to leave the form inside it's zone alone which is good >> because some other javascript fires which accesses part of the form. If >> the form has been removed from the DOM (as happens with T5.2.1) then >> this Javascript fails. I'm not very familiar with this code, and I've >> not personally used MultiZoneUpdate, but it seems to me at first glance >> that the content bit of the json will always be "" for MultiZoneUpdate. >> All the content goes into the "zones" part of the json. Also, the >> comment in the T5.2.1 version seems to say that the content should be >> left alone if content is missing, but since missing is the same as "" >> it doesn't do that. >> > >> > Howard, what's your opinion? Can content ever be set to something, or >> left undefined? I can't see how using MultiZoneUpdate. This is >> affecting some pretty major functionality and we have a release in a >> couple of weeks, so I need to find a solution to this problem pretty >> swiftly. I will see if I can modify our javascript code to work around >> this without breaking anything else, but I'm not that hopeful. >> > >> > >> > Cheers, >> > >> > Andy. >> > >> > P.S. I found some other issues with the JS stacks, but that's not >> breaking anything - just may not be what you'd expect. I'll detail >> those in another email when I get the time. >> > >> >> >> >> -- >> Howard M. Lewis Ship >> >> Creator of Apache Tapestry >> >> The source for Tapestry training, mentoring and support. Contact me to >> learn how I can get you up and productive in Tapestry fast! >> >> (971) 678-5210 >> http://howardlewisship.com >> >> --------------------------------------------------------------------- >> 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 > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org