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
Afficher le fichier Open project: enduracode/enterprise-web-library

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

Méthode 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 méthode

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
Résultat void

EwfPage() protected méthode

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

GetDescendants() public méthode

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

LoadPageStateFromPersistenceMedium() protected final méthode

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
Résultat object

OnInitComplete() protected final méthode

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

OnPreInit() protected final méthode

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

OnPreRender() protected final méthode

protected final OnPreRender ( EventArgs eventArgs ) : void
eventArgs System.EventArgs
Résultat void

SavePageStateToPersistenceMedium() protected final méthode

Saves hidden field state.
protected final SavePageStateToPersistenceMedium ( object state ) : void
state object
Résultat void

SaveViewState() protected final méthode

Saves view state.
protected final SaveViewState ( ) : object
Résultat object

SetContentContainer() public méthode

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
Résultat void

SetFocus() public méthode

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
Résultat void

clearInfo() protected abstract méthode

EWF use only.
protected abstract clearInfo ( ) : void
Résultat void

createInfoFromNewParameterValues() protected abstract méthode

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

createInfoFromQueryString() protected abstract méthode

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

getPageViewDataModificationMethod() protected méthode

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
Résultat Action

initEntitySetup() protected abstract méthode

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

loadData() protected méthode

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
Résultat void