0

SelectEvent.getTarget = Tab not Tabbox??

asked 2007-07-10 18:55:00 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4406327

By: mattedelman

Hello,

I've been using 2.4.1 for a few days now, and it seems to have introduced some troublesome behavior around the Tabbox SelectEvent:

For my test, I have a standard Tabbox component, defined in ZUL. In my backing class, I've attached a listener to the onSelect event of the Tabbox.

The following is the event handling method:
public void handleTabSelection(Event event) {
Component ct = (Component)(((SelectEvent)event).getTarget());
Tab tb;
if (ct instanceof Tabbox) {//in zk 2.3.1 this block executes
tb = (Tab) ((Tabbox) ct).getSelectedTab();
}
else if (ct instanceof Tab) {//in zk 2.4.1 this block executes
tb = ((Tab)((SelectEvent)event).getTarget());
}
System.out.println("the ID of the selected tab is:
"+tb.getId().toString());
}

In version 2.3.1, ct would be an instance of Tabbox

In version 2.4.1, ct is an instance of Tab

Is that intentional?

Thanks,
Matt

P.S. It's not the only problem I'm seeing as a result of the 2.4.1 upgrade.
I'll post to the following thread regarding the problems it's causing with respect to my custom tabbox component set:
http://sourceforge.net/forum/forum.php?thread_id=1760584&forum_id=510209

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2007-07-11 02:57:02 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4407008

By: jebberwocky

Dear Matt

You are right. The getTarget() has been changed from tabbox to tab. The reason behind is to implement the fulfill attribute of tabpanel.

Thank you

Jeff

link publish delete flag offensive edit

answered 2012-03-21 18:38:01 +0800

macutzin gravatar image macutzin
3

ddfdf

link publish delete flag offensive edit
Your reply
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

RSS

Stats

Asked: 2007-07-10 18:55:00 +0800

Seen: 258 times

Last updated: Mar 21 '12

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