-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
recently I've deployed my first ZK 5 Portlet in Liferay. Therefore I've followed the article http://docs.zkoss.org/wiki/ZK/How-Tos/Installation/How_to_Install_ZK_on_Liferay#Running_ZK_5_with_Liferay_5.2
After deploying the portlet in Liferay the ZK portlet showed up successfully. However all javascript-functionality of Liferay was broken now (no popups, no menu etc.). I think it's because Liferay brings its own jquery.js (Version 1.2.6), so there's a conflict with ZK jquery.js (1.3.x).
The following steps are necessary to fix the problem for me:
- Update Liferay jquery.js (version 1.2.6) to jquery.js (Version 1.3.2)
- Change zk.wpd in zk.jar and remove all jquery includes.
The solution seem to work but I don't like it very much. In a perfect world I would like to have all my ZK + jquery javascript files controlled and loaded centrally by Liferay. I do not want the ZK javascript files (<script> ... </script> within each Liferay ZK Portlet.
Is there any way (perhaps by configuration) to tell ZK not to load all javascript stuff for each portlet?
Thx a lot.
Cheers
Hi,
thx for your quick reply. But I'm already using ZK 5 RC2 (download it here)
Moreover I've defined the jQueryPatch in my zk.xml:
<?xml version="1.0" encoding="UTF-8"?> <zk> <library-property> <name>org.zkoss.zk.portlet.PageRenderPatch.class</name> <value>org.zkoss.zkplus.liferay.JQueryRenderPatch</value> </library-property> <library-property> <name>org.zkoss.zkplus.liferary.jQueryPatch</name> <value>500</value> </library-property> </zk>
However I still have the jquery conflict in Liferay. I've tested Liferay 5.2.3/ZK 5 RC2 with Firefox. The patch is only for IE right?
Hi,
yesterday I tested the Liferay integration with the new ZK5 release. It works fine with Firefox, IE7, IE8 (no jQuery conflict anymore :-)).
However it still doesn't work with IE6. As soon as I load the ZK 5 portlet with IE6 the browser freezes.
Any ideas to solve this issue?
Thx a lot in advance.
Hi ~~
Thanks for your response, I have tried, it does freezes, I am looking for reason and solution
The reason I think is it use jQuery ajax to load zul file, and I google, someone mention about using jQuery ajax will cause IE 6 crash, I am looking for solution now.
By the way, if you have time, you could post this bug to sourceforge
Hi,
I've posted a bug issue (No. 2941611)
Thx.
Hi
After tracing, when we using this to fix the IE paring error, it using jQuery ajax to get zul page, and execute the javascript
<zk> <library-property> <name>org.zkoss.zk.portlet.PageRenderPatch.class</name> <value>org.zkoss.zkplus.liferay.JQueryRenderPatch</value> </library-property> <library-property> <name>org.zkoss.zkplus.liferary.jQueryPatch</name> <value>500</value> </library-property> </zk>
the zul javascript may look like
<script src="/zkau/web/js/zk.wpd"></script> <script>alert('zk:' + window.zk)</script> <script src="/zkau/web/js/zul.lang.wpd" ></script> <script> ...............
we need the script to execute follow orders, 1 by 1.
It means after execute zk.wpd, the object window.zk should be ready to use, but it's null on IE6
unfortunately, when using jQuery append() to append javascript, in IE 6, execute javascript parallel, I don't know this issue is cause by jQuery append() or maybe it's IE6's bug, I also see some discussion on jQuery's forum, others also has this issue, but I don't find any solution
if anyone knows how to solve this issue, please let me know
Hello Friends,
AukCell is a Liferay portal focused IT company based in Beijing and Dalian ,China, they have been provide cost effective solutions based on liferay portal ,including the Liferay Integration, Customization , theme design ,portlet development ,if you need liferay support on the development ,please feel free to contact with me at [email protected]
Have a nice day....
Dear all
after countless trying, finally find a way to let Liferay work on IE6, the soultion is use Liferay to load ZK javascript lib, here are the steps
fixed time: 2010/03/12
please use "JQueryRenderCachedPatch" to fix problem on IE6
Steps:
1.in zk.xml, add library-property
<library-property>
<name>org.zkoss.zk.portlet.PageRenderPatch.class</name>
<value>org.zkoss.zkplus.liferay.JQueryRenderCachedPatch</value>
</library-property>
2.in liferay-portlet.xml, use Liferay to load zk javascript file
<portlet>
....
<header-portlet-javascript>/zkau/web/js/zk.wpd</header-portlet-javascript>
....
</portlet>
this step is very important, because this patch assume ZK javascript file has loaded by Liferay,
so make sure in the html header, you could see the file of zk.wpd
Asked: 2010-01-22 05:15:59 +0800
Seen: 3,922 times
Last updated: Nov 02 '11