Tab page switching event in the ADF

Source: Internet
Author: User

In the process of developing the ADF, Tab pages are commonly used to components. When using tab pages, you often need to process some special logic when clicking tab pages, therefore, you need to obtain the event when you switch the tab page.

The following example shows how to click the "test1" tab and output "Exit from the" Test2 "tab and click the" test1 "tab to enter the" test1 "tab". Then, click "Test2" to the "tab, output "Exit test1 tab, click Test2 tab to go to Test2 tab ".

Package hand. test. view. backing; <br/> Import Org. apache. myFaces. trinidad. event. disclosureevent; <br/> public class paneltabbedtest {<br/> Public paneltabbedtest () {<br/>}< br/> Public void test1disclosurelistener (disclosureevent) {<br/> If (disclosureevent. isexpanded () {<br/> system. out. println ("click the test1 tab"); <br/> system. out. println ("go to the test1 tab page"); <br/>} else {<br/> system. out. println ("Exit test1 tab"); <br/>}< br/> Public void test2disclosurelistener (disclosureevent) {<br/> If (disclosureevent. isexpanded () {<br/> system. out. println ("click the Test2 tab page"); <br/> system. out. println ("go to the Test2 tab page"); <br/>} else {<br/> system. out. println ("leaving the Test2 tab page"); <br/>}< br/>

Implementation result:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.