cancel
Showing results for 
Search instead for 
Did you mean: 

PageBook API to jump from one page to other page with in the same PageBook

praveen_kumar334
Participant
0 Kudos

Hi Team,

Could you please help me on how to achieve the below usecase. I have 2 reports(Rep_2023 and Rep_2024) which i have placed in 2 different pages in one PageBook(PageBook_1). I have placed 2 button(Button_2023 and Button_2024) in the main page. PFB screenshot.

Now my req is when i click on Button 2023( ID : Button_2023) 1st page should get enabled and when i click on Button 2024( ID : Button_2024) 2nd page in that PageBook should be enabled. I don't see any methods to enabled specific page in the PageBook Widget.

Accepted Solutions (1)

Accepted Solutions (1)

N1kh1l
Active Contributor
0 Kudos

praveen.kumar334

Sorry I did not realize its a Pagebook. The below should work. On 2023 Button put the below API. Page_1 and Page_2 are default Page keys in Page Book. If you have changed the key then you have to pass that name. I see you have names P_2023 and P_2024

PageBook_1.setSelectedKey("P_2023");

On 2024 Button the below

PageBook_1.setSelectedKey("P_2024");

Output:

Br.

Nikhil

praveen_kumar334
Participant
0 Kudos

Thanks Nikhil, its working now and now i want to highlight the button with some colors when we select that button. So how to achieve it ?

N1kh1l
Active Contributor
0 Kudos

praveen.kumar334

You would need to set css class of the Button. Please go through the Application Designer reference to get more details. Please close the thread if your initial question is answered. You can always open new threads for a different question.

Br.

Nikhil

praveen_kumar334
Participant
0 Kudos

Thanks Anand. Will close.

Answers (1)

Answers (1)

N1kh1l
Active Contributor
0 Kudos

praveen.kumar334

praveen.kumar334On the Button put the below API code. You can get page id from API Application.getActivePage(). Generally its in numeric sequence. So if 2023 is first page put Page_1 on 2023 button.

Application.setActivePage(Page_2);

Br.

Nikhil

praveen_kumar334
Participant
0 Kudos

Hi Nikhil,

But my req is i need to move from one page to other page with in the same pagebook.

//PageBook_1.getPage('P_2023');
Application.setActivePage('P_2023');

But I am getting the error saying invalid Page ID.

Any idea on how to achieve this.