-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I am using ZK 8 with MVVM and form binding.
I have a Combobox with comboitems, which look like this in the *.zul file:
<window viewModel="@id('vm') @init('ulis.model.entity.webapp.viewmodels.PropertyViewModel')" form="@id('fx') @load(vm.property) @save(vm.property, before='saveProperty')">
<!-- Some unrelated code... -->
<combobox hflex="1" model="@load(vm.propertyGroups)" selectedItem="@bind(fx.group)" value="@load(fx.group.name)">
<template name="model" var="eachGroup">
<comboitem label="@load(eachGroup.name)" value="@bind(eachGroup)" />
</template>
</combobox>
<!-- Some unrelated code... -->
</window>
In my ViewModel, I have a property field, a propertyGroups field and a group field. The model seems to be loaded correclty, and the selectedItem of the Combobox seems to work.
But, sometimes, I have a strange bug: the comboitems are duplicated outside their combobox. And there can be duplicates. This bug is not always there, but very often. I couldn't find a pattern where this always occurs.
I have insufficient karma to post screenshots, but it looks like this with the combobox closed:
+----------------------------+---+
| | V |
+----------------------------+---+
Element one
Element two
and like this with the combobox open:
+----------------------------+---+
| | V |
+----------------------------+---+
| Element one |
+--------------------------+
| Element two |
+--------------------------+
When the combobox is open, the duplicated elements that are outside of the box don't disappear.
How come this happens??
Thank you.
Hello Darksu,
I have exactly zero line of additional Javascript or CSS.
Thank you.
Asked: 2015-09-10 08:31:04 +0800
Seen: 56 times
Last updated: Sep 15 '15
I was able to create a working test case, so I filed a bug (see issue ZK-2880).
MathieuPiette ( 2015-09-16 14:13:23 +0800 )editThe bug was fixed in ZK 8.
MathieuPiette ( 2015-09-24 13:02:49 +0800 )edit