cancel
Showing results for 
Search instead for 
Did you mean: 

calling view controller method from component controller method

Former Member
0 Kudos

Hi,

Is there any way to call view controller method from component controller method?

Thanks,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Khandal.

You should not make you component controller dependent from a view controller.

But what you can do is to define an event in the component controller. The view

controller can register for this event.

In the stage where you currently want to call the view controller method just fire

the event. In the event handler method in the view controller you can call the

method then.

Why do you need to call a view controller method? Can you give more details

about the scenario?

Cheers,

Sascha

Former Member
0 Kudos

It worked.

Thanks a lot

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Haresh,

It is possible to call the View controller method using component reuse.But it is very difficult to do that because, you want to make component reuse of its own application and need to acces that view and methods also. But this one is not suggestable.

So please create method in component controller and use it wherever you want in other views also. This is best and Good way to do that.

Warm Regards,

Vijay.