Faking a "click" on an invisible async eventlink could also be a very
simple way to get this working without having to mock around with much
javascript.

-- 
Chris

On Fri, Feb 5, 2016 at 3:04 PM, Chris Poulsen <mailingl...@nesluop.dk>
wrote:

> Have a look at http://tapestry.apache.org/current/coffeescript/ajax.html
>
> --
> Chris
>
> On Fri, Feb 5, 2016 at 2:54 PM, Nathan Quirynen <
> nat...@pensionarchitects.be> wrote:
>
>> Hi,
>>
>> I have finally started the process of updating to 5.4.
>> Some components have an initializer javascript where an eventlink url is
>> passed as a parameter to be used as the url for a request from javascript
>> to a Tapestry event.
>> To handle the response (zone updates, scripts, ..) I added in the request
>> callback function the following:
>>
>> $.get(spec.eventLink, function(r) {
>>
>>     if (r.zones) {
>>         $.each(r.zones, function(zoneId){
>>             $('#' + zoneId).tapestryZone("applyContentUpdate",
>> r.zones[zoneId]);
>>         });
>>     }
>>
>>     if (r.updateZone) {
>>         var spec = {
>>             url: r.updateZone.url,
>>             params: r.updateZone.params
>>         };
>>         $('#' + r.updateZone.zoneId).tapestryZone("update", spec);
>>     }
>>     $.tapestry.utils.loadScriptsInReply(r);
>>
>> });
>>
>> I thought this was not the best solution, but did not find another one at
>> the moment and it worked.
>> Now in 5.4 it does not work anymore, so how do I have to fire requests to
>> tapestry events from javascript and make it handle the response?
>>
>> Nathan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>

Reply via email to