-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hey, I am trying to make test for my Zk 8 application with zats.
I have a .zul that looks like this :
<listbox id="listboxCat" mold="select" model="@load(vm.category)" selectedItem="@load(vm.selectedItem)">
<template name="model" var="cat">
<listitem label="@load(cat)" />
</template>
</listbox>
and in my test I have something like this :
ComponentAgent listboxCat = page.query("#listboxCat");
But the listboxCat.size() always return 0. I tried to cast it to .as(Listbox.class), it still not work. I tried what it says on the wiki
desktop.queryAll("listbox > listitem").get(0).as(SelectAgent.class).select();
It throw a null pointer exception because it doesn't fin any listitem.
Is there a bug with zats and template model?
Thanks
EDIT : It works if I do this :
<listbox id="listboxCat" style="height: 30px;" mold="select">
<listitem label="1" />
<listitem label="2" />
<listitem label="3" />
<listitem label="4" />
</listbox>
It's not what I want thought...
EDIT 2: If my model is a list of string instead of business object, it works. Is there some limitation there?
Edit 3: It was a big code 18..
Asked: 2015-11-27 16:33:03 +0800
Seen: 30 times
Last updated: Nov 27 '15
ZATS: Error 500 when connecting to ZUL due to missing class org.zkoss.xel.zel.XelELResolver
ZATS DesktopAgent.query not working with id's
ZATS: NoSuchMethodError getContextPath()
ZATS Mimic - Replacing Server Emulator (Jetty Lite) with Glassfish
ZATS does not work with combobox MVVM @save