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

Reply via email to