cancel
Showing results for 
Search instead for 
Did you mean: 

Interface method called after View Init

sudhahar_ramachandran
Active Participant
0 Kudos

Dears,

I have created an interface method for one WDA Component which I'm calling from 2nd Application.

from the 2nd application, when I call the first application, The INIT Method of the default view is called first. then the interface method is called and passed the data. so I'm not able to get the data and manipulate in my default view.

Should the interface view be called first? or I should not code elements in the default view?

Please let me know how to solve this.

Accepted Solutions (1)

Accepted Solutions (1)

amy_king
Active Contributor
0 Kudos

Hi Sudhahar,

From what controller and method in the 2nd component are you calling the interface method of the used component? Can you move the call to the interface method into the WDDOINIT method of either the default view or the componentcontroller?

If you move the call into the default view's WDDOINIT method, you should be able to manipulate the interface method's return data as needed before the view is rendered. If you move the call into the componentcontroller's WDDOINIT method, you can set the return data from the interface method in the context, then the default view can read and modify the context during its WDDOINIT method.

Cheers,
Amy

sudhahar_ramachandran
Active Participant
0 Kudos

Thanks Amy for your clear response and guidance

Here is my situation.

We have developed few standalone custom applications for e-Recruitment.Now there is a need to create a dashboard from there the navigation will start. Based on a candidate record from the table lead selection, I need to call the external component upon selecting corresponding button. Only upon pressing the button, I will be able to pass the data. but the application is already rendered in the background with wddoinit is called for the default view. so I'm not able to set the elements based on the records. But the data is updated once I call the interface method. so when I see the output, only the data is populated. But the screen elements are not rendered as per my logic because while rendering the view, the data is empty. Now my question is this. should I not code the screen logic in wddoinit of the external component?

amy_king
Active Contributor
0 Kudos

Hi Sudhahar,

Since the WDDOINIT method of the used component is executed before the user selects a candidate record, WDDOINIT will never have access to the selected record. So it sounds like you should move your logic out of the WDDOINIT method of the used component.

Try moving your logic into a method that can be executed (either manually or by a hook method) after the candidate record is selected, e.g., the action handler of the button the user clicks or the action handler for event onLeadSelect or method WDDOMODIFYVIEW.

Cheers,
Amy

sudhahar_ramachandran
Active Participant
0 Kudos

Thanks Amy. I did that already and its working fine.

Answers (0)