-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello everyone,
as you read this thread:
http://www.zkoss.org/forum/listComment/11231
I'm using the new freshly version ZK 5.0.1-FL-2010-02-03, which is the only one that fixes a bug for use the span attribute in the Listcell component!
OK, now i have 2 problems, one small and one very very big!!
small problem:
after deploy my project i read in console "Extension .... ignored since language xml not found !! WHY???":
[12:20:04.436]Starting ZK 5.0.1-FL Standard (build: 10020318) [12:20:04.510]Loading system default [12:20:04.754]Parsing file:/opt/resin/hosts/www.test.it/webapps/ROOT/WEB-INF/zk.xml [12:20:06.587]Extension xml2html ignored since language xml not found [12:20:06.587]Extension svg ignored since language xml not found
BIG BIG BIG PROBLEM:
the code below, that I have always used (with zk 5.0.0. RC2 and previous version, works well ever time), now with ZK 5.0.1-FL-2010-02-03 dont work!! :
index.zul
<?page id="page_application_enviroment" title="MAIN PAGE" contentType="text/html;charset=UTF-8"?> <zk> <zscript> <![CDATA[ void loadCenter(){ Center center_application_enviroment = (Center)window_application_enviroment.getFellowIfAny("center_application_enviroment"); if (center_application_enviroment!=null){ Component comp = center_application_enviroment.getFirstChild(); if (comp != null) { center_application_enviroment.removeChild(comp); } Executions.getCurrent().createComponents("/center.zul", center_application_enviroment, null); center_application_enviroment.invalidate(); } } ]]> </zscript> <style> html, body {margin:0;padding:0;} </style> <window id="window_application_enviroment" width="100%" height="100%" border="none"> <borderlayout id="borderlayout_application_enviroment"> <north id="north_application_enviroment" border="none"> <!-- HEADER CONTENT SPACES --> <button label="click" onClick="loadCenter();" /> </north> <center id="center_application_enviroment" border="none" flex="true"> <!-- MAIN CONTENT SPACES --> <label value ="MAIN CONTENT SPACES"/> </center> <south id="south_application_enviroment" border="none" size="20px"> <!-- FOOTER CONTENT SPACES --> <label value ="FOOTER CONTENT SPACES"/> </south> </borderlayout> </window> </zk>
center.zul
<?component name="paginglist" macroURI="/macro.zul" inline="true"?> <zk> <borderlayout id="borderlayout_bench" width="100%" height="100%"> <west id="west_bench" size="20%" border="0" margins="2,2,1,2" autoscroll="true"> <label value="WEST"/> </west> <center border="none" margins="0,0,0,1"> <paginglist id="borderlayout_paging_list" pagingdetailed="true" detailed="false"/> </center> </borderlayout> </zk>
macro.zul
<zk> <borderlayout id="${arg.id}"> <center border="none"> <borderlayout style="border:solid 1px #9ECAD8"> <north border="none" style="border-bottom:solid 1px #9ECAD8;border-right:solid 1px #9ECAD8" flex="true"> <paging detailed="${arg.pagingdetailed}"/> </north> <center border="none" style="border-right:solid 1px #9ECAD8"> <listbox vflex="true" width="100%" height="100%"/> </center> <south border="none" style="border-top:solid 1px #9ECAD8;border-right:solid 1px #9ECAD8" flex="true"> <paging detailed="${arg.pagingdetailed}"/> </south> </borderlayout> </center> <east margins="0,2,0,0" size="${(empty arg.detailedsize) ? '30%' : arg.detailedsize}" border="none" if="${true==arg.detailed}"/> </borderlayout> </zk>
I noticed that:
1) if I try to remove the line
center_application_enviroment.invalidate();
<paging detailed="${arg.pagingdetailed}"/>
help me please!! this is really urgent!!
thank you very much!
Regards
Hi smigol,
i cannot reproduce it because of missing zk5 on my machine at time. BUT...
Have a try with a second button where you clear the center content.
So i mean that the first button must work.
If it so, than i mean this is AJAX. Why the center content should be rendered new if there is nothing changed?
best
Stephan
not tested:
void cleanCenter(){ Center center_application_enviroment = (Center)window_application_enviroment.getFellowIfAny("center_application_enviroment"); if (center_application_enviroment!=null){ /* clear the center child comps */ center_application_enviroment.getChildren().clear(); }
Hi Stephan,
The code that I posted on this thread, in particular index.zul page,
is simple example ... you have to imagine that every click on the button
represents a click on the main menu of my application with consequent different loading of center.zul page that holds the macro!
(But the result does not change and the problem remains!!)
I don't understand what has changed! With zk 5.0.0. RC2 and previous version, it worked well every time!!!
I'm hoping for an answer from someone from ZK Team ... this is really urgent for me ... This is the core of my application!!!
thank you for your answer Stephan
Regards
ORAZIO
@smigol
I have posted a bug
we will track it
@as1225
thank you very much!!!
I have seen that the bugs have been fixed! I can download the new version ZK Freshly ZK-5.0.1-FL-2010-02-08 with the resolution of the problem?
(if so, I already tried this new version just now but it seems that the problem persists! : - /)
Regards
ORAZIO
Sorry, I fixed it today, next ZK Freshly version will not release in the near future
It just a little modify in zul.jar\web\js\zul\sel\SelectWidget.src.js
line: 285 in _calcHgh function
var rowhgh = zk(firstVisiRow).offsetHeight();
modify to
var rowhgh = firstVisiRow ? zk(firstVisiRow).offsetHeight(): null;
but zk default is use SelectWidget.js file that is compressed
maybe you can rename SelectWidget.src.js to SelectWidget.js
or set zk.xml like this
<client-config> <debug-js>true</debug-js> </client-config>
HI @as1225
Thanks for your workaround ... i test this workaround but unfortunately only function with Firefox 3.5.7 and NO with IE8, OPERA 10+, CHROME 4+!
I think I will make a downgrading version waiting for better times!!
thank you!
Regards
Mattia
I test your sample in my developing ZK prj
It works well on IE8, OPERA , CHROME
It will resolve on next Freshly version
Hi @as1225,
today I saw that was released a new freshly version (zk-5.0.1-FL-2010-02-10) ... you can confirm me if this version contains fix for problems:
- the center calls invalidate () has js error;
- span property of the listcell component;
Thank you very much
Regards
Yes I try your sample code
It works well
You just modify
Center center_application_enviroment = (Center)window_application_enviroment.getFellowIfAny("center_application_enviroment");
to
org.zkoss.zul.Center center_application_enviroment = (org.zkoss.zul.Center)window_application_enviroment.getFellowIfAny("center_application_enviroment");
Asked: 2010-02-08 09:58:59 +0800
Seen: 656 times
Last updated: Feb 11 '10