0

setting an sClass on selected tab results in tab losing z-tab-seld class

asked 2012-03-22 14:06:23 +0800

sunriis gravatar image sunriis
15

Hi all

Using zk 5.0.7 I am calling setSclass("myClass") on a selected tab. I expect the css selctor to be .z-tab-seld.myClass, but it falls back to .z-tab.myClass. I have to select the tab again for it to be .z-tab-seld.myClass.

Is this a bug or am I doing something wrong?
Thanks in advance.

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2012-03-26 06:30:47 +0800

sunriis gravatar image sunriis
15

Should I provide more info on the problem?

link publish delete flag offensive edit

answered 2012-03-28 06:50:38 +0800

sunriis gravatar image sunriis
15

I modified a demo in zk sandbox to show the problem, here's the code:

	
        <tabbox width="250px">
		<tabs>
			<tab id="tab1" label="Tab 1"/>
			<tab label="Tab 2"/>
		</tabs>
		<toolbar width="90px">
			<toolbarbutton image="/img/live.gif" onClick='tab1.setSclass("myclass")' />
		</toolbar>
		<tabpanels>
			<tabpanel>This is panel 1</tabpanel>
			<tabpanel>This is panel 2
		The second panel</tabpanel>
		</tabpanels>
	</tabbox>

When tab1 is selected and you click the toolbarbutton the tab won't look selected anymore (though it in practice still is)

link publish delete flag offensive edit

answered 2012-06-11 12:54:40 +0800

hattifnat gravatar image hattifnat
6

I'm experiencing the same with ZK 6.0.1 and I have filed an issue: http://tracker.zkoss.org/browse/ZK-1187

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: 2012-03-22 14:06:23 +0800

Seen: 254 times

Last updated: Jun 11 '12

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