cancel
Showing results for 
Search instead for 
Did you mean: 

Call a view's method from Component Controller.

Former Member
0 Kudos

Hi

Is it possible to call a view's method from Component Controller.

Regards

Nikhil

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Follwoing is possible create the method in controller call it from view, not reverse.

Regards

Ayyapparaj

Former Member
0 Kudos

HI Nikhil

Custom Controllers have a public interface ,but view controllers do not. therefore a view controller can decalre the use of custom controller, but not vice versa

Best Regards

Chaitanya.A

Former Member
0 Kudos

Hi Nikhil,

its not possible bcos view is always private. why u want to do that??

regards

Sumit

Former Member
0 Kudos

If you want some method to be executed in view controller .you can raise event in the component controller and in view controller you can handle that event and execute the event handler method.

Former Member
0 Kudos

Hi Tummuru,

I have created an event in Component Controller by the name toMenuView. Now I created a method in which this event is getting fired. Foll. is the code of the method.

public void fireToMenuView( )

{

wdComponentAPI.getMessageManager().reportSuccess("fireToMenuView");

wdThis.wdFireEventToMenuView();

}

Now I have created an event handler "handleToMenuView" in the MenuView and subscribed the event handler to the event in Component Controller.

The control is reaching to the fire event in component controller but not to the Event handler in view controller.

What am I missing.

Regards

Nikhil