cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger an action that belongs to another VIew Controller ?

Former Member
0 Kudos

Hello All,

Can someone advise on how I am able to trigger an action in another view controller should a user clicks on a button that belongs to my current view ? What I am trying to achive is to save the contents of my table to the value node when a user clicks on a save button that belongs to another view. Below is what I have attempted to do but obvioulsy its not correct. ANy suggestions will be greatly appreciated. Thank you very much.

<u><b>My wrong attempt</b></u>

IPrivateFuncAirlineTrainView.WDActionEventHandler.ADD_ROW();

from

KWok Wei

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

You could add the value node to the component controller context. And then use data mapping to store the value node changes of your view in the controller context. Also map the context of the other view to the component controller. In this way the data can be shared between the two views.

Former Member
0 Kudos

Hi Kwok,

You can do one thing.

Make one method in your custom or component controller. Then, include all your code under save button action in this method.

Now, call this method from different view whenever required.

Regards,

Bhavik

Former Member
0 Kudos

Actions exist only in <b>view </b>controllers. For functionality that should be available to different views, use custom controllers or the component controller.

Armin

Former Member
0 Kudos

Hi,

Why can't you write the method at the component controller and call the method ??

Regards, Anilkumar