0

how to open and close tabpanel in tabbox

asked 2014-02-12 11:02:24 +0800

Atul30 gravatar image Atul30
35 4

hello sir,

Suppose in tabs 4tabpannel their like,tab1,tab2,tab3,tab4 when i click pannel tab1 then its open,as well as again click tab1 then its close,tab1 close and tab2 open,how to do in ZK

please help me, I am trying java code.

delete flag offensive retag edit

Comments

Very strange question I saw on stackoverflow to. It's hard to get your point. If you have a tabpanel with 4 tabs. You see the 4 tabs assume above. Normally when you click on tab1, you see tab1, if you select tab2 you see tab2. You want to close or just activate tab2? when you click second time on tab1? Close means the tabpanel can't be chosen again cause its gone.

chillworld ( 2014-02-12 12:10:00 +0800 )edit

3 Answers

Sort by ┬╗ oldest newest most voted
1

answered 2014-02-14 07:46:22 +0800

chillworld gravatar image chillworld flag of Belgium
5357 4 9
https://github.com/chillw...

I have posted an example on fiddle in MVVM :

http://zkfiddle.org/sample/3kvld74/9-Tabbox-switching

Note That I have to 'cheat' with the lastTab. This is cause the tab what you click is already selected when you do the method. The onSelect event you can't use cause that's not triggered when ex tab1 is selected and you click again on tab1.

Greetz chill.

link publish delete flag offensive edit

Comments

Thank you.

Atul30 ( 2014-02-14 11:22:31 +0800 )edit

your welcome

chillworld ( 2014-02-14 16:34:24 +0800 )edit
0

answered 2014-02-13 08:19:52 +0800

Atul30 gravatar image Atul30
35 4

how can i solve this?

link publish delete flag offensive edit

Comments

if you are more clear with your question we can help you. Do your tabs need to dissapear(so no tab1 you can choose) when you click second time on it or just activate the next?

chillworld ( 2014-02-13 08:26:06 +0800 )edit
0

answered 2014-02-13 15:26:32 +0800

Atul30 gravatar image Atul30
35 4

updated 2014-02-14 05:42:27 +0800

sir, i am using code like <tabbox> <tabs> <tab selected="true">tab1</tab> <tab>tab2</tab> </tabs> <tabpanels> <tabpanel>

</tabpanel> <tabpanel>

</tabpanel> </tabpanels> </tabbox>

I am using tab panel above format,its working properly,but if I click tab1 then tab1 will close because already tab1 is open(selected="true"). I need at a time two click will work(close and Open tab panel).How can i do this operation(close and open).

suppose one tab1 is open,then i click tab1 again it will close . This is my requirement.

please help me

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: 2014-02-12 11:02:24 +0800

Seen: 57 times

Last updated: Feb 14 '14

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