cancel
Showing results for 
Search instead for 
Did you mean: 

Methods execution during calling same page..

former_member193947
Participant
0 Kudos

Dear Expert's,

I have an JS/XML application with two level navigation. I am trying to change the value of second page, for every time i call it. As per the break point's that i set, it goes through createContent, Init and Before/After rendering methods only once and none of the page method's get's called again.

Please advise, if there is a way that i can try change the values of the second screen element's, by writing code in any method's ? Should i remove the page from the 'App' and add it again to make these method's execute ?

Thanks,

Seeker.

Accepted Solutions (1)

Accepted Solutions (1)

former_member182862
Active Contributor
0 Kudos

Hi SAP Seeker

For flexibility, you should use a model to achieve this as shown here.

-D

Answers (2)

Answers (2)

former_member189945
Contributor
0 Kudos

Hi SAP Seeker,

As Dennis noted, model would be the correct way in this case. But you could also use page.invalidate() to force rerendering of the Page.

Regards,

Kimmo

mauriciolauffer
Contributor
0 Kudos

If you are using sap.m library, you can use the events fired by page.

SAPUI5 SDK - Demo Kit : Events fired on the Pages

On the other hand, you can change the values of the second screen elements using the method sap.ui.getCore().byId("idElement")

Call it when you call the methods to navigate between the screens.

former_member193947
Participant
0 Kudos

Hello Lauffer,

Thanks for your reply. To get the value byId through Core, atleast one of the method's within the page needs to be executed. But, the issue is, the second page is already added using App element and it never get's loaded again. Since it is already loaded, none of the method's gets executed. Any solution possible ?

Thanks,

Seeker.