Opening the viewer of the PmForm object (/#glob/form)
The viewer of the
PmForm object is opened by the
Pm.CreateView method. In the
sViewPath parameter the global path
"/#glob/form" is entered.
Syntax:
JavaScriptVBScriptSelect and copy to clipboard
var oCreator = Pm.CreateView(oFrom, "/#glob/form", sViewPars, sFramePars);
oCreator.Open();
Dim oCreator
Set oCreator = Pm.CreateView(oFrom, "/#glob/form", sViewPars, sFramePars)
oCreator.Open
oFrom | (Object) The object, which will mediate the opening of the viewer.
The object specifies the origin of the path, the relative position of the window, the parent, etc.
- The null value means the usage of:
- If the the PmgFrame object is entered here (in the script of the Pmg object), then the viewer opens in this frame.
- If the the PmaPanel object is entered here (in the script of the Pma object), then the viewer opens in this selected object.
See the PmViewCreator.From property. |
sViewPath | (String) Path (relative or absolute) to the object or component whose viewer will be opened.
See the PmViewCreator.ViewPath property. |
sViewPars | (String) Viewer parameters (they differ for various viewer types).
See the PmViewCreator.View property.
Entries are in the KeyVal format. For now, an empty string is entered ("").
Properties and events in the PmViewCreator.View object:
onLoad | [optional] (Function) The event function for managing the event of viewer creation.
For JavaScript the function is entered.
For VBScript the PmAction object is entered.
The function has a single parameter ev containing information regarding the corresponding event.
ev.Form - ( PmForm) The PmForm object that is being viewed. |
onOpen | [optional] (Function) The event function for managing the event of viewer opening.
For JavaScript the function is entered.
For VBScript the PmAction object is entered.
The function has a single parameter ev containing information regarding the corresponding event.
ev.Form - ( PmForm) The PmForm object that is being viewed. |
onChange | [optional] (Function) The event function for managing the event of viewer modification.
For JavaScript the function is entered.
For VBScript the PmAction object is entered.
The function has a single parameter ev containing information regarding the corresponding event.
ev.Form - ( PmForm) The PmForm object that is being viewed.
ev.ItemId - (String) Pmf object identifier.
ev.ChangeType - ( String) Modification type identifier.
- "value": Some object value has been changed.
- "push": Some item has been pressed. It is functional only for PmfButton item type.
ev.NewValue - (Variant) Item value after change.
ev.OldValue - (Variant) Item value before change. |
onClose | [optional] (Function) The event function for managing the event of viewer closing.
For JavaScript the function is entered.
For VBScript the PmAction object is entered.
The function has a single parameter ev containing information regarding the corresponding event.
ev.Form - ( PmForm) The PmForm object that is being viewed.
ev.CloseReason - ( String) Identifier of window closing type.
Value of the identifier depends on which button has been used to close the viewer. See PmForm.SysButtons and PmForm.Close. |
---|
|
sFramePars | (String) Parameters for the frame where the viewer will be displayed.
See the PmViewCreator.Frame property.
Entries are in the KeyVal format, for example "target:_blank;". |
---|
The viewer parameters are in the form of the
PmMap object that is filled from value of the
sViewPars parameter (of the
KeyVal type) in the
Pm.CreateView method.
By filling from the
KeyVal value all the parameters are initially stored as string. The content of the
PmMap object can be then modified as needed - items can be modified, added and deleted.
The
PmMap object can also contain other embedded
PmMap objects (
Submap). The
PmMap.mapSetSubmapAt method can be used in order to create a new
PmMap or make one accessible.