PxForms Anywhere v.1.2.0

1. What is PxForms Anywhere?
2. How it works
3. Supported features
4. Unsupported features
5. What the form running via Internet must not do

6. Flow of operations
7. PxForms interface methods
8. PxForms engine components
9. PxForms engine methods description
10. Assorted topics
11. PxForms Sample application
12. How to create your own application, powered by PxForms

 

1. What is PxForms Anywhere?

PxForms Anywhere is an engine written in OPAL and JavaScript for using in Corel Paradox/Paradox runtime v.8-11. PxForms uses revolutionary technique which allows to run normal Paradox forms and reports via Internet/Intranet in a browser window. No need for Paradox on clients' computers! No need to install any software on clients' computers - they only need a browser, which is, of course, already installed! Using PxForms, you can easily create WEB-enabled applications using existing Paradox forms without knowlege of HTML and JavaScript. You can create WEB-enabled multiform applications in a few days - just make minor adjustments in your existing Paradox forms and use the Sample application from PxForms package with a few lines of its code changed!

Moreover, by giving access to your applications via Internet/Intranet, you significantly increase data security - users have no direct access to tables, and can change data only via forms according to their rights. In fact, you get a Client/Server application.

PxForms supports the following browsers on the client's side:

2. How it works

To run PxForms applications via Internet, you need to have a server computer, running CWS (Corel WEB Server). In the PxForms sample application CWS is embedded to the Webserv.fsl form. When a user runs a form on the server, PxForms opens this form (hidden), parses its structure, composes an HTML page which reflects the form's look and sends it to the browser. Then, the browser image of the form and actual form on the server exchange information when needed. Only changed data travel between server and browser.

You can use the whole Sample application as a starting point for you own applications.

3. Supported features

4. Unsupported features

5. What the form running via Internet must not do

6. Flow of operations

When the client side’s user requests to open form, PxForms library handles this request, opens form and calls form's pviFormStartup (if exists). The form obtains via this method an information about the current user name, the form-caller (important for modal dialog forms), about the user's session private directory, which is set by the application. Also, the form may adjust visible buttons on the toolbar and it's title in the browser.

After the form is opened, it is displayed in browser. If the user clicks one of toolbar buttons, moves the cursor to another record, clicks buttons, changes value of a list, combo, checkbox or radiobutton field which has NewValue or ChangeValue method attached, changes value of labeled or unlabeled field which has ChangeValue method attached, right-clicks on an object which has MouseRightUp or MouseRightDown method attached, clicks on a text or graphical uiobject which has MouseClick, MouseDown or MouseUp method attached, the corresponding request is being sent to the server. On the server side the PxForms library handles this request in the following sequence:

7. PxForms interface methods

The methods below may be (optionally) placed in your application's forms for extended interaction with PxForms library.

pviFormStartup(UserName string, SessPrivDir string, callerTitle string, var hasPrintButton logical, var hasLocateButtons logical, var hasNavigationButtons logical, var hasEditButtons logical, var warnOnRecordDelete logical)

pviGetCharSet() string

pviBeforeAction(actionId string, Value1 string, var mess string) logical

pviAfterAction(var mess string, var RequestedAction string, var Value1 string, var Value2 string)

pviAddToolbarText()

pviChildFormOpened(var Child form, ChildOrigTitle string)

pviDragDropProperties()

pviDragDrop(oldPosition point, flags longint)

pviDragDropByName(uiFullName string, oldPosition point, flags longint)

pviDynamicTabs()

pviHTMLElementEvent()

pviHTMLElementStyle()

pviHTMLGlobalBody()

pviHTMLGlobalJavascript()

pviHandleKeys()

pviJSexec() string

pviMenu(var mainMenu stringArray, var popupMenus stringArray, var actions stringArray)

pviNoTitlebar()

pviNoToolbar()

pviShowStatus() string

pviSuperCache()

8. PxForms engine components

PxForms core library has PxfXX.ldl name, where XX corresponds to the Paradox version. It uses several other libraries:

Also, PxForms engine contains a number of HTML forms, which are in the SITE and REPOS subdirectories. Don't change anything in these forms unless you're absolutely sure what you do. Changing these forms may result in the whole PxForms engine becoming inoperative.

PxForms engine contains to tables:

9. PxForms engine methods description

PxfXX.fdl has the following public methods (in alphabetical order):

pxfChkModalDlg() string

If the user tried to open form or report, which can't be opened due to absence of some tables, the Paradox error dialog "Do you want to replace table in datamodel...." appears. This method checks the presence of this error dialog and closes it by calling pxfFormRecover (see below). This method must be exactly in those place, where it is in the Sample application.

pxfFormAddToQueue(FormTitle stringarray)

Adds a form to a queue of forms to be closed when the user is being disconnected due to timeout (exceeding of allowed inactivity period).

pxfFormClose(request oleauto, response oleauto, var connForms string)

Handles request to close form and adds a form to the queue of forms to be closed. See pxfFormConstruct for parameters description.

pxfFormConstruct(request oleauto,response oleauto, id string, pathToForm string, winTitle string, connIpriv string, connLang string, connName string, var connForms string)

Creates HTML image of Paradox form. Parameters:

pxfFormContent(request oleauto, response oleauto, connIpriv string, connLang string)

Handles requests from a form, running in browser. See pxfFormConstruct for parameters description.

pxfFormRecover(request oleauto, response oleauto, connLang string)

See description for pxfChkModalDlg

pxfFormsQueueCleanUp() logical

Closes the first form in the "closing queue". This special method is needed because normal formVar.close() often causes GPV when called inside CWS event handlers. This method must be exactly in those place, where it is in the Sample application.

pxfGetVersion() string

Returns the PxForms core library version

pxfLibInit(CWSFormTitle string, libDir string, siteRootdir string, siteHTMLdir string) logical

Library initialization code. Is being called from the CWS (webserv.fsl) initialization code. Parameters:

pxfRegister(rname string, rpass longint)

This method must be called with the registration information to prevent nag screens. In the Sample application the call of this method is in the SetParams method of the Pxfapp.lsl library. Parameters:

pxfReport(request oleAuto, response oleAuto, id string, pathToReport string, repFormat string, warnOnSize number, connLang string, connName string, connIPriv string)

Opens report and sends it to user. Parameters:

10. Assorted topics

11. PxForms Sample application

PxForms Sample application offers the following features:

The Sample application contains:

12. How to create your own application, powered by PxForms

The easiest way is the following: