1

ZK how to stop OnClick event of tab? [closed]

asked 2013-01-17 05:07:53 +0800

psingh gravatar image psingh flag of India
963 8

updated 2013-01-22 08:36:23 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team

I am creating dynamic tabs.I have created 1st tab then 2nd tab etc.When I am at 3rd tab, I want that user will not be able to select the other tabs or in other words, user will not be able to move from one tab to other tabs.I am using event.propogation(); to stop the event but it is not working.

Do anyone have other solution?

delete flag offensive retag edit

The question has been closed for the following reason "the question is answered, right answer was accepted" by sjoshi
close date 2013-02-08 06:40:53

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-01-22 08:31:58 +0800

psingh gravatar image psingh flag of India
963 8

Hi I want that user will not be able to select the other tabs & then after lots of search I got the solution given below:

selectedTab.addEventListener( // add an EventListener
                Events.ON_CLICK, // listen to onClick event
                new EventListener() {
                    public void onEvent(Event event) {

                        tabs.setSelectedTab((Tab) tabs.getTabs().getChildren()
                                .get(tabs.getTabs().getChildren().size() - 1));
                    }
                });
        selectedTab.setWidgetOverride("_sel",
                "function(notify, init) {return;}"); // prevent select at client
link publish delete flag offensive edit
0

answered 2013-01-22 08:55:28 +0800

gganassin gravatar image gganassin flag of Luxembourg
540 6
http://www.hybris.com/

updated 2013-01-22 08:56:14 +0800

read also this one to get more infos: here

Gio

link publish delete flag offensive edit

Question tools

Follow

RSS

Stats

Asked: 2013-01-17 05:07:53 +0800

Seen: 63 times

Last updated: Jan 22 '13

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