0

Tabbox tab exactly one selected tab is required[].

asked 2015-03-11 13:02:37 +0800

javiut gravatar image javiut flag of Venezuela, Bolivarian Republic of
90 1 5

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..

delete flag offensive retag edit

Comments

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

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

edit your question to add the new code

chillworld ( 2015-03-11 15:02:44 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-03-23 00:42:14 +0800

Darksu gravatar image Darksu
1991 1 4

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

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-03-11 13:02:37 +0800

Seen: 27 times

Last updated: Mar 23 '15

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