Creating and Managing Forms

In this section:

How to:

You create and manage forms using the Project Explorer.

By default, when you create your Maintain procedure, WebFOCUS Maintain creates an initial form, named Form1, with the necessary code in the Top function to launch the form. You can rename this form. The new name is automatically reflected in the Winform Show statement.

Note:


Top of page

x
Procedure: How to Create a Form
  1. Select the Maintain procedure that you want the form to be part of.

    Note: You must deploy all forms in an application to the same WebFOCUS Server. Keep this in mind when deciding which procedure to place your forms in.

  2. Right-click the procedure, click New in the shortcut menu, and click Form in the submenu.

The new form opens in the Form Editor.

After you have created a form, it is displayed under its procedure in the Project Explorer.


Top of page

x
Procedure: How to Edit a Form
  1. In the Project Explorer, open the procedure that contains the form you want to edit.
  2. Open the Forms folder.
  3. Right-click the form, and in the shortcut menu, click Open.

    or

    Double-click the form.

The form opens in the Form Editor.


Top of page

x
Procedure: How to Rename a Form
  1. In the Project Explorer, right-click the form, and in the shortcut menu, click Rename.

    or

    Select the form and press F2.

    or

    Select the form, then click it again to edit its name.

  2. Type your new name.
  3. Press Enter to confirm your change.

Top of page

x
Exporting and Importing Forms

How to:

Sometimes you might want to base forms from different procedures on a single template. The Maintain Development Environment enables you to export a form to a file, and then import it into another procedure.

Keep in mind that when you import a form into a different procedure from the procedure you exported it from, WebFOCUS Maintain preserves bindings to resources such as web links, scripts, and graphics, but not to variables or data source stacks (since variables and data source stacks are defined only in the context of a procedure).



x
Procedure: How to Export a Form
  1. In the Project Editor, right-click the form and click Export.
  2. In the Export As dialog box, enter a name for your form and click Save.

WebFOCUS Maintain saves your form in a file with the extension .for in the project folder.



x
Procedure: How to Import a Form
  1. In the Project Editor, right-click the Maintain procedure you want to import the form into and click Import forms.
  2. In the Import Form dialog box, select the form you want to import and click Open.

    If you cannot see the form you want to import, make sure that it is in one of your project paths.


WebFOCUS