Methods
# getTrackEntity() → {string}
Returns the current entity.
current entity
string
Example
context.getTrackEntity(); // "MyFirstProject.Pizza"
# getTrackId() → {string}
Returns the current GUID
.
the current GUID
string
Example
context.getTrackId(); // "12345"
# getTrackObject() → {mendix/lib/MxObject}
Returns the current object.
the current object
Example
var obj = context.getTrackObject();
obj.getGuid(); // "12345"
# hasTrackEntity() → {boolean}
Checks whether this context has a current entity.
true
if there is a current entity, false
otherwise
boolean
Example
context.hasTrackEntity(); // true
# hasTrackId() → {boolean}
Checks whether this context has a current GUID
.
true
if there is a current GUID
, false
otherwise.
boolean
Example
context.hasTrackId(); // true
# hasTrackObject() → {mendix/lib/MxObject}
Checks whether this context has a current object.
true
if there is a current object, false
otherwise
Example
context.hasTrackObject(); // true
# setContext(entity, guid)
Sets current entity and GUID
and maps GUID
to entity in scope.
It clears the current object.
Parameters:
Name | Type | Description |
---|---|---|
entity |
string
|
entity to set |
guid |
GUID
|
|
Example
context.setContext("MyFirstModule.Entity", "12345");
# setTrackObject(obj)
Sets the current object and sets it in scope for its entity.
Parameters:
Name | Type | Description |
---|---|---|
obj |
mendix/lib/MxObject
|
new current object |
Example
context.setTrackObject(obj);