org.sandev.ui.structs
Class ActionStruct

java.lang.Object
  extended by org.sandev.ui.structs.ActionStruct
Direct Known Subclasses:
Action

public class ActionStruct
extends java.lang.Object

An action represents a call to an application function.

The SandUIAdaptor relies on a UIScreenAdaptor for rendering and reconstruction of a display screen. The UIScreenAdaptor relies on the actionStatus field value, and the UIFormOwner isActive method, to gate which actions are applied.

Actions are divided into three broad types:

Actions co-exist with the SANDForms processing. Here's how a full processing cycle works:

  1. A new Screen instance is initialized from the SandUI declaration.
  2. UIFormContext instances are restored/initialized for any Link with associated actions (for example FORM Links).
  3. The actions are processed:
  4. Render the Screen instance, rendering each Link in the order declared. Within each Link, render active requests and active values as determined by the actionStatus and the value of UIFormOwner.isActive for the action name.

Each Action is associated with a Link, which determines its source scope. For a FORM link, the UIFormContext passed to doAction is the UIFormContext for the form. For a TEXT link, the UIFormContext passed to doAction contains only the current userID, and is otherwise undefined.

All actions produce a UIFormContext. For a value action, the displayed result is the summary information for the currInst object. To return only a single value, set the currInst to a Value message. For a request or value action, the result is the form information. If a request or value action is used in a TEXT link then the result is ignored (the action is used only for side-effects).

Additional notes:

summary fields: name actionType displayName

Field Summary
protected  int actionStatus
          Whether this action is active or not.
protected  int actionType
          What kind of action this is.
protected  java.lang.String displayName
          The text name for the action button.
protected  java.lang.String name
          The identifying name of this action.
 
Constructor Summary
ActionStruct()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

displayName

protected java.lang.String displayName
The text name for the action button. If the UIScreenAdaptor supports localization, then this name is used as a lookup key for localized text. Otherwise this name is displayed directly.


name

protected java.lang.String name
The identifying name of this action. The name is used for the UIFormOwner isActive and formAction method calls.


actionStatus

protected int actionStatus
Whether this action is active or not. This can be switched unconditionally when declared, or switched at runtime by the UIFormOwner isActive method.

declared default value: INACTIVE

enumerated constant values:

  • DISABLED("disabled, always inactive") = 1
  • INACTIVE("inactive, unless runtime activated") = 2
  • ACTIVE("active, unless runtime inactivated") = 3
  • UNCONDITIONAL("unconditional, always active") = 4
declared invalid value: 0

actionType

protected int actionType
What kind of action this is. See the class notes for details.

declared default value: REQUEST

enumerated constant values:

  • SETUP("setup") = 1
  • REQUEST("request") = 2
  • VALUE("value") = 3
declared invalid value: 0
Constructor Detail

ActionStruct

public ActionStruct()