0

Big problem with ZK 5.0.1-FL-2010-02-03!!!! :-/////

asked 2010-02-08 09:58:59 +0800

smigol gravatar image smigol flag of Italy
316 2

updated 2010-02-08 10:19:54 +0800

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();

in script of index.zul, works by clicking the first time button but if you click again button, no longer works!!!


2) after, if you remove too
<paging detailed="${arg.pagingdetailed}"/>

in center.zul, then it works every time!! but then I have not reached my initial goal that I had reached with ZK 5.0.0. RC2

help me please!! this is really urgent!!

thank you very much!

Regards

delete flag offensive retag edit

10 Replies

Sort by ยป oldest newest

answered 2010-02-08 12:54:52 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2010-02-08 12:58:22 +0800

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();
					
		   }  

link publish delete flag offensive edit

answered 2010-02-08 15:30:31 +0800

smigol gravatar image smigol flag of Italy
316 2

updated 2010-02-08 15:55:14 +0800

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

link publish delete flag offensive edit

answered 2010-02-08 19:44:09 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

@smigol
I have posted a bug
we will track it

link publish delete flag offensive edit

answered 2010-02-09 01:52:11 +0800

smigol gravatar image smigol flag of Italy
316 2

updated 2010-02-09 02:18:10 +0800

@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

link publish delete flag offensive edit

answered 2010-02-09 04:00:18 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

updated 2010-02-09 04:03:47 +0800

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>

link publish delete flag offensive edit

answered 2010-02-09 05:50:49 +0800

smigol gravatar image smigol flag of Italy
316 2

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

link publish delete flag offensive edit

answered 2010-02-09 19:34:44 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

I test your sample in my developing ZK prj
It works well on IE8, OPERA , CHROME
It will resolve on next Freshly version

link publish delete flag offensive edit

answered 2010-02-11 01:32:03 +0800

smigol gravatar image smigol flag of Italy
316 2

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

link publish delete flag offensive edit

answered 2010-02-11 01:50:54 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

updated 2010-02-11 01:51:08 +0800

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");

link publish delete flag offensive edit

answered 2010-02-11 05:45:21 +0800

smigol gravatar image smigol flag of Italy
316 2

@as1225
Thank you very very very much!! work fine!!! :-)))

ORAZIO

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-02-08 09:58:59 +0800

Seen: 656 times

Last updated: Feb 11 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More