Managing client form submission

When a form submits directly to another page, the data passed to the target page must already be available from the linking page. The following data is available to the target page:

On 4GL Web pages, a form represents a page. When a user action submits a page form, the form can submit to the same page (self-navigation) to refresh a page in the user’s browser or to prepare for a server redirection. Otherwise, it can be submitted directly to another page (form submit). For more information about server redirection, see “Managing server redirection”.

For a form submit, the names of the client controls must map to (match) the names of the parameters on the target page. To take advantage of the Web Target interface for the form submit navigation style, you must first set the parameter names on the target page.

NoteNo forms on 4GL Web pages You should not add FORM tags to 4GL Web pages. If you change a non-4GL page to 4GL mode, you must manually remove any FORM tags in Source view. For 4GL Web pages, the entire page is represented as a single form.

The following drawing illustrates how parameters get passed when a page form submits directly to another form in a Web site target or a non-4GL JSP target. Parameters are passed the same way for JSP targets, except that the target and linking pages would typically have .jsp extensions instead of the .htm extensions displayed in the drawing:

Figure 10-2: Passing parameters in a form submit

The illustration shows a Client browser with a page labeled p 1 dot h t m. From the client browser, a page form is submitted specifying P 2 dot h t m and the U R L the server should access. An arrow indicates that this is submitted to the system running the Web and application servers, and additional text says "Send to server U R L for P 2 dot h t m with current page aparameters from P 1 dot h t m."  The Web and application server system sends P 2  dot h t m back to the client system.

For a fuller description of how to pass parameters using the form submit navigation style, see “Using parameters and variables”.

StepsTo set parameter bindings for a 4GL form submit:

  1. Right-click the linking page in the HTML editor, then select Page Properties from the pop-up menu.

    The Page Properties dialog box displays.

  2. Click the Parameters tab

    or

    Click the Variables tab.

  3. Click the New button, and add a parameter or variable with the same name as a parameter on the target page.

    For parameter binding purposes, the names you type are case sensitive. The parameter or variable name on the linking page must exactly match the parameter name on the target page.

    For steps to add a parameter, see “Setting up page parameters”. For steps to add a variable, see “Setting up page and session variables”.

  4. Repeat steps 2 and 3 for each parameter and variable you want to add to the current (linking) page.

  5. Click the Destination tab on the open (linking) page.

  6. Select the Submit To URL radio button option.

    Click the browse (...) button and select your target page from the Choose URL dialog box.

    The parameters of the target page are listed in the Parameter Name column of the grayed-out list box. You cannot directly modify the items in this list.

    If a parameter or variable name on the current (linking) page matches a parameter on the target page, the matching name is listed in the Bind Value column. The Bind Type indicates whether the matching name is a page parameter or page variable on the current page.

    Shown is the Destination tab page of the Page Properties dialog box. At top are a cleared radio button labeled Submit to current page (self navigate) and a selected radio button labeled Submit to U R L. Next is a Destination text field with a browse button and the entry Customer dot h t m. Next are columns for Parameter Name, Bind Type, and Bind Value. Three sample rows have the values param 1, Page Parameter, param 1, then param 2, NONE, blank, then page Var 1, Page Variable, page Var 1.
  7. Click Apply.