Show TOC

Creating an ActionLocate this document in the navigation structure

Context

An action is an incident that can be recognized by the application, for example, choosing a button. When you perform the action during runtime, the event assigned to the action occurs and triggers the corresponding event handler. For example, navigates to the next view when the user chooses the specified button.

When you create an action, the IDE generates an event handler called Action Event Handler for the action. This event handler stores the Java code that is executed when the action or event occurs. You can implement the event handler, as required.

More information: Event Handling

Procedure

  1. In the Laptop UI Explorer, double-click the view element for which you want to create the action.
  2. Choose the Actions tab.
  3. Choose New.
  4. Enter the information specified in the following table:

    Field name

    Description

    User action and values

    Name

    Name of the new action

    Enter a name for the action, for example, Go .

    Text

    Label of the UI element to which you associate the action

    Enter a name for the label.

    If you enter the label Go and then assign the action to a button UI element, then the IDE assigns this label to the button. To enter a label of your choice, modify the text property of the button.

    Validation

    Identification of the action as a nonvalidating action

    Select this option if the action is a nonvalidating action.

    More information:

    Event Handler

    The code that the IDE executes when the application user triggers the action

    To use an existing event handler, select Use existing, and then select the required event handler.

    To generate a new event handler called onAction<Name of Action>, select Use default.

    Fire Plug

    The plug that is fired during runtime, when the application user triggers the action

    Select the outbound plug that you created.

    This is applicable only if you are creating the action in a view that contains an outbound plug.

    You can also create an outbound plug at this point, if required. To do this, choose New .

    The IDE generates the code to fire the outbound plug and includes it in the event handler.

  5. Choose Finish.
  6. Choose Start of the navigation path File Next navigation step Save End of the navigation path.