0

Zk Disable a Tab not working

asked 2015-07-02 13:51:53 +0800

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

I have a bandbox which have a listbox which responds on select event i have a tabbox with some tabs i would like to onSelect the listbox disabled the tabs i have the following code this is just a snippet

listBox.addEventListener("onSelect",new EventListener()
{
public void onEvent(final Event event) throws Exception
{
    final Listbox box = (Listbox) event.getTarget();
    final Bandbox band = (Bandbox) box.getParent().getParent();         
    enabledOrDisableTabs(false);//disable the tabs  
            myLongOperationDealsWithDatabase();                     
    enabledOrDisableTabs(true);//enabled the tabs
}
 });

All i want to do is prevent the user to select another tab while the long operation is being executing but i cannot see the tabs disable i have try this code to see if something is wrong with my code.

listBox.addEventListener("onSelect",new EventListener()
{
public void onEvent(final Event event) throws Exception
{
    final Listbox box = (Listbox) event.getTarget();
    final Bandbox band = (Bandbox) box.getParent().getParent();         
    enabledOrDisableTabs(false);//disable the tabs                                  
            myLongOperationDealsWithDatabase();
            return;
}
 });

In fact i can see the tabs being disabled could not find the way disabled and enabled the tabs with a long operation in the middle maybe has to do with the way ZK schedules the operations to gain performance or same request or something any approach..

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-07-19 13:45:37 +0800

Darksu gravatar image Darksu
1991 1 4

Hello javiut,

Please find the answer at the following post:

http://forum.zkoss.org/question/98103/zk-tabbox-do-not-disabled/?answer=98258#post-id-98258

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-07-02 13:51:53 +0800

Seen: 36 times

Last updated: Jul 19 '15

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