-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have something like this
<tabbox width="400px">
<tabs>
<tab label="Tab 1" image="/img/folder.gif" />
<tab label="Tab 2" image="/img/folder.gif" closable="true" />
</tabs>
<tabpanels>
<tabpanel>This is panel 1</tabpanel>
<tabpanel>This is panel 2</tabpanel>
</tabpanels>
</tabbox>
We create tabs dynamically but sometimes a error is thrown..
one selected tab is required[].
I have check the source code and i see something like
final Set<Tab> selItems = evt.getSelectedItems();
if (selItems == null || selItems.size() != 1)
throw new UiException("Exactly one selected tab is required: " + selItems); // debug purpose
In our problem seems to be fired when a new Tab is created and then selected manually but we are not sure of it.
Any workaround thanks a lot..
Hello javiut,
As a workaround please try the example that zk provides (Custom Single Selection) at the following url:
http://books.zkoss.org/wiki/ZKDeveloper%27sReference/MVVM/DataBinding/Collectionand_Selection
Best Regards,
Darksu
Asked: 2015-03-11 13:02:37 +0800
Seen: 27 times
Last updated: Mar 23 '15
wrong valueException come in front of modal popup [closed]
Use parameters in a conditional @command
Problems with multiple press and onCtrlKey
MVVM @save on the fly [closed]
Unable to activate destroyed desktop
org.zkoss.zk.ui.UiException: java.lang.ClassNotFoundException
How to put a image or Letter over image on a specific XY Coordinate
from where does the "source code" come from and can you recreate this problem in a fiddle? (there doesn't have to be data in the tabs)
chillworld ( 2015-03-11 13:25:51 +0800 )editif i could reproduce i would be able to fix it.. i dont know why this problem arise the logic behind or the ZK situation which this problem arise..My code is create a TAB and selected it..
javiut ( 2015-03-11 14:40:09 +0800 )editedit your question to add the new code
chillworld ( 2015-03-11 15:02:44 +0800 )edit