cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a view method from Custom Controller

Former Member
0 Kudos

Hi,

I would like to know is there any way to call a method in a view from the custom controller?

urgent. Thank you very much

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

i guess, you mean Web Dynpro? Then the answer is "no" in the first instance, since you can't add a usage of a view controller to a custom controller (it's something different with interface views).

What you could do is let the view subscribe as Event listener to the corresponding custom controller and "call" the view by firing the event in the CC.

Hope that helps.

Regards

Stefan

Former Member
0 Kudos

Thank you very much for your answer. Yes, its Web Dynpro that i mean.

I kind of got your meaning but can i just reconfirm that:

Can I actually create an outbound plug which will be link to my view?

Thsi is so that I can use the fire event to trigger the method in my view.

Thanks a lot.

Former Member
0 Kudos

Hi Jo,

again, no, this is not possible, since you 1. can't declare a usage of any View for a custom controller and 2. you can't fire an Outbound plug from a controller which doesn't "belong to" a View or Interface View.

Think different It's possible the other way around:

1. Declare an event, maybe "viewTrigger" for the custom controller CC.

2. Add CC to the "Required Controllers" of the View.

3. Declare an Event Handler to the Methods of the View, maybe "handleViewTrigger". The Event source is the created event in CC.

4. Firing the event in CC by calling wdThis.wdFireEventViewTrigger(); in CC's implementation will invoke the handleXXX method in the View, if and only if the View is visible.

Hope that helps.

Regards

Stefan

Former Member
0 Kudos

Thanks a lot .. I got your answer

Answers (0)