cancel
Showing results for 
Search instead for 
Did you mean: 

Calling the init() method of the Component controll within the View Control

Former Member
0 Kudos

Hello All,

Is it valid/Allowed to make an explicit call to the init() method of the component controller in the any of the methods of the View Controller.

Will it cause any inconsistency between the component controller context data and View context data at a point when I call the init().

Regards

Anupama

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Anupama,

R u taking about the init method of the plugins.

Then you can create a method and call it from both init and when your screen is refreshed.

Regards

ayyapparaj

Former Member
0 Kudos

Anupama,

Do you mean init or wdDoInit? You cannot call the later as well as you cannot call any WD-framework methods that start with "wd" prefix.

By the way, wdDoInit in component controller (do not confuse with custom controller or interface controller) is called before any other method in any controller. So I hardly believe that it is not called when your view become available.

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Hello Valery,

I mean Init() and NOT wdDoInit().

and yes both Init and wdDoInit() are being called before any other method is called.

But the operations I perform in the Init() has to be repeated at some point when

i perform some action on my screen without relaunching or reloading the whole screen. Which is why I want to call Init() again in view controller.

Regards

Anupama

Former Member
0 Kudos

Hi,

1) Create a method in your component controller

2) Put the necessary operations you do in your component controller to this method

3) For a given event, call this method

More importantly, where is this init() method in component controller ?

Regards,

Subramanian V.

Message was edited by:

Subramanian Venkateswaran

Former Member
0 Kudos

Hi Anupama

What you can do in this scenario is you can isolate the code of initialisation( which will be called from the view) in a new method altogether. Call this method from wdDoInit() in component controller. Now you can call this method from view whenever you require.

The idea is to always isolate reusable codes in separate methods.

Regards

KK

Former Member
0 Kudos

Hi,

What is purpose you calling that?

Let me know, I think it is not possible.

thanks,

Lohi.

Former Member
0 Kudos

Hi Anupama,

How do you all init() method of the component controll from vie controller.

webdynpro framework suppossed to call methods like Init() , wdDomodifyView().

Regards, Anilkumar