CSLA.NET 5.4.2
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.Windows.CslaActionExtender Class Reference

Extender control providing automation around data binding to CSLA .NET business objects. More...

Inheritance diagram for Csla.Windows.CslaActionExtender:

Public Member Functions

 CslaActionExtender (IContainer container)
 Creates an instance of the type. More...
 
CslaFormAction GetActionType (Control ctl)
 Gets the action type. More...
 
void SetActionType (Control ctl, CslaFormAction value)
 Sets the action type. More...
 
PostSaveActionType GetPostSaveAction (Control ctl)
 Gets the post save action. More...
 
void SetPostSaveAction (Control ctl, PostSaveActionType value)
 Sets the post save action. More...
 
bool GetRebindAfterSave (Control ctl)
 Gets the rebind after save value. More...
 
void SetRebindAfterSave (Control ctl, bool value)
 Sets the rebind after save value. More...
 
bool GetDisableWhenClean (Control ctl)
 Gets the disable when clean value. More...
 
void SetDisableWhenClean (Control ctl, bool value)
 Sets the disable when clean value. More...
 
bool GetDisableWhenUseless (Control ctl)
 Gets the disable when useless value. More...
 
void SetDisableWhenUseless (Control ctl, bool value)
 Sets the disable when useless value. More...
 
string GetCommandName (Control ctl)
 Gets the command name value. More...
 
void SetCommandName (Control ctl, string value)
 Sets the command name value. More...
 
void ResetActionBehaviors (ISavable objectToBind)
 Resets all action behaviors. More...
 

Protected Member Functions

virtual void OnClicking (CslaActionCancelEventArgs e)
 Raises the Clicking event. More...
 
virtual void OnClicked (CslaActionEventArgs e)
 Raises the Clicked event. More...
 
virtual void OnErrorEncountered (ErrorEncounteredEventArgs e)
 Raises the ErrorEncountered event. More...
 
virtual void OnSetForNew (CslaActionEventArgs e)
 Raises the SetForNew event. More...
 
virtual void OnBusinessObjectInvalid (CslaActionEventArgs e)
 Raises the BusinessObjectInvalid event. More...
 
virtual void OnHasBrokenRules (HasBrokenRulesEventArgs e)
 Raises the HasBrokenRules event. More...
 
virtual void OnObjectSaving (CslaActionCancelEventArgs e)
 Raises the ObjectSaving event. More...
 
virtual void OnObjectSaved (CslaActionEventArgs e)
 Raises the ObjectSaved event. More...
 
void OnClick (object sender, EventArgs e)
 Method invoked when the target control is clicked. More...
 

Properties

object DataSource [getset]
 Gets or sets a reference to the data source object. More...
 
bool AutoShowBrokenRules [getset]
 Gets or sets a value indicating whether to automatically show broken rules. More...
 
bool WarnIfCloseOnDirty [getset]
 Gets or sets a value indicating whether to warn the user on close when the object is dirty. More...
 
string DirtyWarningMessage [getset]
 Gets or sets the message shown to the user in a close on dirty warning. More...
 
bool WarnOnCancel [getset]
 Gets or sets a value indicating whether to warn the user on cancel. More...
 
string WarnOnCancelMessage [getset]
 Gets or sets the message shown to the user in a warn on cancel. More...
 
string ObjectIsValidMessage [getset]
 Gets or sets the message shown to the user when a button with a Validate ActionType is pressed when the object is valid. More...
 

Events

EventHandler< CslaActionCancelEventArgsClicking
 Event indicating the user is clicking on the Control. More...
 
EventHandler< CslaActionEventArgsClicked
 Event indicating the user clicked on the Control. More...
 
EventHandler< ErrorEncounteredEventArgsErrorEncountered
 Event indicating an error was encountered. More...
 
EventHandler< CslaActionEventArgsSetForNew
 Event indicating the object is set for new. More...
 
EventHandler< CslaActionEventArgsBusinessObjectInvalid
 Event indicating the business object is in an invalid state. More...
 
EventHandler< HasBrokenRulesEventArgsHasBrokenRules
 Event indicating the business object has broken rules. More...
 
EventHandler< CslaActionCancelEventArgsObjectSaving
 Event indicating that the object is saving. More...
 
EventHandler< CslaActionEventArgsObjectSaved
 Event indicating that the object has been saved. More...
 

Detailed Description

Extender control providing automation around data binding to CSLA .NET business objects.

Definition at line 29 of file CslaActionExtender.cs.

Constructor & Destructor Documentation

◆ CslaActionExtender()

Csla.Windows.CslaActionExtender.CslaActionExtender ( IContainer  container)

Creates an instance of the type.

Parameters
containerContainer for the component.

Definition at line 37 of file CslaActionExtender.cs.

Member Function Documentation

◆ GetActionType()

CslaFormAction Csla.Windows.CslaActionExtender.GetActionType ( Control  ctl)

Gets the action type.

Parameters
ctlReference to Control.
Returns

Definition at line 197 of file CslaActionExtender.cs.

◆ GetCommandName()

string Csla.Windows.CslaActionExtender.GetCommandName ( Control  ctl)

Gets the command name value.

Parameters
ctlReference to Control.

Definition at line 407 of file CslaActionExtender.cs.

◆ GetDisableWhenClean()

bool Csla.Windows.CslaActionExtender.GetDisableWhenClean ( Control  ctl)

Gets the disable when clean value.

Parameters
ctlReference to Control.

Definition at line 323 of file CslaActionExtender.cs.

◆ GetDisableWhenUseless()

bool Csla.Windows.CslaActionExtender.GetDisableWhenUseless ( Control  ctl)

Gets the disable when useless value.

Parameters
ctlReference to Control.

Definition at line 366 of file CslaActionExtender.cs.

◆ GetPostSaveAction()

PostSaveActionType Csla.Windows.CslaActionExtender.GetPostSaveAction ( Control  ctl)

Gets the post save action.

Parameters
ctlReference to Control.
Returns

Definition at line 239 of file CslaActionExtender.cs.

◆ GetRebindAfterSave()

bool Csla.Windows.CslaActionExtender.GetRebindAfterSave ( Control  ctl)

Gets the rebind after save value.

Parameters
ctlReference to Control.

Definition at line 280 of file CslaActionExtender.cs.

◆ OnBusinessObjectInvalid()

virtual void Csla.Windows.CslaActionExtender.OnBusinessObjectInvalid ( CslaActionEventArgs  e)
protectedvirtual

Raises the BusinessObjectInvalid event.

Parameters
eEvent arguments.

Definition at line 546 of file CslaActionExtender.cs.

◆ OnClick()

void Csla.Windows.CslaActionExtender.OnClick ( object  sender,
EventArgs  e 
)
protected

Method invoked when the target control is clicked.

Parameters
senderObject originating action.
eArguments.

Definition at line 657 of file CslaActionExtender.cs.

◆ OnClicked()

virtual void Csla.Windows.CslaActionExtender.OnClicked ( CslaActionEventArgs  e)
protectedvirtual

Raises the Clicked event.

Parameters
eEvent arguments.

Definition at line 516 of file CslaActionExtender.cs.

◆ OnClicking()

virtual void Csla.Windows.CslaActionExtender.OnClicking ( CslaActionCancelEventArgs  e)
protectedvirtual

Raises the Clicking event.

Parameters
eEvent arguments.

Definition at line 506 of file CslaActionExtender.cs.

◆ OnErrorEncountered()

virtual void Csla.Windows.CslaActionExtender.OnErrorEncountered ( ErrorEncounteredEventArgs  e)
protectedvirtual

Raises the ErrorEncountered event.

Parameters
eEvent arguments.

Definition at line 526 of file CslaActionExtender.cs.

◆ OnHasBrokenRules()

virtual void Csla.Windows.CslaActionExtender.OnHasBrokenRules ( HasBrokenRulesEventArgs  e)
protectedvirtual

Raises the HasBrokenRules event.

Parameters
eEvent arguments.

Definition at line 556 of file CslaActionExtender.cs.

◆ OnObjectSaved()

virtual void Csla.Windows.CslaActionExtender.OnObjectSaved ( CslaActionEventArgs  e)
protectedvirtual

Raises the ObjectSaved event.

Parameters
eEvent arguments.

Definition at line 576 of file CslaActionExtender.cs.

◆ OnObjectSaving()

virtual void Csla.Windows.CslaActionExtender.OnObjectSaving ( CslaActionCancelEventArgs  e)
protectedvirtual

Raises the ObjectSaving event.

Parameters
eEvent arguments.

Definition at line 566 of file CslaActionExtender.cs.

◆ OnSetForNew()

virtual void Csla.Windows.CslaActionExtender.OnSetForNew ( CslaActionEventArgs  e)
protectedvirtual

Raises the SetForNew event.

Parameters
eEvent arguments.

Definition at line 536 of file CslaActionExtender.cs.

◆ ResetActionBehaviors()

void Csla.Windows.CslaActionExtender.ResetActionBehaviors ( ISavable  objectToBind)

Resets all action behaviors.

Parameters
objectToBindTarget object.

Definition at line 590 of file CslaActionExtender.cs.

◆ SetActionType()

void Csla.Windows.CslaActionExtender.SetActionType ( Control  ctl,
CslaFormAction  value 
)

Sets the action type.

Parameters
ctlReference to Control.
valueValue for property.

Definition at line 214 of file CslaActionExtender.cs.

◆ SetCommandName()

void Csla.Windows.CslaActionExtender.SetCommandName ( Control  ctl,
string  value 
)

Sets the command name value.

Parameters
ctlReference to Control.
valueValue for property.

Definition at line 424 of file CslaActionExtender.cs.

◆ SetDisableWhenClean()

void Csla.Windows.CslaActionExtender.SetDisableWhenClean ( Control  ctl,
bool  value 
)

Sets the disable when clean value.

Parameters
ctlReference to Control.
valueValue for property.

Definition at line 342 of file CslaActionExtender.cs.

◆ SetDisableWhenUseless()

void Csla.Windows.CslaActionExtender.SetDisableWhenUseless ( Control  ctl,
bool  value 
)

Sets the disable when useless value.

Parameters
ctlReference to Control.
valueValue for property.

Definition at line 383 of file CslaActionExtender.cs.

◆ SetPostSaveAction()

void Csla.Windows.CslaActionExtender.SetPostSaveAction ( Control  ctl,
PostSaveActionType  value 
)

Sets the post save action.

Parameters
ctlReference to Control.
valueValue for property.

Definition at line 256 of file CslaActionExtender.cs.

◆ SetRebindAfterSave()

void Csla.Windows.CslaActionExtender.SetRebindAfterSave ( Control  ctl,
bool  value 
)

Sets the rebind after save value.

Parameters
ctlReference to Control.
valueValue for property.

Definition at line 297 of file CslaActionExtender.cs.

Property Documentation

◆ AutoShowBrokenRules

bool Csla.Windows.CslaActionExtender.AutoShowBrokenRules
getset

Gets or sets a value indicating whether to automatically show broken rules.

Definition at line 103 of file CslaActionExtender.cs.

◆ DataSource

object Csla.Windows.CslaActionExtender.DataSource
getset

Gets or sets a reference to the data source object.

Definition at line 80 of file CslaActionExtender.cs.

◆ DirtyWarningMessage

string Csla.Windows.CslaActionExtender.DirtyWarningMessage
getset

Gets or sets the message shown to the user in a close on dirty warning.

Definition at line 132 of file CslaActionExtender.cs.

◆ ObjectIsValidMessage

string Csla.Windows.CslaActionExtender.ObjectIsValidMessage
getset

Gets or sets the message shown to the user when a button with a Validate ActionType is pressed when the object is valid.

Definition at line 176 of file CslaActionExtender.cs.

◆ WarnIfCloseOnDirty

bool Csla.Windows.CslaActionExtender.WarnIfCloseOnDirty
getset

Gets or sets a value indicating whether to warn the user on close when the object is dirty.

Definition at line 117 of file CslaActionExtender.cs.

◆ WarnOnCancel

bool Csla.Windows.CslaActionExtender.WarnOnCancel
getset

Gets or sets a value indicating whether to warn the user on cancel.

Definition at line 146 of file CslaActionExtender.cs.

◆ WarnOnCancelMessage

string Csla.Windows.CslaActionExtender.WarnOnCancelMessage
getset

Gets or sets the message shown to the user in a warn on cancel.

Definition at line 161 of file CslaActionExtender.cs.

Event Documentation

◆ BusinessObjectInvalid

EventHandler<CslaActionEventArgs> Csla.Windows.CslaActionExtender.BusinessObjectInvalid

Event indicating the business object is in an invalid state.

Definition at line 475 of file CslaActionExtender.cs.

◆ Clicked

EventHandler<CslaActionEventArgs> Csla.Windows.CslaActionExtender.Clicked

Event indicating the user clicked on the Control.

Definition at line 454 of file CslaActionExtender.cs.

◆ Clicking

EventHandler<CslaActionCancelEventArgs> Csla.Windows.CslaActionExtender.Clicking

Event indicating the user is clicking on the Control.

Definition at line 447 of file CslaActionExtender.cs.

◆ ErrorEncountered

EventHandler<ErrorEncounteredEventArgs> Csla.Windows.CslaActionExtender.ErrorEncountered

Event indicating an error was encountered.

Definition at line 461 of file CslaActionExtender.cs.

◆ HasBrokenRules

EventHandler<HasBrokenRulesEventArgs> Csla.Windows.CslaActionExtender.HasBrokenRules

Event indicating the business object has broken rules.

Definition at line 482 of file CslaActionExtender.cs.

◆ ObjectSaved

EventHandler<CslaActionEventArgs> Csla.Windows.CslaActionExtender.ObjectSaved

Event indicating that the object has been saved.

Definition at line 496 of file CslaActionExtender.cs.

◆ ObjectSaving

EventHandler<CslaActionCancelEventArgs> Csla.Windows.CslaActionExtender.ObjectSaving

Event indicating that the object is saving.

Definition at line 489 of file CslaActionExtender.cs.

◆ SetForNew

EventHandler<CslaActionEventArgs> Csla.Windows.CslaActionExtender.SetForNew

Event indicating the object is set for new.

Definition at line 468 of file CslaActionExtender.cs.