IMapper Properties |
The IMapper type exposes the following members.
Name | Description | |
---|---|---|
Application |
The platform IAppContext context object. The Application is set in the Init(String, IAppContext) method.
| |
Attributes | MapperAttrs flags specifying various behaviour of the mapper.
This is normally loaded from meta-data during Load.
| |
Caption |
The localized caption for the mapper. Call Exec(MapperExecCmds, Int32, Object) with the Caption command to get a caption
that includes additional information including current paging and filtering for a live
mapper.
| |
Commands |
Mapper commands are used to add custom MapperCommand commands to a mapper's page.
Typically commands are added to the toolbar or the More (Actions) button on the toolbar. When invoked, a
MapperCommand(IMapper, EAPCommandEventArgs) event is fired on the mapper.
You can add commands to the mapper programmatically, typically during the MapperBeforeLayout(IMapper, EAPEventArgs) event.
Commands are also added automatically from meta-data NavTarget elements with TargetType of Command
on Navigator elements configured in meta-data for use on the page, page element, or mapper.
| |
CssClass |
The Cascading Style Sheet class to use for the mapper.
| |
CurrentPage |
The 1-based current page index for the mapper. In mappers other than datasheets, the RecordsPerPage
is generally one so the CurrentPage is the same as the CurrentRecord.
| |
CurrentRecord |
The 1-based index of the current record in the mapper.
| |
Database |
The data IDatabase used by the mapper. The data database holds the mapper's operational data.
| |
DeleteLocked |
Specifies whether or not the row should be allowed to be deleted for the current row only. This property is
cleared by the mapper immediately prior to the RowCurrent event. An extension can then set the
property to true to prevent this row from being deleted.
The mapper also supports a DeleteLockExpression property allowing the delete lock condition to be specified in meta-data. The DeleteLockExpression is a javascript expression, typically including field references, that is evaluated with each row to initialize its DeleteLocked value. For row-level record locking, see RowLocked. | |
Dirty |
The dirty property can be read to determine if any of the mapper's fields values have been
changed since being populated from the database or original datatable. The property can be
cleared to clear the dirty flags on all the mapper's fields. If set true, the mapper's
internal dirty flag is set, but the mapper's fields are not set dirty.
| |
Extensions |
Gets the collection of IExtension mapper extension objects for the mapper. Extensions provide
both additional standard and custom functionality. Mapper extensions are the primary means by
which custom functionality is added to the application.
Generally extensions used across multiple mappers derive from the MapperExtensionKernel class whereas those that are intended for use on a single mapper derive from an application-specific generated class derived from the TypedMapperExtension template class. Extensions derived from TypedMapperExtension can only be used on the intended mapper, but provide a type-safe, easier to use implementation. These are the most common type of extension in most applications. The more primitive, but flexible MapperExtensionKernel-derived extension are typically used for non-mapper specific functionality such as in the ReadableAudit extension. Virtually all platform-provided extensions are of this type. | |
Fields | ||
Filters |
The collection of MapperFilter objects used to filter the mapper queries. Filters can be specified
in meta-data and manipulated programmatically. Standard datasheet filtering is handled by the
MapperDatasheet object.
| |
Flavor |
Flavor is used to include or exclude certain fields based on their IncludeFlavor and ExcludeFlavor
bits. Fields that are excluded are not hidden; they are never loaded into the mapper's Fields collection.
A flavor of zero indicates that all fields with any IncludeFlavor bits set will not be loaded.
If a field is marked as both included and excluded for a particular Flavor then the exclude bit is favored.
| |
HasMorePages |
Returns true if there are additional pages beyond the current page. This should be used
(possibly in conjunction with HasRecords) instead of calling RecordCount in order to manage
UI paging.
| |
HasRecords |
HasRecords returns true if there are one or more records in the current mapper filter, else false.
Note that using HasRecords never requires an additional database query and should therefore be
used in place of RecordCount when possible.
| |
IgnorePostback |
Indicates whether postback data is being used or ignored.
| |
IsDesignMode |
Returns true if the control is in Design mode.
| |
IsNew |
Indicates whether or not the mapper is positioned on a new row.
| |
Key |
Gets the key (ID) of the mapper. This is the meta-data's unique identifier for the
mapper definition.
| |
Mode |
Mapper mode specifies how the mapper is being used and controls the overall look and behaviour of the mapper.
| |
ModuleKey |
The key to the module using this mapper -- typically obtained from Module.
Note that this may be misleading on Console and Wizard pages. To obtain the module for the mapper itself
use MapperModuleKey.
| |
MOP |
The MOP using this mapper. A MOP is a Module-Page of the form <module>!<page>.
| |
OrderBy |
A SQL ORDER BY clause used as the default sort for the mapper. User sorting in a datasheet
supercedes this clause.
| |
Page |
The .Net Page holding this mapper.
| |
PageInfo |
The PageInfo object related to this mapper. This is a reference to the session's PageInfo object.
Note that since this is a copy of the session's PageInfo object, you should not modify this instance of the PageInfo object. If you want to modify the PageInfo object for this mapper instance only then you should clone the PageInfo object using Clone(IAppContext) and set it back on the mapper as in the example below: Examples PageInfo info = mapper.PageInfo.Clone(cxt); info.TextItems.Add("Caption", "My Caption"); mapper.PageInfo = info; | |
PageNm |
The name of the Page using this mapper -- typically obtained from Name.
| |
ParentContext |
Gets RelatedMapperContext information about this mapper's parent mapper including, if requested, a filtered instance
of the parent. Typically the parent mapper is determined from the request's QueryString.
| |
Properties |
The mapper's Properties collection. Properties can be specified in meta-data using the mapper's
property sheet, or programmatically. Properties are used to specify many aspects of mapper
appearance and behaviour.
| |
Purpose |
Purpose is used to identify the purpose to which the live mapper object is currently
being put. Note that Purpose can be set to custom values by an application depending
on how the mapper is being used, but constants for a standard set of purposes can be
found in MapperPurposes.
| |
RecordCount |
Returns the number of records in the current filter. Note that this number is not limited
by paging. For example, if on a datasheet displaying the first 10 records out of 53 records
matching the filter, RecordCount will return 53.
Note that calling RecordCount may require an additional database query and should be avoided
when possible. If the intent is to determine if there are zero vs. one or more records
use HasRecords instead which never requires an additional query.
Note that you can use RecordCountSafe to obtain the record count
without the possibility of an error being thrown.
| |
RecordsPerPage |
The number of records per page in the mapper. In mappers other than datasheets this is generally 1.
| |
Repository |
The repository IDatabase used by the mapper. The repository holds the mapper's meta-data.
| |
RowKey |
A key uniquely identifying the current row. In the case of multiple keys, this will
be a combined key. This key can be passed to RowKeyFilter(String) to generate a
filter for the record from which the key was obtained.
| |
RowLocked |
Specifies whether or not the row should be locked for the current row only. This property is
cleared by the mapper immediately prior to the RowCurrent event. An extension can then set the
property to true to lock this row only. To perform row locking on some, but not all, the fields
in a row, set the RowLocked property for the appropriate fields instead of the mapper-level
row lock, or set the mapper-level RowLocked and set the field's IgnoreRowLock
property in the fields' meta-data.
Note that a field will be locked for all the static reasons (e.g. if the Locked attribute is set), or if the field is row-locked, or if the mapper is row-locked and the field's IgnoreRowLock property is not set. Note that the IgnoreRowLock property applies only to mapper-level row locking and has no impact on field-level row locking. The mapper also supports a RowLockExpression property allowing the row lock condition to be specified in meta-data. The RowLockExpression is a javascript expression, typically including field references, that is evaluated with each row to initialize its RowLocked value. For row-level delete locking, see DeleteLocked. | |
TextItems |
The mapper's localized TextItem collection. For a particular instance of a mapper only the locale
(language) for the current user is loaded.
| |
View |
The name of the mapper's underlying view or table.
This is normally loaded from meta-data during IMapper.Load().
Note that the View is used in the mapper's operational query and count
SELECT statements, but is not used for INSERT, UPDATE, or DELETE operations.
All INSERT, UPDATE, and DELETE operations are performed against the fields'
underlying tables based on each field's Table property.
Although the View is required, you can configure the mapper to used a Stored Procedure instead of the view by specifying the QuerySQL property. If the QuerySQL property is specified, the View will be ignored (but the Studio will still require it. Note that View can be overridden on a page-by-page basis using a page's PageView property. | |
ViewState |
The ViewState for the current page. Used to maintain filter and sort state across postbacks.
|