Creating and Managing Forms
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.
- If you delete
or rename a form, be sure to fix or comment out the Winform Show
command in the Maintain procedure that calls it. If you skip this
step, Project Explorer shows a marker in place of a deleted form.
If you click on that marker, a message appears stating that the
form does not exist and asking if you want to create it.
- After you delete
the Winform Show command from a form, be sure to remove it or comment
it out. If you skip this step, Project Explorer will show a marker
in place of a deleted form. If you click on that marker, a message
appears stating that the form does not exist and asking if you want
to create it.
Procedure: How to Create a Form
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 in
which procedure to place your forms.
the procedure, click New in the shortcut
menu, and click Form in the submenu.
new form opens in the Form Editor.
After you have created
a form, it is displayed under its procedure in the Project Explorer.
Procedure: How to Edit a Form
Project Explorer, open the procedure that contains the form you
want to edit.
the Forms folder.
the form, and in the shortcut menu, click Open.
Double-click the form.
form opens in the Form Editor.
Procedure: How to Rename a Form
Project Explorer, right-click the form, and in the shortcut menu,
Select the form and press F2.
the form, then click it again to edit its name.
your new name.
Press Enter to
confirm your change.
Exporting and Importing Forms
If you 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
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).
Procedure: How to Export a Form
Project Editor, right-click the form and click Export.
Export As dialog box, enter a name for your form and click Save.
Maintain saves your form in a file with the extension .for in the project
Procedure: How to Import a Form
Project Editor, right-click the Maintain procedure you want to import
the form into and click Import forms.
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.