cancel
Showing results for 
Search instead for 
Did you mean: 

How to call a method of an other view in the current view

Former Member
0 Kudos

Hi Guys,

I have 2 views in my Project: IPrivateValidateIncidentView and IPrivateRoadMapView. Now, a button in the IPrivateRoadMapView must call a method in the IPrivateValidateIncidentView. I cannot seem to figgure this out. I know that I will probably need to arrange things centrally in my Component COntroller somehow.

I have tried to see what methods I can Invoke on IPrivateValidateIncidentView from within the Controller to see if I can call the method OnActionDoneValidate() from there, but I can only seem to get a constant with this methods name: IPrivateValidateIncidentView.WD_EVENTHANDLER_ON_ACTION_DONE_VALIDATION;

Please help.

Christiaan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You are correct, for your requirement you need to arrange the things centrally that is in Component Controller. As in above reply you need to Create your context in Component controller and then map them to both the views. So data will be available to both the views and finally you create a method in component controller and call that method from second view. So the data changes made in controller will be reflected on First View as they have context mapping.

Regards

Raghu

Answers (5)

Answers (5)

former_member201361
Active Contributor
0 Kudos

hi,

u cannot call a method belonging to View1 from View2.if u want to share the data between Views , then use component controller context.

thanks and regards

Former Member
0 Kudos

Hi,

If you want to have data commin to 2 views you have to share them using Component Controller.You can use the same method in both the views instead of calling method of view1 in view 2.

Regards

padma N

Former Member
0 Kudos

hi ,

To navigate between views you can use in/out bound plugs no?...

Thanks and Regards

shanto aloor

Former Member
0 Kudos

Hi,

For every action that you create you get a constant string like this IPrivate<View Name>.WD_EVENTHANDLER_ON_ACTION_<Action Name>.

So, you can use the above constant in if condition.

Former Member
0 Kudos

hi,

u cannot call methods of a view in a controller whereas vice versa is possible

-->create a method in the component controller and call it from the view.

Regards,

Satya