To navigate from one view to the next, you need an appropriate action, which you bind to a UI element event (such as a button's event onAction ). You then need to implement the event handler, which reacts to this action and triggers a view change by calling an outbound plug.
You have created the Go action. The implementation of the navigation is automatically inserted into the associated event handler.
To check the generated source code for event handler onActionGo() , open the Java Editor for the Welcome Comp View.java class.
public void onActionGo(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent ) { //@@begin onActionGo(ServerEvent) wdThis.wdFirePlugOut(); //@@end } |
To trigger navigation from the Welcome Comp View to the ResultView using the outbound plug Out , the application calls the outbound plug method wdFirePlugOut(). The predefined private variable wdThis is used for this method call. The wdThis variable is always required whenever you make method calls to the view controller's private interface IPrivate<Name_of_View>.
In a subsequent step, you must only assign these actions to the appropriate buttons in the view layout and the navigation part of your sample application will be completely defined.