A SERVICE OF

logo

Getting Started with the 5250 Component Editor
21
About Constant and Expression Driven Connections
You can specify Connection parameter values in one of two ways: as Constants or
as Expressions. A constant-based parameter uses the static value you supply in the
Connection dialog every time the Connection is used. An expression-based
parameter allows you to set the value using a programmatic expression (that is, an
ECMAScript expression), which can result in a different value each time the
connection is used at runtime. This allows the Connections behavior to be flexible
and vary based on runtime conditions.
For instance, one very simple use of an expression driven parameter in a TN5250
Connection would be to define the User ID and Password as PROJECT Variables
(e.g. PROJECT.XPATH(USERCONFIG/MyDeployUser). This way when you
deploy the project, you can update the PROJECT Variables in the Deployment
Wizard to values appropriate for the final deployment environment. At the other
extreme, you could have a custom script that queries a Java business object in the
Application Server to determine what User ID and Password to use.
¾
¾¾
¾ To switch a parameter from Constant driven to Expression driven:
1 Click the right mouse button in the parameter field you are interested in
changing.
2 Select Expression from the context menu and the editor button will appear
or become enabled.
3 Click on the Expression Editor button. The Expression Editor appears.