Host Methods for Progress 4GL
Version 3
 
General Container Methods Component Methods
Introduction Generic Container Generic Component
Utility Methods Frame Button
State-Aware Methods Panel Checkbox
Combobox
Hyperlink
Label
Message Box
Passwordfield
Table
Textarea
Textfield
Textpane

Introduction

This document lists each of the "jsi" include files that can be used by Progress procedures to send various commands to a client application (app). There are commands available for a wide variety of purposes, including:

In addition, a powerful utility method allows a host procedure to make use of all functions available in a client app: Finally, several methods are available to start and end a "state-aware" session, which dedicates a Progress Webspeed agent or AppServer process to one client and maintains its "state" (value of working variables, temp-tables, etc.) between interactions with that client. Related methods are used to start, commit, undo and retry transactions within a state-aware session.

These include files are referenced using the normal Progress "include file reference" syntax, with enclosing brace characters containing the name of the include file and zero or more name/value pairs for any required arguments.

For example, to display the value of the database field "customer.name" in a client textfield whose object name is "tName", an include file reference with two arguments is used:

{jsi/textfield/settext.i &name='tName' &val=customer.name }
Another example disables a button whose object name is "bDelete" so that it cannot be clicked or receive focus:
{jsi/component/setenabled.i &name='bDelete' &b='false' }
If the value used for a parameter is a variable name, database field name, temp-table field name or a Progress function (string, substring, etc.) then it is not quoted, like the customer.name value in the first example.

When a literal value is used for a parameter, it must be enclosed in single quotes, like the 'false' value in the second example. If the literal value contains embedded spaces, such as a multi-word message, then there should also be a set of double quotes outside the single quotes. This example will send an error message in a warning box when no customer record is available:

{jsi/msgbox/warning.i &component='fMain'
                      &msg="'No customer record was found.'" }
Note that the message box example could also use a variable, which can allow more streamlined coding. For example:
define variable vMsg as character.
find customer where customer.cust-num = tCustNum exclusive-lock no-wait no-error.
if not available customer then do:
   if locked customer
      then vMsg = "That customer record is locked.".
      else vMsg = "No such customer record was found.".
      {jsi/msgbox/warning.i &component='fMain' &msg=vMsg }
   end.
else
   {jsi/textfield/settext.i &name='tName' &val=customer.name }
Most include files have at least one required argument, the "object name" which names a container or component object to which the method will be applied. These names are case-sensitive, meaning that upper and lower case must exactly match the name used in Jargon Writer for this object. This means that 'TName' and 'tName' cannot be used interchangeably to reference the same client object. This rule is different than the syntax used in the Progress language itself, and can be the cause of numerous errors if not carefully followed.

Utility Methods


State-Aware Methods

jsi/state/start.i
This method is used to start a state-aware WebSpeed session and lock an agent to this client.
jsi/state/end.i
This method is used to explicitly end a state-aware WebSpeed session and free the agent to handle other clients.

jsi/tran/start.i
This method is used to explicitly start a Web transaction within a state-aware session.

jsi/tran/commit.i
This method is used to explicitly commit a Web transaction within a state-aware session.

jsi/tran/undo.i
This method is used to explicitly undo a Web transaction within a state-aware session.

jsi/tran/retry.i
This method is used to explicitly retry a Web transaction within a state-aware session.


Container Methods
These methods are used with various container objects (frames, panels, cardpanels, tabpanels). There are both generic container methods which can be used with any container type, and other methods that are specific to a particular container type.

Generic Container
These methods can be used on any container object (frame, panel, cardpanel, tabpanel).

No Generic Container methods are available in Version 3.0

Frame

jsi/frame/setmessage.i
This method is used to display a message in the system message area at the bottom of the frame.
  • &name - The internal name used in the client app for this object.
  • &val - A character string to be displayed as a message. Example: " 'Process completed' ".
  • jsi/frame/settitle.i
    This method is used to assign a frame's title (displayed in the top border of the frame). jsi/frame/setvisible.i
    This method is used to make a frame visible or invisible (hidden).
  • &name - The internal name used in the client app for this object.
  • &val - A boolean (logical) value: 'true' to make visible, 'false' to hide.
  • Panel

    No Panel methods are available in Version 3.0
     

    Component Methods
    These methods are used with various component objects (objects which are not containers). There are both generic component methods which can be used with any component type, and other methods that are specific to a particular component type.

    Generic Component
    These methods can be used on any component object.

    No Generic Component methods are available in Version 3.0

    Button

    No Button methods are available in Version 3.0

    Checkbox


    Combo box

    Hyperlink Label

    No Label methods are available in Version 3.0
     

    Message Box

    jsi/msgbox/message.i
    This method is used to display an informational message to the user, in a modal dialog box with an OK button.
    Passwordfield Table Textarea Textfield Textpane
    jsi/textpane/settext.i
    This method is used to display a value within a textpane.

    Up to Top      Return to Help Index