Skip to main content
Version: 4.2

ApprovalTrail

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.2.0.0)

Displays an approval workflow with participant portraits, decisions, comments, and action requests.

public class ApprovalTrail : Control

Approved and Rejected notify the application of a requested action. The control never changes workflow states automatically and does not authenticate or authorize the current user. Actions target the first Pending step in collection order. Applications must validate permissions, persist the decision, and update the relevant steps. Stale browser interactions are ignored.

Example:

var trail = new ApprovalTrail { ShowActions = true };
trail.Steps.Add(new ApprovalStep { Text = "Leila Costa", State = ApprovalState.Pending });
trail.Approved += (sender, e) =>
{
// Check permissions and persist the decision before changing the display.
e.Step.State = ApprovalState.Approved;
e.Step.Date = DateTime.Now;
};
this.Controls.Add(trail);

Constructors​

Instance member ApprovalTrail()​

Initializes an empty horizontal trail with comments and actions visible.

Properties​

Instance member ApprovedText​

String: Gets or sets the caption for the approved approval state. (Default: null)

The default is null, which uses the built-in text for the current UI culture. An empty string suppresses the text without disabling the operation.

Instance member ApproveText​

String: Gets or sets the approve button caption. (Default: null)

The default is null, which uses the built-in text for the current UI culture. An empty string suppresses the text without disabling the operation.

Example:

var control = new ApprovalTrail();
control.ApproveText = "Accept";
control.ApproveText = null; // Restore the built-in localized text.

Protected member DefaultSize​

Size: Gets the default size of the approval trail.

Instance member Focusable​

Boolean: Gets or sets whether the trail can receive the focus. The default is false. (Default: False)

Instance member Orientation​

Orientation: Gets or sets the direction of the participant chain. (Default: Horizontal)

Instance member PendingText​

String: Gets or sets the caption for the pending approval state. (Default: null)

The default is null, which uses the built-in text for the current UI culture. An empty string suppresses the text without disabling the operation.

Instance member RejectedText​

String: Gets or sets the caption for the rejected approval state. (Default: null)

The default is null, which uses the built-in text for the current UI culture. An empty string suppresses the text without disabling the operation.

Instance member RejectText​

String: Gets or sets the reject button caption. (Default: null)

The default is null, which uses the built-in text for the current UI culture. An empty string suppresses the text without disabling the operation.

Instance member ShowActions​

Boolean: Gets or sets whether actions for the first Pending step are visible. (Default: True)

When several steps are Pending, actions target only the first one. Hiding actions also rejects queued action requests. Visibility is not an authorization check; validate permissions in handlers.

Instance member ShowComments​

Boolean: Gets or sets whether nonempty participant comments are displayed. (Default: True)

Instance member SkippedText​

String: Gets or sets the caption for the skipped approval state. (Default: null)

The default is null, which uses the built-in text for the current UI culture. An empty string suppresses the text without disabling the operation.

Instance member Steps​

ApprovalStepCollection: Gets the ordered steps. Collection and item changes update the client automatically.

Instance member TabStop​

Boolean: Gets or sets whether the trail takes part in tab navigation. The default is false. (Default: False)

Instance member WaitingText​

String: Gets or sets the caption for the waiting approval state. (Default: null)

The default is null, which uses the built-in text for the current UI culture. An empty string suppresses the text without disabling the operation.

Methods​

Protected member Dispose(disposing)​

Detaches collection observers without disposing application-owned portraits.

ParameterTypeDescription
disposingBooleanWhether managed resources can be released.

Protected member OnApproved(e)​

Raises the Approved event.

ParameterTypeDescription
eApprovalEventArgsThe interaction data.

Protected member OnCommentClick(e)​

Raises the CommentClick event.

ParameterTypeDescription
eApprovalEventArgsThe interaction data.

Protected member OnRejected(e)​

Raises the Rejected event.

ParameterTypeDescription
eApprovalEventArgsThe interaction data.

Protected member OnStepClick(e)​

Raises the StepClick event.

ParameterTypeDescription
eApprovalEventArgsThe interaction data.

Protected member OnWebEvent(e)​

Dispatches browser interactions to validated event processors.

ParameterTypeDescription
eWisejEventArgsClient event data.

Protected member OnWebRender(config)​

Renders first-level presentation properties and a versioned step snapshot.

ParameterTypeDescription
configObjectClient configuration.

Events​

Instance member Approved​

EventHandler<ApprovalEventArgs> Occurs when approval is requested for the first Pending step. No state is changed automatically.

Instance member CommentClick​

EventHandler<ApprovalEventArgs> Occurs when a visible nonempty comment is activated by mouse or keyboard.

Instance member Rejected​

EventHandler<ApprovalEventArgs> Occurs when rejection is requested for the first Pending step. No state is changed automatically.

Instance member StepClick​

EventHandler<ApprovalEventArgs> Occurs when a participant is activated by mouse or keyboard.

Implements​

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.
IBindableComponentBindable components implement this interface.
IDropTargetControls that support drag & drop operations implement this interface.
IWisejComponentAll wisej components implement this interface.
IWisejControlAll wisej controls derived from the Control class must implement this interface.
IWisejSerializableAllows an object to serialize itself.