!--a11y-->
Using the UI Element FunctionKey 
The FunctionKey UI element allows you trigger a Web Dynpro action using a specific key of the mobile device. In the following example, this UI element is used to navigate to another view via a specific key.
· The SAP NetWeaver Developer Studio is installed on your computer, you can use it to create your mobile Web Dynpro application
· You must have access to a J2EE Engine on which you deploy the Web Dynpro application
· You are using a pocket PC with special scanning equipment manufactured by Intermec Technologies or Symbol Technologies
...
1. Navigate to the desired starting view (called StartingView, for example).
2. Double-click the view to start editing or choose Edit from the context menu.
3. Insert the mobile UI element FunctionKey.
4. Switch to the Plugs tab.
5. Create an outbound plug with the name fromFunctionKey and define the navigation link to the TargetView.
...
1. Switch to the Actions tab page.
2. Define an action, for example NavigateToAnotherView.
...
...
1. Assign the value IBrowse_OnKey49 to the keyCode property of the UI element FunctionKey.
2. Assign the action – in this case, NavigateToAnotherView – to the onAction property of the UI element NavigateToAnotherView.
...
1. Add the following source code to the implementation of the view controller.
2.
To do so, switch to
the Implementation tab.
The read data is passed to the
context and the relevant context attribute is set.
public void onActionNavigateToAnotherView(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent ) { //@@begin onActionNavigateToAnotherView(ServerEvent) wdThis.wdFirePlugFromFunctionKey(); //@@end } |
If you press key 1 on the mobile device, you navigate to another view (in this example, to the TargetView).