tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Gusev <dmitry.gu...@gmail.com>
Subject Re: how to call actionlink function from jquery
Date Sat, 20 Oct 2012 07:01:02 GMT
1. Perform a call

$.ajax({url: eventURL, success: successHandler, data: params});



2. Implement successHandler like this

        function successHandler(reply) {



            $.tapestry.utils.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);



                /*

                 * zones is an object of zone ids and zone content that
will be

                 * present in a multi-zone update response.

                 */

                reply.zones &&
$(Object.keys(reply.zones)).each(function(index, zoneId) {

                    var zoneContent = reply.zones[zoneId];

                    $('#' + zoneId).tapestryZone("applyContentUpdate",
zoneContent);

                });

            });



        }

P.S.
Tapestry usage questions should go here:  "Tapestry users" <
users@tapestry.apache.org>,
The 'dev' list is for tapestry development.

On Sat, Oct 20, 2012 at 10:52 AM, Khaynaa <khaynaa_2008@yahoo.com> wrote:

>
>
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/how-to-call-actionlink-function-from-jquery-tp5717081.html
> Sent from the Tapestry - Dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message