-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I have written a wrapper in order to have Navteq's map component(former map24) available as a zul component.
When I try to set it up directly within a tabpanel, like this:
<tabbox id="_tabBox0" focus="false" orient="horizontal" width="100%" height="100%"> <tabs id="_tabs0" align="start"> <tab id="_tab1" closable="false" selected="true" label="Mapa" /> <tab id="_tab2" label="Datos" focus="false" closable="false" selected="false" /> </tabs> <tabpanels id="_tabPannels0"> <tabpanel id="_tabPannel1"> <map24 id="_map" focus="false" startMapView="{UpperLeftLongitude: -774.989, UpperLeftLatitude: 2638.55, LowerRightLongitude: 365.375, LowerRightLatitude: 2136.933}" height="100%" width="100%" use="com.ptb.clerzk.map24.CzkMap24" host="${map24host}" licence="${map24licence}" mapObjectBuilder='${artifacts["mob_map"]}' /> </tabpanel> <tabpanel id="_tabPannel2" focus="false"> ...
I get the following error popup upon loading the window the tabbox is inserted in:
"failed to invoke zkTabpanel2.init A has no properties"
This won't happen if my map24 component is child to some other component, such as a grid's row or a box, even if the grid or box is included within the aforementioned tabpanel.
I suspect this is due to a clumsy map24.dsp:
<%@ taglib uri="/WEB-INF/tld/web/core.dsp.tld" prefix="c" %> <%@ taglib uri="/WEB-INF/tld/zk/core.dsp.tld" prefix="z" %> <c:set var="self" value="${requestScope.arg.self}"/> <div id="${self.uuid}"${self.outerAttrs}${self.innerAttrs} z.type="map24z.map24.Map24" z.host="${self.host}" z.licence="${self.licence}" z.startMapView="${self.startMapView}"> <div id="${self.uuid}!real" style="width:100%;height:100%;" /> </div>
(map24 paints the map on a div, like gmaps does)
Any clue as to how to improve this .dsp would be much appreciated.
With kind regards
César Varona
Could you open the debug_js flag in zk.xml to see which line of zk js file cause this issue.
(http://www.zkoss.org/doc/devref/ch08s01s04.html)
and please also provide the version of ZK that you have.
Hi,
I'm using zk 3.5.1; this is what I get when enabling js debug:
Hiba: el has no properties Forrásfájl: http://localhost:8080/backbone/zkau/web/js/zk/zk.js.dsp Sor: 6705
Line 6705 is var cn = el.className in the following js snippet:
zk.addClass = function (el, clsnm, bAdd) { if (bAdd == false) { zk.rmClass(el, clsnm); return; } if (!zk.hasClass(el, clsnm)) { var cn = el.className; if (cn.length) cn += ' '; el.className = cn + clsnm; } };
Thanks a lot for taking an interest in this seemingly obscure issue
César Varona
Asked: 2008-11-07 10:26:19 +0800
Seen: 128 times
Last updated: Nov 10 '08