Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Preconfigurations Date and time inputbox

The window contains date and time inputbox.
 
This preconfiguration can be activated when creating a new object (e.g. by "New object" in the local object menu or by pressing the Insert key after selecting the object) and is included in the group: " / Panels (PmPanel) / Date and time inputbox".

This preconfiguration can be used with the objects: PmFolder, PmRoot, PmPanel or PmWorkspace.

 
- Preconfiguration creates an object of type PmPanel.
- The preconfiguration is created including the panel (PmPanel object) functionality as a WEB panel.
 
The OpenView method with entry parameter oExtra can be used to open the panel. See How to work with modal windows.

In the onPanelStartEnd event the value of entry argument is read. Then the value is processed and divided into buttons representing days of the months and into corresponding PmiWCombo items (year, month, hour, minute, second).

In the onPanelStopEnd event after the OK button is pressed yhe values of these graphic items are processed and the resulting value is returned back to the object from which the OpenView method was called.
These configurators can be set before the preconfiguration is created:
The name of created objectName of the object created in the application object tree. This is a system name and must not contain empty string, diacritics, spaces and the first character must not be a number.

Default: "SetDateTime"

PermissionsOn this page permissions of the object are defined. See Description of the page Permissions.
Enable as WEB componentIt indicates if this object has to be registered as a WEB server component

After this preconfiguration is created, the configurator is se to: PmPanel > Web Server > Enable as WEB component.

PmWeb objectPath in the objects tree to the PmWeb, PmWebFolder or PmWebLang object where the registration is carried out.

After this preconfiguration is created, the configurator is se to: PmPanel > Web Server > PmWeb object.

Example:
The entry value t (current date and time) will be displayed in the graphic items of the window. The edited value will be returned into the val variable.
-------------------------
An example in VBScript syntax:
Opening the preconfigured window in the panel using the onButtonUp event of the PmiButton graphic item.
Dim oExtra, t
t = Now
Set oExtra = Pm.CreatePmMap()
oExtra.mapSetValueAt "onClose", Pm.CreatePmAction(1, pMe, "ClosePanel")
pMe.PmPanel.OpenView "/DateTime", "target:_blank;modal:1;", "", oExtra
Obtaining returned value of the ClosePanel user method with parameters oSystem and oPrivate of this graphic item.
Dim val
val = oSystem.ReturnValue
If Pm.IsValid(val) Then
  Pm.Debug "datetime=" & val
End If
-------------------------
An example in JavaScript syntax:
Opening the preconfigured window in the panel using the onButtonUp event of the PmiButton graphic item.
var oExtra = Pm.CreatePmMap();
oExtra.onClose = Pm.CreatePmAction(1, pMe, "ClosePanel");
pMe.PmPanel.OpenView("/DateTime", "target:_blank;modal:1;", "", oExtra);
Obtaining returned value of the ClosePanel user method with parameters oSystem and oPrivate of this graphic item.
var val = oSystem.ReturnValue;
  Pm.Debug("datetime=" + val.Format("%d.%m.%Y %H:%M:%S"));
 
This preconfiguration is used in PreCfg - Preconfiguration examples.
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice