i think you have quite an elegant solution here - i'll make sure to apply this to the 5.2 branch and i guess it'll also appear in master soon
On Sat, Oct 23, 2010 at 00:22, gbrits <gbr...@gmail.com> wrote: > > for people that might run into this: > > I didn't know that ElementEffect was the prototype way of handling things, > jquery handles effects differently. > Moreover, it's best practise to observe Tapestry.ZONE_UPDATED_EVENT instead > of misusing an effect which is only meant for visual purposes. > > The problem is, at the moment the GOT jquery implementation of a zone > doesn't trigger the Tapestry.ZONE_UPDATED_EVENT. > > I raised a ticket at http://github.com/got5/tapestry5-jquery/ > in the mean time you can plug this in your own js to be able to listen to > the ZONE_UPDATED_EVENT > > hth, > Geert-Jan > > > > /* extending "ui.tapestryZone": > * - ability to update update-feedback functions > * - firing Tapestry.ZONE_UPDATED_EVENT on zone-update > * - fixing show vs update effecs (they were reversed) quick hack. > * */ > $.extend($.ui.tapestryZone.prototype, { > setoptions: function(opt) { > this.options=opt; > }, > /** > * Refresh a zone > * @zoneId > * @url to request > * @params optional, can contain data. Request will switch from GET to > POST > */ > update: function(specs) { > var el = this.element; > > ajaxRequest = { > url: specs.url, > success: function(data) { > el.html(data.content); > el.effect(effect); > $.tapestry.utils.loadScriptsInReply(data); > el.trigger(Tapestry.ZONE_UPDATED_EVENT); > } > }; > > if (specs.params != undefined) { > ajaxRequest = $.extend(ajaxRequest, { > type: 'post', > data: specs.params > }) > } > > effect = el.is(":visible") ? this.options.show : > this.options.update; > > $.ajax(ajaxRequest); > } > > }); > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/T5-porting-to-Got5-JQuery-how-to-use-former-Tapestry-ElementEffect-tp3231132p3232973.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 > > -- Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr Tapestry PMC / Tacos developer Open Source / JEE Consulting --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org