0

Why are my comboitems outside of their combobox?

asked 2015-09-10 08:31:04 +0800

MathieuPiette gravatar image MathieuPiette
1567 3

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.

delete flag offensive retag edit

Comments

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 )edit

The bug was fixed in ZK 8.

MathieuPiette ( 2015-09-24 13:02:49 +0800 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-09-10 10:23:47 +0800

Darksu gravatar image Darksu
1991 1 4

Hello MathieuPiette,

Are you using any additional script i.e css?

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2015-09-15 11:56:25 +0800

MathieuPiette gravatar image MathieuPiette
1567 3

Hello Darksu,

I have exactly zero line of additional Javascript or CSS.

Thank you.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2015-09-10 08:31:04 +0800

Seen: 56 times

Last updated: Sep 15 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More