Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 1.75 KB

File metadata and controls

49 lines (34 loc) · 1.75 KB
Standard Actions

Standard actions are provided by the framework to solve common tasks, such as invocation of an edit screen for an entity selected in a table. A standard action can be declared in screen XML descriptor by specifying its type in the type attribute, for example:

link:../../../../../source/gui/std_actions/std_actions_1.xml[role=include]

The standard action configures itself depending on its type and owning component. It may or may not require additional parameters.

There are two categories of standard actions:

You can create similar actions or override existing standard types in your project.

For example, imagine that you need an action that would show the instance name of the currently selected entity in a table, and you would like to use this action in multiple screens by specifying its type only. Below are the steps to create such action.

  1. Create an action class and add the @ActionType annotation with the desired type name:

    link:../../../../../source/gui/std_actions/std_actions_2.java[role=include]
  2. In the web-spring.xml file, add <gui:actions> element with the base-packages attribute pointing to a package where to find your annotated actions:

    link:../../../../../source/gui/std_actions/std_actions_2_1.xml[role=include]
  3. Now you can use the action in screen descriptors by specifying its type:

    link:../../../../../source/gui/std_actions/std_actions_2_2.xml[role=include]