2013-02-14 69 views
0

我在我的应用我得到在列表框组件,一个奇怪的问题使用Zk6.4 ......您可以检查此hereZK列表框ONSELECT问题

如何重现该问题?

1上方运行

enter image description here

给出的小提琴代码链接2点击任何项目

enter image description here

3点击示范窗口 的拾取按钮 - 新选项卡将打开此选项卡包含一个列表框现在这个列表框onselect或单项选择不起作用。 enter image description here

4现在的新标签现在将打开列表框ONSELECT不工作 enter image description here

回答

0

正如schroet提到的,这是由模态窗口引起的,请参阅ZK Window Javadoc

作为一种变通方法,您可以修改PopUpViewModel.java的doPickDocumentRSN方法如下:

public void doPickDocumentRSN(@ContextParam(ContextType.VIEW) Component comp) { 
     Map maps = new HashMap(); 
     maps.put("PARENT_VIEW", comp); 
     maps.put("peopleTabArg", new TabArguement(TabArguement.TabMode.PICK)); 

     UserInterfaceViewModel.addAnyTab(maps, "Tab2", "tab2.zul"); 
     comp.setVisible(false); 
    } 
+0

感谢本其工作 – 2013-02-15 04:47:23

2

我不认为这是一个问题,你没有任何的onClick或ONSELECT在tab2.zul属性。

tab1.zul:

<listitem onClick="@command('doPickDocument',documentRSN=each.documentRSN)"> 
    <listcell label="@load(each.documentRSN)" /> 
    <listcell label="@load(each.documentDesc)" /> 
    <listcell label="@load(each.documentOrder)" /> 
</listitem> 

tab2.zul:

<listitem > 
    <listcell label="@load(each.documentRSN)" /> 
     <listcell label="@load(each.documentDesc)" /> 
    <listcell label="@load(each.documentOrder)" /> 
</listitem> 

编辑先点评:

我不好。

对popup_window.zul窗口使用mode =“overlapped”。因为它是模态的,所以你不能与其他组件(窗口)交互,直到你关闭模态窗口。

+0

你没有对不起人得到它,请检查Tab1在这里你可以选择任何项目颜色会改变,但同样的事情将不会发生与tab2我tab2项目的颜色变化将随着鼠标移动 – 2013-02-14 18:00:02

+1

使用mode =“overlapped”为popup_window.zul窗口。 – schroet 2013-02-14 18:16:53

+0

感谢schroet问题已解决 – 2013-02-15 06:50:51