Scripting in Server Pages

When scripting server pages, you need to consider the following:

  • Some triggers are not available in web environment. For more information, see Triggers in Dynamic Server Pages and Triggers in Static Server Pages .
  • Interactive ProcScript is limited and you should consider the use of fields, functions, and HTML pages to pass messages and warnings to your users.

    Some ProcScript instructions are specific for web applications, such as $webinfo, which allows you to access objects in a HTTP request including all web server variables. For more information, see ProcScript for Dynamic Server Pages and ProcScript for Static Server Pages.

  • Server pages have a limited lifetime and do not exist on the server between the initial display and the submission of a page. This also affects the scope of variables. For example, the value of a component variable is deleted after an HTTP request is handled. You need to use a state management to keep the value.

    Uniface also provides several state management mechanisms. For more information, see State Management Mechanisms.

    Some triggers can be used to maintain state information. For more information, see State Triggers.

  • Operations called from a URL cannot have parameters defined in their signatures. For more information, see Calling Operations on Static Server Pages.
  • In static server pages, you can use ProcScript to build hyperlinks and other HTML code dynamically. In a complex application, you can move the user interface coding to the HTML page itself, for example, using JavaScript to define page behavior. However, in this case it is usually preferable to use dynamic server pages.

For more detailed information on scripting in dynamic server pages and static server pages, see Dynamic Server Pages and Static Server Pages and their sub-topics.