Click or drag to resize

PageInfo Class

A PageInfo object holds the metadata representation at runtime of the potential pages that could be used in an application. A Page is represented by it's MOP (module ID). The collection is loaded once (at startup) and used throughout the life of the application.

Page Overloading can achieved by specifying Device and/or Priority. When a user logs in with roles that allow access to multiple pages with the same MOP then Device and Priority are used to determine which of these pages is to be used. If a particular Device matches the current device then that page is favored. If multiple pages with the same (or no) Device are available then Priority is used to disambiguate with the highest Priority number favored.

Inheritance Hierarchy
SystemObject
  NetQuarryPageInfo

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
[SerializableAttribute]
public class PageInfo : IEAPBase, ICloneable, 
	ICacheable

The PageInfo type exposes the following members.

Constructors
  NameDescription
Public methodPageInfo
Standard constructor.
Top
Properties
  NameDescription
Public propertyAttributes
The PageInfoAttrs associated with this item.
Public propertyBasePageID
The BasePageID of the page, if a base page is used, else null. Base pages provide a basic inheritance capability allowing other pages to inherit a base page's page elements and properties. Base pages themselves cannot be instantiated. Check IsBasePage to determine if this page is a base page.
Public propertyCloneStatus
The clone status of this pageinfo object.
Public propertyComponentID
The component to use to render this page. This is the ID to the Template used on the page.
Public propertyDevice
Gets/Sets the Device value. Note that this is the SAME value as ParamText and is preferred over ParamText.

Device specification on pages allows the application to tailor pages to the real-estate limitation of different devices such as mobile and tablet devices.

Page Overloading can achieved by specifying Device and/or Priority. When a user logs in with roles that allow access to multiple pages with the same MOP then Device and Priority are used to determine which of these pages is to be used. If a particular Device matches the current device then that page is favored. If multiple pages with the same (or no) Device are available then Priority is used to disambiguate with the highest Priority number favored.

Public propertyElements
The PageElementInfos collection of PageElementInfo objects for this page. This object is not loaded until it is requested via this method.

Every page must have at least one PageElementInfo associated with it. Note, however, that one or more PageElementInfo objects may be inherited from the page's base page (BasePageID).

Public propertyID
Returns the page_id
Public propertyIsBasePage
True if this page is a base page. Base pages provide a basic inheritance capability allowing other pages to inherit a base page's page elements and properties. Base pages themselves cannot be instantiated. If this page uses a base page then BasePageID will be set.
Public propertyMapperKey
The unique key to the Mapper to use for this page.
Public propertyModule
The module for the page. This forms the 1st half of the MOP, for example "company" in "company!detail" or "company!list".
Public propertyMoniker
The Moniker is intended to be unique at least within the module. It is used to differentiate between two pages with the same MOP. For example, there could be a general contact!detail page for most users and another contact!detail page for managers only. The Moniker provides a way to differentiate between the two.
Public propertyMOP
The Module-Page of the form [module]![page], for example "company!detail" or "company!list". Use Module and Name to get/set the individual parts of the MOP.
Public propertyName
The name of the page. This forms the 2nd half of the MOP, for example "detail" and "list" in "company!detail" and "company!list" respectively.
Public propertyPageID
The unique ID for this page. The PageID is provided for internal use and is not normally used by application implementations.
Public propertyPageProperties
Gets the page-instance-specific Properties for this GLOBAL PageInfo object. An instance of a page object, typically implementing IPageTemplate, references a GLOBAL copy of the corresponding PageInfo object for the page and any changes to its properties will affect other users and other instances of the page. The properties collection returned by this method, however, is unique to this page instance and is not shared across page instances for this or for other users. Upon initial access the returned collection is instantiated and initialized from the page's GLOBAL PageInfo object (generally reflecting the meta-data). Changes to the collection are NOT passed through to the GLOBAL object.
Public propertyParamText Obsolete.
Gets/Sets the Device value. ParamText is provided for backward compatability. (Deprecated)
Public propertyPriority
The Priority is used to determine which page to use when a particular user has access to multiple pages with the same MOP. In such a case the MOP with the highest priority is used. This is called Page Overloading.

For example, there could be a general contact!detail page for most users and another contact!detail page for managers only. If so, priority would typically be set higher on the manager page so that a manager (who is presumably also a user) gets the manager page when navigating to contact!detail.

Page Overloading can achieved by specifying Device and/or Priority. When a user logs in with roles that allow access to multiple pages with the same MOP then Device and Priority are used to determine which of these pages is to be used. If a particular Device matches the current device then that page is favored. If multiple pages with the same (or no) Device are available then Priority is used to disambiguate with the highest Priority number favored. A further mechanism for page overloading is available by marking a page as TenantSpecific. Tenant-specific pages are favored over their non-tenant-specific counterparts.

Public propertyProperties
The page's Properties collection.
Public propertyTemplate
The platform Template to use for this page. The template's ID is ComponentID. The template should implement the IPageTemplate interface (typically by deriving from NetQuarry.TemplateKernel, access to which requires referencing the EAP.WebHost assembly). Custom templates can be created, but generally the following platform-provided templates are used:
  • TabbedSubformTemplate - Provides a horizontally split screen with a bottom pane presenting multiple tabs related to the data in the top pane.
  • ExpandedSubformTemplate - Provides a horizontally split screen with a bottom pane vertically presenting multiple expandable items related to the data in the top pane.
  • WizTemplate - Implements IWizardTemplate and provides a multi-page wizard typically used for creating one or more new items.
  • ConsoleTemplate - Implements IConsoleTemplate and provides a user console with multiple data panes manipulable by the user.
Public propertyTextItems
The page's localized text.
Public propertyVersion
Get the scaled version of the IAppContext object.
Top
Methods
  NameDescription
Public methodClone
The Clone method creates a copy of this PageInfo object.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExec
Execute a command on the object.
Public methodStatic memberExtractModule
Extract the Module from a MOP (module!page).
Public methodStatic memberExtractPage
Extract the Page Name from a MOP (module!page).
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHasPermission
Determines whether or not the page has the specified ObjectPermissions.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPermissions
Gets the ObjectPermissions allowed for this page.
Public methodReload
Reload the page meta-data.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodEqualValue
Determines if the object value is equal to another object. If the two objects are null, then this returns true. There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways). If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.)
Top
Remarks
Warning: For performance reasons the PageInfo objects in the PageInfos collection are global objects that persist across requests for the current user, and even for other users having similar roles. For this reason you should not modify these global objects programmatically unless the intent it to have a truly global change. As each page is initialized a reference to these global objects is set as the page's PageInfo value and so each page's PageInfo object is global as well and should not be modified. Clonging the page's PageInfo object and setting it back on the page sets the page up to use a non-global instance of the PageInfo object that exists only for the current request and may be freely modified without affecting other requests.

If you need to set page-instance-specific properties you can use the GetClonedPageInfo method, available on most pages, to relatively efficiently obtain a cloned PageInfo object for the page (it will return the existing PageInfo object if already a clone else if not already a clone, it will clone the PageInfo, set it on the page, and return it).

See Also