You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2013/11/04 22:52:19 UTC

[jira] [Closed] (TAP5-569) add convenience js method: Tapestry.activateZone( zoneId, url ), maybe Tapesry.activateZones( url )

     [ https://issues.apache.org/jira/browse/TAP5-569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-569.
-------------------------------------

    Resolution: Won't Fix

This no longer makes sense in the context of Tapestry 5.4; the ability to trigger a zone update is now a matter of triggering an event on or within the Zone's client-side element.

> add convenience js method: Tapestry.activateZone( zoneId, url ), maybe Tapesry.activateZones( url )
> ---------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-569
>                 URL: https://issues.apache.org/jira/browse/TAP5-569
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.1
>            Reporter: Fernando Padilla
>
> People keep asking for an easy way to activate zones from their own javascript.
> I have created such a function for our project, but this easy/small convenience method should be in Tapestry core proper..
> Tapestry.activateZone( zoneId, url )
> and now with the multi-zone support, I wonder if zoneId if even required.  It could be null, or another method could be created too:
> Tapestry.activateZones( url )
> Below is the js that I added to my project:
> Tapestry.activateZone = function ( zoneId, url ) {
>         var zoneManager = Tapestry.findZoneManagerByZoneId( zoneId );
>         if ( zoneManager != null ) {
>                 zoneManager.updateFromURL( url );
>         }
> };
> Tapestry.findZoneManagerByZoneId = function( zoneId ) {
>         var zoneElement = $(zoneId);
>         if (!zoneElement) {
>                 Tapestry.ajaxError("Unable to locate Ajax Zone '#{id}' for dynamic update.", { id:zoneId});
>                 return null;
>         }
>         var manager = $T(zoneElement).zoneManager;
>         if (!manager) {
>                 Tapestry.ajaxError("Ajax Zone '#{id}' does not have an associated Tapestry.ZoneManager object.", { id :zoneId });
>                 return null;
>         }
>         return manager;
> };



--
This message was sent by Atlassian JIRA
(v6.1#6144)