Adding or Modifying Navigation

To add navigation to a screen, you can add ScreenAction to controls or menus that take actions.

protected void configureObjectHandlersById(
    int ID, Object object) {
  switch (ID) {
  ...
  case MENU2:
    MenuAction menu2 = (MenuAction) object;
    //Create list of actions
    ActionList actionList15 = new ActionList();
    IBOBAction connectionAction9 = new
    ScreenAction(UIDefinition.getScreen("screen16"), false, null);
    menu2.setAction(actionList15);
    IBOBAction contextAction4 
        = new SaveMobileDataContextAction(
            cellTable1);
    actionList15.addAction(contextAction4);
    actionList15.addAction(connectionAction9);
    ...

To remove navigation, you can override the menu or control's action to remove the screen action.

protected void configureObjectHandlersById(
    int ID, Object object) {
  switch (ID) {
  ...
  case MENU2:
    MenuAction menu2 = (MenuAction) object;
    ...
    menu2.setAction(xxxx);
  default:
    super.configureObjectHandlersById(ID, object);

For controls that support an action, you can create a widget event:

public boolean navigationClick(
    Object field, int controlID,
    ActionList actions, int status, int time) 
{
  // custom code
  // modify actions which include the screen action
  return false;
}