IMapper Methods |
The IMapper type exposes the following members.
Name | Description | |
---|---|---|
BindPage(Page, Boolean) |
Binds the mapper to the current .Net Page.
| |
BindPage(Page, Control, Boolean) |
Binds the mapper to the current .Net Page.
| |
BindPage(Page, Control, Boolean, MapperBindFlags) |
Binds the mapper to the current .Net Page.
| |
BulkDeleteBegin |
Initiate a bulk delete using the mapper and fire its corresponding extension event.
The object controlling the bulk operation typically makes this call before performing the
delete operations in a loop using the same mapper instance.
The bulkContext will be provided in the BulkContext parameter for all mapper events performed
during the bulk operation. If a null bulkContext object is provided, the method will instantiate
one for you. If you want a custom bulkContext, you should derive from the base EventBulkContext
object and provide an instance of your derived class.
If BulkDeleteBegin is called, you should call BulkDeleteEnd when the operation completes.
Note that the MapperBulkBeforeDelete event is fired from within this method.
| |
BulkDeleteEnd |
Complete a bulk delete operation that was initiated with a call to BulkDeleteBegin(EventBulkContext).
This method will delete the mapper's internal bulk context object set by that call.
This method should be called if, and only if, BulkDeleteBegin was called.
Note that the MapperBulkAfterDelete event is fired from within this method.
| |
BulkInsertBegin |
Initiate a bulk insert using the mapper and fire its corresponding extension event.
The object controlling the bulk operation typically makes this call before performing the
insert operations in a loop using the same mapper instance.
The bulkContext will be provided in the BulkContext parameter for all mapper events performed
during the bulk operation. If a null bulkContext object is provided, the method will instantiate
one for you. If you want a custom bulkContext, you should derive from the base EventBulkContext
object and provide an instance of your derived class.
If BulkInsertBegin is called, you should call BulkInsertEnd when the operation completes.
| |
BulkInsertEnd |
Complete a bulk insert operation that was initiated with a call to BulkInsertBegin(EventBulkContext).
This method will delete the mapper's internal bulk context object set by that call.
This method should be called if, and only if, BulkInsertBegin was called.
| |
BulkUpdateBegin |
Initiate a bulk update using the mapper and fire its corresponding extension event.
The object controlling the bulk operation typically makes this call before performing the
update operations in a loop using the same mapper instance.
The bulkContext will be provided in the BulkContext parameter for all mapper events performed
during the bulk operation. If a null bulkContext object is provided, the method will instantiate
one for you. If you want a custom bulkContext, you should derive from the base EventBulkContext
object and provide an instance of your derived class.
If BulkUpdateBegin is called, you should call BulkUpdateEnd when the operation completes.
| |
BulkUpdateEnd |
Complete a bulk update operation that was initiated with a call to BulkUpdateBegin(EventBulkContext).
This method will delete the mapper's internal bulk context object set by that call.
This method should be called if, and only if, BulkUpdateBegin was called.
| |
Clone(IMapper, MapperCloneFlags) |
Create a clone of the mapper. Unless otherwise specified by modifier flags,
the clone will be requeried using the same filters and sort as the original mapper.
| |
Clone(IMapper, MapperCloneFlags, Flavors) |
Create a clone of the mapper. Unless otherwise specified by modifier flags,
the clone will be requeried using the same filters and sort as the original mapper.
| |
Close |
Closes all internal resources
| |
Delete |
Delete the current record.
Note that, following the delete and all associated mapper events, the mapper will perform a MoveNext to position
to the next record in the filter. Because of this, when deleting multiple records you should not perform a MoveNext
except on those rows you do not intend to delete.
See also DeleteAll to delete all records in the filter.
| |
DeleteAll |
Delete all records in the current filter.
DeleteAll is a bulk operation and as such will fire the MapperBulkBeforeDelete and
MapperBulkAfterDelete events.
Typically at the start of DeleteAll processing an EventBulkContext is established, however, you may
establish a custom bulk context by calling BulkDeleteBegin(EventBulkContext) immediately prior to calling DeleteAll.
| |
Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable.) | |
DoCommand |
Execute the specified command.
Typically commandName is the ID of one of the MapperCommand
items added to the mapper's Commands collection.
To invoke a command by its Command, pass a 1 in the flags parameter.
| |
Exec(MapperExecCmds, Enum, Object) |
The Exec method provide extended functionality for mappers.
See MapperExecCmds for the enumerated list of commands.
| |
Exec(MapperExecCmds, Int32, Object) |
The Exec method provide extended functionality for mappers.
See MapperExecCmds for the enumerated list of commands.
| |
FireEvent |
FireEvent is called by the owner to fire an event to the mapper's extensions.
| |
GetFieldList |
Gets a semi-colon separated list of fields to render for this mapper based on various PageElementInfo properties including
FieldList, FieldListMobile, and GroupList, or on a value set programmatically via SetFieldList(String, SetFieldListOpts).
Also handles the HiddenFields property when
HiddenFields is specified. Note that the possibililty of HiddenFields complicates construction
of a field list and typically requires calling this method first to get a possible list of explicitly shown fields (where no
such list means to show all fields normally visible in the mapper) then calling the method again to get a possible list of explicitly
hidden fields and combining the results (including handling the case where fields are explicitly hidden, but not explicitly
shown).
| |
HandleRequest |
Handle a specific HTTP request.
| |
HasPermission |
Determines if the mapper has the specified ObjectPermissions for the current user.
If the object has no assigned permisions, the return value is true.
| |
Init(String, IAppContext) |
This method initializes the mapper.
| |
Init(String, IAppContext, Page) |
This method initializes the mapper.
| |
Init(String, IAppContext, Page, PageInfo) |
This method initializes the mapper.
| |
IsAttrSet |
Determines if a particular attribute (or any of a set of attributes) is set.
Note that this is a shorthand for the expression (0 != (mapper.Attributes & attributes)) (C#)
or (0 <> (mapper.Attributes Or attributes)) (VB).
| |
IsConfiguredFor |
Determines if the mapper is currently configured for the specified MapperCapabilities.
| |
Load |
Loads the mapper's meta-data from the RepositoryIDatabase.
Use Load(MapperLoadFlags) to load the mapper with specific load options.
| |
Load(MapperLoadFlags) |
Loads the mapper's meta-data from the RepositoryIDatabase.
| |
Load(DataTable, MapperLoadFlags) |
Sets up the mapper's meta-data per the table's schema.
If so specified the mapper will use the table's data.
| |
MoveBOF |
Move to the Beginning Of File (BOF). That is, position the cursor just prior to the first record in the mapper.
Note that this will throw an InvalidMapperMovement error if the mapper is
positioned on or beyond the first record and is not BiDirectional.
Use MoveFirst to position directly to the first data row.
| |
MoveFirst |
Move to the first record in the mapper.
Note that this will throw an InvalidMapperMovement error if the mapper is
positioned beyond the first record and is not BiDirectional.
Use MoveBOF to position just prior to the first data row.
You should not call MoveFirst prior to calling MoveNext to loop through records in a mapper as this will result in the first record being skipped (unless of course you want to skip the first record). Immediately following a Requery(RequeryHints) the mapper will already be positioned BOF and you can simply loop by calling MoveNext. If you are using a BiDirectional mapper and need to perform subsequent MoveNext loops, call MoveBOF to position just prior to the first data row before starting each subsequent MoveNext. | |
MoveLast |
Move to the last record in the mapper.
| |
MoveNew |
Move to a new record.
| |
MoveNew(Boolean) |
Move to a new record.
| |
MoveNext |
Move to the next record in the mapper.
You should not call MoveFirst prior to calling MoveNext to loop through records in a mapper as this will result in the first record being skipped (unless of course you want to skip the first record). Immediately following a Requery(RequeryHints) the mapper will already be positioned BOF and you can simply loop by calling MoveNext. If you are using a BiDirectional mapper and need to perform subsequent MoveNext loops, call MoveBOF to position just prior to the first data row before starting each subsequent MoveNext. | |
MovePrev |
Move to the previous record in the mapper.
Note that this will throw an InvalidMapperMovement error if the mapper is not BiDirectional.
| |
MoveRelative(Int32, Boolean) |
Move to a record relative to the current record.
Note that this will throw an InvalidMapperMovement error if movement is negative and the mapper is not BiDirectional.
| |
MoveRelative(Int32, Boolean, MoveReason) |
Move to a record relative to the current record.
Note that this will throw an InvalidMapperMovement error if movement is negative and the mapper is not BiDirectional.
| |
MoveTo(Int32) |
Move to the specified row number (1-based).
Note that RowCurrent events are NOT fired and data is NOT
moved through the mapper's Fields during the move. In general you should use
this method to position the mapper to the record immeditately PRIOR to the first record of
interest and then use MoveNext to iterate through one or more records of interest.
Remarks
Note that this will throw an InvalidMapperMovement exception if the mapper is
positioned beyond the specified record and is not BiDirectional.
Examples
For example, to implement a page size of 10 records and read data for the 2nd page, you would
first call mapper.MoveTo(10); to position to the 10th row (the last row of page 1) then
iteratively call mapper.MoveNext(); until you have read 10 records (11 through 20) or
until mapper.MoveNext();MoveNext() returns false indicating that there are no more records.
| |
MoveTo(String) |
Move to the row corresponding to the specified RowKey.
| |
Permissions |
Gets the ObjectPermissions for the mapper.
| |
Requery |
Opens the operational data reader, or fills the internal DataTable, for the mapper.
| |
ResolveSortSpec |
Resolve a !Sort() expression into its constituent parts.
| |
RowDigest |
Generate a digest of the field values in the mapper for the current row.
| |
RowKeyFilter |
RowKeyFilter is used to build a filter unique for a RowKey obtained from the
RowKey property.
| |
Save |
Save the current changes. If no fields are Dirty, no save is performed.
You can use the Save(MapperSaveOptions) to override certain standard Save behaviour, the standard behaviour is typically recommended.
See Save(MapperSaveOptions) for some additional information about mapper saves.
| |
Save(MapperSaveOptions) |
Save the current changes allowing for specific MapperSaveOptions options. If no fields are Dirty, no save is performed.
Saves are typically performed using the Save method with default mapper Save behaviour.
| |
SelectedKeys |
SelectedKeys is used to obtain a list of the RowKeys for the rows
currently selected in the mapper. In a detail this is the current row.
In a datasheet this is the set of selected rows.
| |
SelectedKeys(EAPEventArgs) |
SelectedKeys is used to obtain a list of the RowKeys for the rows
currently selected in the mapper. In a detail this is the current row.
In a datasheet this is the set of selected rows.
If an EAPEventArgs object is provided from a particular mapper event that
can specify one or more RowKeys, e.g. EAPCommandEventArgs.RowKey
and one or more RowKeys are specified in that object, then the RowKey(s) from the event will be returned.
| |
Send(String, String) |
Simple way to send a message using this mapper and a Template. The mapper sets up the message, the relationships,
and creates the template data appropriate from the current row before sending.
| |
Send(String, String, NameValueCollection) |
Simple way to send a message using this mapper and a Template. The mapper sets up the message, the relationships,
and creates the template data appropriate from the current row before sending.
| |
Send(String, String, NameValueCollection, MessageRelationships) |
Simple way to send a message using this mapper and a Template. The mapper sets up the message, the relationships,
and creates the template data appropriate from the current row before sending.
| |
SetFieldList |
Sets the semi-colon separated list of fields to render for this mapper. Setting this value programmatically overrides any
meta-data specified list. See GetFieldList(GetFieldListOpts).
| |
Signature |
Generates a signature string for the mapper as currently filtered and sorted.
|
Name | Description | |
---|---|---|
GetPageElement |
Gets the PageElementInfo for the IMapper, if available.
Note that this is simply a wrapper around the GetPageElement command.
(Defined by MapperUtils.) | |
IsPageElement |
Determines if the IMapper is being rendered for the specified MOP and
Name of the PageElementInfo.
This method is safe to use even if the mapper is null, has no MOP, and/or has no
PageElementInfo associated.
(Defined by MapperUtils.) | |
ResolveExpression |
Resolve the specified field expression using ExpressionResolve mapper command.
See ExpressionParser for more information about field expressions.
Use ExpressionEscape to escape apparent field references in a string.
Note that although, for historical reasons, the ExpressionResolve
command will throw an error if the expression contains an unresolvable field or other syntax error,
this method DOES NOT throw by default because it adds the DoNotThrow flag
UNLESS the ThrowOnAnomaly flag is set.
(Defined by MapperUtils.) |