1. Getting started
  2. Annotations
  3. Dynamic resources
  4. Validation
  5. Form Elements
  6. Actions
  7. Environments
  8. XML Forms

Actions

Actions are closely tied to forms and dialogs. They are declared by attaching [Action] attributes at desired locations.

Adding actions

Actions are added through the [Action] attribute. Actions have these properties:

Properties regarding layout are discussed in form elements.

Dialog actions

It is common to use actions only when the form is hosted in a dialog. For this reason you can use [DialogAction] attribute. DialogAction has IsVisible = {Env DialogHostContext} and ClosesDialog = true by default.

Handling actions

When an action is performed, an IActionContext is created and is passed to:

IActionContext contains the following members:

As noted above, both model and form context can handle actions. As a guideline, we suggest this pattern:

Intercepting actions

You can write custom plugins or reusable logic and attach them to ActionElement.InterceptorChain or ActionElement.ActionInterceptor. An IActionInterceptor must implement IActionContext InterceptAction(IActionContext actionContext) which takes the current action context and can do things like:

Back to top