ZK - Open Source Ajax Java FrameworkZK - Open Source Ajax Java Framework

Ajax request is not sent

AllenFox
26 Feb 2010 11:18:44 GMT
26 Feb 2010 11:18:44 GMT

Hi, I'm working on two jsr168 portlets, both use zk. The first portlet uses <z:tree> to display a tree of categories with their subcategories, the second uses <z:grid>.

Here's a problem I've got:

if both portlets present on the same page it's impossible to open tree nodes to view their subnodes. No errors, no exceptions. Ajax request is just simply not being sent. If having only one portlet on the page everything works fine.

Did anyone have the same problem?

iantsai
28 Feb 2010 19:25:59 GMT
28 Feb 2010 19:25:59 GMT

protlet container is a very particular environment which implementation might use a lot Javascript code to do.
Could you provide what kind of portlet container you are using? as what I know, zk support liferay.

AllenFox
1 Mar 2010 03:38:23 GMT
1 Mar 2010 03:38:23 GMT

I'm using Liferay 5.2.3

samchuang
1 Mar 2010 19:40:35 GMT
1 Mar 2010 19:40:35 GMT

Hi

I have tested with ZK5 with Liferay 5.2.3, and tested 2 portlet, 1 is gird, 1 is tree, and it work fine. Do you also use ZK5 with Liferay ? it should work too

AllenFox
2 Mar 2010 06:25:07 GMT
2 Mar 2010 06:25:07 GMT

my version is 3.6.3

AllenFox
3 Mar 2010 05:04:00 GMT
3 Mar 2010 05:04:00 GMT

and I cannot upgrade to 5.0.0 since we have a lot of things done in 3.6.3

AllenFox
4 Mar 2010 04:39:26 GMT
4 Mar 2010 04:39:26 GMT

any ideas?

samchuang
8 Mar 2010 20:59:24 GMT
8 Mar 2010 20:59:24 GMT

Hi

when you operate on tree zul, when you click node, do it send ajax request ? I test on ZK 363 demo, it look like when I click node, it don't need to send ajax request. Could you provide your simple zul code ? and have you test these zul page directly without using Liferay portlet ? to see it it work correctly

AllenFox
10 Mar 2010 10:02:22 GMT
10 Mar 2010 10:02:22 GMT

if using the model, an ajax request is sent every time you open a new node. why it's not being sent in my case still remains unknown. :( i'll provide my code in some time.

samchuang
10 Mar 2010 19:06:17 GMT
10 Mar 2010 19:06:17 GMT

by the way, may I ask the reason you can't upgrade to ZK5,

Do you have many custom component in ZK3 ? that's the only reason I could think of, it's just my curiosity

AllenFox
12 Mar 2010 08:17:10 GMT
12 Mar 2010 08:17:10 GMT

yes, you're right, we do have many custom components

AllenFox
15 Mar 2010 07:02:05 GMT
15 Mar 2010 07:02:05 GMT

to reproduce this problem one needs to place components on two different zk pages within the same jsp page, eg:

<z:page>
    <z:grid ... >
</z:page>
<z:page>
    <z:tree ... >
</z:page>

samchuang
17 Mar 2010 20:58:12 GMT
17 Mar 2010 20:58:12 GMT

Hi

ZK 3.6.4 has release this week, could you try it and see it the problem remain ? if the problem remains, please report bug here

AllenFox
18 Mar 2010 05:35:44 GMT
18 Mar 2010 05:35:44 GMT

hi, i tried 3.6.4 and got the same result. after spending some time experimenting with two component, i found out that it's not enough to have them being placed on separate zk pages. the problem arises when we use the components in two separate portlets. if two components are used within the same portlet, even on two zk pages, everything works fine. one more observation is that if i use a tree renderer where all treeitems are opened everything also works fine - i guess for then there's no need in sending ajax requests.

samchuang
18 Mar 2010 21:31:43 GMT
18 Mar 2010 21:31:43 GMT

Hi

I am a little confused, do you mean the code above will execute correctly, right ?

<z:page>
    <z:grid ... >
</z:page>
<z:page>
    <z:tree ... >
</z:page>

and the problem will happen when you use component in two different portlets, right ? for example

portlet 1:

<zk>
  <tree>....
</zk>

portlet 2:

<zk>
  <grid>...
</zk>

and if you use tree renderer , there's no problem at all ?

AllenFox
22 Mar 2010 06:48:42 GMT
22 Mar 2010 06:48:42 GMT

yes, it occurs only when we have in portlet 1

<zk>
  <tree>....
</zk>

and in portlet2
<zk>
  <grid>...
</zk>

if we use a tree renderer where we set explicitly Treeitem.setOpen(true) then it works. If Treeitem.setOpen(false) it doesn't work.

AllenFox
25 Mar 2010 05:42:14 GMT
25 Mar 2010 05:42:14 GMT

hi. i've posted a bug. 2976395.