Hello, , 

I have a wired problem. My ZoneManager keeps being null:

JS:

function updatePage(response){
        alert ("id: " + zoneId);
        alert (urlSetMsgPositionAndSize);
        var zoneManager = Tapestry.findZoneManagerForZone(zoneId); 
        
        alert ("zone " + zoneManager);
        zoneManager.updateFromURL(urlSetMsgPositionAndSize); 
}

alert zone gives "zone null", but urlSetMsgPositionAndSize is
/message/createmessage3:setmsgpositionandsize?t:ac=90

and alert of alert ("id: " + zoneId); is "[object HTMLdivelement]"

my js loader functions:

function initializeOnLoad(centerX, centerY, _scopeRadius,
_minMsgScopeInMeters, _maxMsgScopeInMeters, _urlSetMsgPositionAndSize,
_zoneId) {
        google.maps.event.addDomListener(window, 'load', initialize(centerX,
centerY, _scopeRadius, _minMsgScopeInMeters, _maxMsgScopeInMeters,
_urlSetMsgPositionAndSize, _zoneId));   
}

function initialize(centerX, centerY, _scopeRadius, _minMsgScopeInMeters,
_maxMsgScopeInMeters, _urlSetMsgPositionAndSize, _zoneId) {
         
        var mapOptions = {
                            zoom: 12,
                            center: new google.maps.LatLng(centerY, centerX),
                            mapTypeId: google.maps.MapTypeId.ROADMAP
                          };
          
          map = new google.maps.Map(document.getElementById("map_canvas"),
mapOptions);
          urlSetMsgPositionAndSize = _urlSetMsgPositionAndSize;
          
          alert (urlSetMsgPositionAndSize);
          
          zoneId = _zoneId;
          
          scopeRadius = _scopeRadius;
          minMsgScopeInMeters = _minMsgScopeInMeters;
          maxMsgScopeInMeters = _maxMsgScopeInMeters;

          google.maps.event.addListener(map, 'dragend', onMapDragEnd); 
          
          google.maps.event.addListenerOnce(map, 'idle', function(){
                  onSlide(scopeRadius);
                });
          
          setMarker(map.getCenter());
}

my java class has a 

        @InjectComponent
        private Zone updateZone;

which is a parameter for my JS call:

Link linkSetMsgPosAndSize =
componentResources.createEventLink("setMsgPositionAndSize");
                javaScriptSupport.addScript("initializeOnLoad(%s, %s, 
%s,%s,%s,'%s',
%s);", groupCenter.getCentroid().getX(), groupCenter.getCentroid().getY(),
group.getMessageRadius(), group.getMinMessageRadius(),
group.getMaxMessageRadius(), linkSetMsgPosAndSize.toURI(),
updateZone.getClientId());


i did the same for another page where it is working. but here it keeps
saying that the zoneManager is null. tge tapestry page itself shows the
error message:

updateZone does not have associated Tapestry.ZoneManager object.




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/zoneManager-keeps-being-null-tp5719262.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