C# Class EnterpriseWebLibrary.EnterpriseWebFramework.EwfPage

A System.Web.UI.Page that contains special Red Stapler Enterprise Web Framework logic. Requires that view state and session state be enabled.
Inheritance: System.Web.UI.Page
Datei anzeigen Open project: enduracode/enterprise-web-library

Public Methods

Method Description
AddStatusMessage ( StatusMessageType type, string messageHtml ) : void

Add a status message of the given type to the status message collection. Message is not HTML-encoded. It is possible to have tags as part of the text.

GetDescendants ( Control control, bool>.Func predicate = null ) : IEnumerable

Standard Library use only.

SetContentContainer ( Control control ) : void

Notifies this page that only the form controls within the specified control should be checked for modifications and used to set default focus.

SetFocus ( Control control ) : void

Sets the focus to the specified control. Call this only during event handlers, and use the controlWithInitialFocus property instead if you wish to set the focus to the same control on all requests. Do not call this during LoadData; it uses the UniqueID of the specified control, which may not be defined in LoadData if the control hasn't been added to the page.

Protected Methods

Method Description
EwfPage ( ) : System

Creates a new page. Do not call this yourself.

LoadPageStateFromPersistenceMedium ( ) : object

Loads hidden field state. We use this instead of LoadViewState because the latter doesn't get called during post backs on which the page structure changes.

OnInitComplete ( EventArgs e ) : void

Performs EWF activities in addition to the normal InitComplete activities.

OnPreInit ( EventArgs e ) : void

Executes EWF logic in addition to the standard ASP.NET PreInit logic.

OnPreRender ( EventArgs eventArgs ) : void
SavePageStateToPersistenceMedium ( object state ) : void

Saves hidden field state.

SaveViewState ( ) : object

Saves view state.

clearInfo ( ) : void

EWF use only.

createInfoFromNewParameterValues ( ) : PageInfo

Creates a page info object using the new parameter value fields in this page.

createInfoFromQueryString ( ) : void

Creates the info object for this page based on the query parameters of the request.

getPageViewDataModificationMethod ( ) : Action

Returns a method that executes data modifications that happen simply because of a request and require no other action by the user. Returns null if there are no modifications, which can improve page performance since the data-access cache does not need to be reset. WARNING: Don't ever use this to correct for missing loadData preconditions. For example, do not create a page that requires a user preferences row to exist and then use a page-view data modification to create the row if it is missing. Page-view data modifications will not execute before the first loadData call on post-back requests, and we provide no mechanism to do this because it would allow developers to accidentally cause false user concurrency errors by modifying data that affects the rendering of the page.

initEntitySetup ( ) : void

Loads the entity display setup for the page, if one exists.

loadData ( ) : void

Loads and displays data on the page. This is a replacement for the Init event that provides access to EWF page state.

Private Methods

Method Description
AddControlTreeValidation ( System.Action validation ) : void
AddDisplayLink ( DisplayLink displayLink ) : void

Adds a display mapping to this page.

AddEtherealControl ( Control parent, EtherealControl etherealControl ) : void
AddFormValue ( FormValue formValue ) : void
AddModificationErrorDisplayAndGetErrors ( Control control, string keySuffix, EnterpriseWebLibrary.EnterpriseWebFramework.EwfValidation validation ) : IEnumerable

If you are using the results of this method to create controls, put them in a naming container so that when the controls differ before and after a transfer, other parts of the page such as form control IDs do not get affected.

AddPostBack ( EnterpriseWebLibrary.EnterpriseWebFramework.PostBack postBack ) : void
AddUpdateRegionLinker ( EnterpriseWebLibrary.EnterpriseWebFramework.UpdateRegionLinker linker ) : void
GetPostBack ( string id ) : EnterpriseWebLibrary.EnterpriseWebFramework.PostBack
Init ( Func cssInfoCreator ) : void
addGoogleAnalyticsLogicIfNecessary ( ) : void
addJavaScriptIncludes ( ) : void
addJavaScriptStartUpLogic ( ) : void
addMetadataAndFaviconLinks ( ) : void
addModernizrLogic ( ) : void
addTypekitLogicIfNecessary ( ) : void
executeWithDataModificationExceptionHandling ( Action method ) : void
generateFormValueHash ( ) : string
getConnectionSecurityIncorrect ( ) : bool
getDescendants ( Control control, bool>.Func predicate ) : Func>>.IEnumerable
getLastPageRequestTimeUpdateMethod ( User user ) : Action

It's important to call this from EwfPage instead of EwfApp because requests for some pages, with their associated images, CSS files, etc., can easily cause 20-30 server requests, and we only want to update the time stamp once for all of these.

getPossibleDeveloperMistakeException ( string messageSentence, Exception innerException = null ) : ApplicationException
getStaticRegionContents ( IEnumerable updateRegionControls ) : IEnumerable>.Tuple
getStyleSheetLink ( string url ) : Control
handleValidationErrors ( EwfValidation validation, IEnumerable errorMessages ) : void
initEntitySetupAndCreateInfoObjects ( ) : void
loadDataForControlAndChildren ( Control control ) : void
navigate ( ResourceInfo destination, FullResponse secondaryResponse ) : void
onLoadData ( ) : void

This needs to be called after the page state dictionary has been created or restored.

resetPage ( ) : void
setFocus ( ) : void
validateFormSubmission ( string formValueHash ) : void

Method Details

AddStatusMessage() public static method

Add a status message of the given type to the status message collection. Message is not HTML-encoded. It is possible to have tags as part of the text.
public static AddStatusMessage ( StatusMessageType type, string messageHtml ) : void
type StatusMessageType
messageHtml string
return void

EwfPage() protected method

Creates a new page. Do not call this yourself.
protected EwfPage ( ) : System
return System

GetDescendants() public method

Standard Library use only.
public GetDescendants ( Control control, bool>.Func predicate = null ) : IEnumerable
control System.Web.UI.Control
predicate bool>.Func
return IEnumerable

LoadPageStateFromPersistenceMedium() protected final method

Loads hidden field state. We use this instead of LoadViewState because the latter doesn't get called during post backs on which the page structure changes.
protected final LoadPageStateFromPersistenceMedium ( ) : object
return object

OnInitComplete() protected final method

Performs EWF activities in addition to the normal InitComplete activities.
protected final OnInitComplete ( EventArgs e ) : void
e System.EventArgs
return void

OnPreInit() protected final method

Executes EWF logic in addition to the standard ASP.NET PreInit logic.
protected final OnPreInit ( EventArgs e ) : void
e System.EventArgs
return void

OnPreRender() protected final method

protected final OnPreRender ( EventArgs eventArgs ) : void
eventArgs System.EventArgs
return void

SavePageStateToPersistenceMedium() protected final method

Saves hidden field state.
protected final SavePageStateToPersistenceMedium ( object state ) : void
state object
return void

SaveViewState() protected final method

Saves view state.
protected final SaveViewState ( ) : object
return object

SetContentContainer() public method

Notifies this page that only the form controls within the specified control should be checked for modifications and used to set default focus.
public SetContentContainer ( Control control ) : void
control System.Web.UI.Control
return void

SetFocus() public method

Sets the focus to the specified control. Call this only during event handlers, and use the controlWithInitialFocus property instead if you wish to set the focus to the same control on all requests. Do not call this during LoadData; it uses the UniqueID of the specified control, which may not be defined in LoadData if the control hasn't been added to the page.
public SetFocus ( Control control ) : void
control System.Web.UI.Control
return void

clearInfo() protected abstract method

EWF use only.
protected abstract clearInfo ( ) : void
return void

createInfoFromNewParameterValues() protected abstract method

Creates a page info object using the new parameter value fields in this page.
protected abstract createInfoFromNewParameterValues ( ) : PageInfo
return PageInfo

createInfoFromQueryString() protected abstract method

Creates the info object for this page based on the query parameters of the request.
protected abstract createInfoFromQueryString ( ) : void
return void

getPageViewDataModificationMethod() protected method

Returns a method that executes data modifications that happen simply because of a request and require no other action by the user. Returns null if there are no modifications, which can improve page performance since the data-access cache does not need to be reset. WARNING: Don't ever use this to correct for missing loadData preconditions. For example, do not create a page that requires a user preferences row to exist and then use a page-view data modification to create the row if it is missing. Page-view data modifications will not execute before the first loadData call on post-back requests, and we provide no mechanism to do this because it would allow developers to accidentally cause false user concurrency errors by modifying data that affects the rendering of the page.
protected getPageViewDataModificationMethod ( ) : Action
return Action

initEntitySetup() protected abstract method

Loads the entity display setup for the page, if one exists.
protected abstract initEntitySetup ( ) : void
return void

loadData() protected method

Loads and displays data on the page. This is a replacement for the Init event that provides access to EWF page state.
protected loadData ( ) : void
return void