C# Класс 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.
Наследование: System.Web.UI.Page
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

AddStatusMessage() публичный статический Метод

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
Результат void

EwfPage() защищенный Метод

Creates a new page. Do not call this yourself.
protected EwfPage ( ) : System
Результат System

GetDescendants() публичный Метод

Standard Library use only.
public GetDescendants ( Control control, bool>.Func predicate = null ) : IEnumerable
control System.Web.UI.Control
predicate bool>.Func
Результат IEnumerable

LoadPageStateFromPersistenceMedium() защищенный закрытый Метод

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
Результат object

OnInitComplete() защищенный закрытый Метод

Performs EWF activities in addition to the normal InitComplete activities.
protected final OnInitComplete ( EventArgs e ) : void
e System.EventArgs
Результат void

OnPreInit() защищенный закрытый Метод

Executes EWF logic in addition to the standard ASP.NET PreInit logic.
protected final OnPreInit ( EventArgs e ) : void
e System.EventArgs
Результат void

OnPreRender() защищенный закрытый Метод

protected final OnPreRender ( EventArgs eventArgs ) : void
eventArgs System.EventArgs
Результат void

SavePageStateToPersistenceMedium() защищенный закрытый Метод

Saves hidden field state.
protected final SavePageStateToPersistenceMedium ( object state ) : void
state object
Результат void

SaveViewState() защищенный закрытый Метод

Saves view state.
protected final SaveViewState ( ) : object
Результат object

SetContentContainer() публичный Метод

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
Результат void

SetFocus() публичный Метод

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
Результат void

clearInfo() защищенный абстрактный Метод

EWF use only.
protected abstract clearInfo ( ) : void
Результат void

createInfoFromNewParameterValues() защищенный абстрактный Метод

Creates a page info object using the new parameter value fields in this page.
protected abstract createInfoFromNewParameterValues ( ) : PageInfo
Результат PageInfo

createInfoFromQueryString() защищенный абстрактный Метод

Creates the info object for this page based on the query parameters of the request.
protected abstract createInfoFromQueryString ( ) : void
Результат void

getPageViewDataModificationMethod() защищенный Метод

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
Результат Action

initEntitySetup() защищенный абстрактный Метод

Loads the entity display setup for the page, if one exists.
protected abstract initEntitySetup ( ) : void
Результат void

loadData() защищенный Метод

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
Результат void