Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Developing pages – PB Docs 90 – PowerBuilder Library

Developing pages – PB Docs 90

Developing pages

With 4GL functionality enabled, you can rely on an event-driven
infrastructure to handle many of the details of coding server scripts
for your Web pages. As with other Web target files, you edit 4GL
Web pages in the HTML editor and write scripts in one of the script
editors. The integrated Script editor provides additional support
for some of the features available in 4GL pages.

You can create new 4GL pages or you can modify existing pages
to enable 4GL processing after you add the pages to your Web target.
If you change a non-4GL page to 4GL mode, you must manually
remove any existing FORM tags in Source view. Each 4GL Web page
is represented as a single form. You cannot use nested FORM tags
on these pages.

Creating a new 4GL Web page

You create new 4GL Web pages using the 4GL Web/JSP
Page wizard. If you want to change an existing page to 4GL mode,
you can enable 4GL mode by selecting a check box in the Page Properties
dialog box for the page.

The 4GL
Web/JSP Page wizard prompts you for basic design information, options
for error reporting, page parameters, and EAServer components
that you want to use on the page. If you are unsure about values
to enter for a particular wizard field, you can leave the field
blank or accept the field default, then add or change the information
later in the Page Properties dialog box.

Table 9-1: 4GL Web/JSP
Page wizard page design information
Specify this To do this
Style sheet Select an existing style sheet for the
page.
Background image Select an image that displays as the
page background.
Scroll image Make the background image scroll with
the page.
Background color Select a color for the page background.
Header based on title Add a page header that is the same as
the title. This header appears on the printed version of the page.
Date created footer Add a page footer that shows the date
the page was created. This footer appears on the printed version
of the page.

The 4GL
Web/JSP Page wizard also includes a page with selections
for the specialized error reporting capabilities available to 4GL
pages:

Table 9-2: Error reporting
selections for 4GL pages
Select this To do this
Show runtime errors in alert message
box
Display page processing errors in an
alert message box
Show runtime errors as text at the top
of the page
Display page processing errors at the
top of a generated page
Show runtime errors as text at the bottom
of the page
Display page processing errors at the
bottom of a generated page
Enable trace Display detailed information about page
processing during page development

proc.gif To create a new 4GL Web page:

  1. From a Web target select File>New
    from the menu bar.

    or

    Right-click a target or target folder in Workspace view
    and select New from the pop-up menu.

  2. Click the Web tab in the New dialog box.

    Make sure the Web target to which you want to add a
    4GL Web page is selected in the Target drop-down list box.

  3. Click the 4GL Web/JSP Page wizard icon
    to start the wizard, then click Next.

  4. On the Specify New HTML File page of the 4GL Web/JSP
    Page wizard, enter the title and file name for the page you want
    to create.

    If you selected a PowerDynamo or ASP target, the file name
    extension is HTM. If you selected a JSP target, the file name extension
    is JSP.

  5. Provide design information for your Web page in
    subsequent wizard pages.

  6. Specify options for error reporting and click
    Next.

  7. Specify any page parameters that will provide
    input values for the page and click Next.

    You can add page parameters at a later time from the Page
    Properties dialog box for your page.

  8. Select an EAServer profile, making sure the
    EAServer you select is running. Click Next to list the available
    components on this server.
    or

    Select
    the Skip EAServer Components check box if you want to select components
    at a later time. Click Next and skip the next step in this procedure.

    fglwzjag.gif

    This wizard page lists EAServer profiles already configured
    in your development environment.

    note.gif Make sure your EAServer is running If you click Next without selecting the Skip EAServer Components
    check box, the wizard attempts to connect to the server that is
    selected in the Choose EAServer Profile dialog box.

  9. Select the EAServer components you want your 4GL
    Web page to access, and click Next.

    fgljagcm.gif

  10. On the last wizard page, review the summary of
    page properties, and click Finish.

Enabling 4GL mode in an existing page

You
change an existing page in your Web target to 4GL mode by opening
the page in the HTML editor and selecting a check box in the Page
Properties dialog box. Some of the pages of the Page Properties
dialog box are available only to Web pages for which you select
the 4GL mode. After you select the 4GL mode check box, you can add
other 4GL properties to the page and access the server-side event
model in the integrated Script editor.

Table 9-3: Property
pages of the Page Properties dialog box
On this page Specify this
Page Presentation details for the page.
Destination A self-link, or a link to a target page,
including parameters and parameter bindings for the target page.
Available to 4GL pages only.
Parameters Page parameters for the current page
and default values for those parameters, if any. You cannot enter
default values for parameters on a non-4GL page.
Variables Variables that your page will use. Available
to 4GL pages only.
EAServer Variables that represent EAServer components.
Available to 4GL pages only.
Errors Type of error reporting the page uses.
Available to 4GL pages only.
JSP Directives Add directives (page, include, or taglib)
to your page. Available in JSP targets only.
Inline Styles Style properties for the page.
Advanced Additional attributes for the page (some
user interface properties, such as a target page link, are also
listed here).

note.gif Post-conversion manipulation If you change an existing page to 4GL mode, you must manually
remove any existing FORM tags and you must make sure that each control
on the page has a unique name. If you want to take advantage of
4GL functionality with a control you added before changing the page
to 4GL mode, you must select the Server Side Scriptable check box
on the control property sheet (or add the PSSERVERSCRIPTABLE attribute
for the corresponding INPUT or OBJECT tag in Source view).

proc.gif To enable 4GL mode in an existing page:

  1. Open the page in the HTML editor.

  2. Right-click in the page, then select Page Properties
    from the pop-up menu.

  3. On the Page tab of the Page Properties dialog
    box, select the Enable 4GL Web Server Side Event Model check box.

    When you select the check box, the 4GL property pages of the
    Page Properties dialog box are enabled.

  4. (Optional) Specify properties for the 4GL Web
    page on the newly enabled pages of the Page Properties dialog box.

Adding content to 4GL Web pages

After
you open a new Web page in the HTML editor, you are ready to start developing
the page contents. The Page tab page of System Tree displays information
about any objects and controls that you add to your page.

When you develop a page, you typically add content in a prescribed
order. For example, you define parameters and variables as a first
step, in order to access those values from objects or scripts as
you build the page. The following procedure shows the steps you
will most likely follow to develop 4GL Web pages.

proc.gif To develop a 4GL Web page:

  1. Add page parameters, page variables, and
    session variables.

    See “Using parameters and variables”.

  2. Add access to properties of EAServer components.

    See “Accessing EAServer components”.

  3. Insert form controls, and then bind these controls
    to parameters, variables, or EAServer component properties already
    accessible on your page.

    See “Adding controls”.

  4. Set up page navigation.

    See “Setting up page navigation”.

  5. Write scripts for the events on your page.

    See “Writing server scripts”.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x