# Library Object Selection

Create Base Webster+ Page(s) |

The Create Base Webster+ Page(s) utility is the first step in converting existing NOMADS panels into Webster+ HTML pages in situations where an existing application is being moved to a Web environment using Webster+.

Where possible, information from the screen library is converted to Webster+ Short Codes. However, not everything that is supported in NOMADS has an existing short code or option in Webster+.

The utility creates both an HTML file and a PxPlus program for every panel converted. The HTML file is located in the Webster+ Pages Directory defined for the current screen library. The program's location is determined according to the PREFIX rules currently in effect.

#### Important Note:
The HTML pages and programs that are created are a starting point only and will require editing to complete functioning Webster+ pages.

(The Create Base Webster+ Page(s) utility was added in PxPlus 2025.)

To invoke this utility, use one of the following methods:

Location | Method
From NOMADS Library Object Selection | Select Webster+ > Create Base Webster+ Page(s) from the top menu bar. #### Note: This menu option is enabled only when a Webster+ pages directory has been defined. This is done by selecting the Define Webster+ Pages Directory option from the Webster+ menu.
From NOMADS Library Object Selection | Select an individual Object Name in the Object List. Then, right click to display the popup menu. Select the Create Base Webster+ Page option.

If this utility is accessed from the right click popup menu, only the selected panel is converted, and the conversion happens without displaying an additional dialog. When the conversion is completed, a message box displays.

Example:

If the utility is accessed from the Webster+ menu at the top, the Create Base Webster+ Page(s) window displays.

This window consists of the following:

Screen Library | Displays the path to the current screen library and is locked for editing.
Webster+ Pages Directory | Displays the Webster+ pages directory defined for the screen library and is locked for editing.
(Objects Grid) | All of the Dialog and Window objects from the screen library, except for those last generated as File Maintenance panels, are loaded into the grid.
Convert (Check Boxes) | In the Convert grid column, select the check box beside the NOMADS Object Name to be converted to Webster+. A single check box or multiple check boxes can be selected in random or consecutive order. To select all of the check boxes, click the Select All check box in row 1.
Convert | Button that is used to convert the selected Object Names. When the conversion is completed, a message displays to indicate the total number of panels that were converted.
Exit | Exits the utility.

## What is Converted for the HTML Pages?

Every .HTML page created by the Create Base Webster+ Page(s) utility will share some common code at the beginning to specify the title (the [ttl] short code) and the program associated with the page (the [form program =xxxxxx.wbs]).

Below this section, the HTML page contains short codes for the various object types on the panel.

On Exit logic defined for the NOMADS Panel Header is not converted.

The converted HTML file ends with the [/form] short code.

Which Control Types are converted?

This table lists the control types that are converted and provides additional information about the conversion.

Control Type | Conversion Information
Common to Multiple Types | Foreground and Background control colors are converted using the text_xxxxx and fill_xxxxxx classes. Width and Height approximations are converted using the size option. Initially Disabled attribute is usually converted using the disabled option, except where mentioned below. Tips are converted using the tip option. Font and Font Size are converted by setting font_xxxxx classes. The Bold Font attribute is converted via the bold class. Control Properties defined as expressions are evaluated prior to creating the HTML page. Controls with Button Pressed or On Change logic are given events (named for the control name), referencing methods created in the .wbs program; e.g. event=MULTI_LINE_!_CHANGED.
Buttons | Conventional button controls are converted using the [button] short code, and Web-Style buttons (hyperlinks) are converted using the [link] short code. Images are supported using the [symbol] short code. Drop buttons are supported using the dropmenu option with a corresponding [menu] short code and separate events for each menu option.
Charts | Only Charts that are loaded with the SmartLoad option will be converted to Webster+ using the [chart] short code. Smart Load charts are converted using the query and optional queryif options. If Conditional Trigger Test logic references a control on the panel, that control must have On Change logic defined to trigger an event in order to update the page display. Support for the event option.
Check Boxes | Converted using the [checkbox] short code. Images are not supported. Support for the onright, off, on and other options.
Drop Boxes | Converted using the [list] short code with the size= option only specifying a width. Support for Data Classes defined as drop boxes. Support for Dynamic Data Classes using the Load from File option for List Values. #### Note: In Webster+, drop boxes using Dynamic Data Classes will be sorted alphabetically by return value (value or translation value). Smart Load drop boxes are converted using the query and optional queryif options. Initially disabled drop boxes are converted using the locked option. Data values use the [data] short code and the rowsep and colsep options.
Fixed/Fonted Text | Converted using the [show] short code. Align option supported as "left" (default), "right" or "center".
Folders | Created using the [folder] short code and class of either "web" or "bar" for the main panel. Panels comprising the folder tabs are converted using [tab] short codes. A panel with a folder and three tabs will be converted into one HTML file with one associated .wbs program even if the tab panels were not selected for conversion.
Frames (Boxes) | Only Frame controls with a height of 1 line or less are converted to Webster+ as horizontal lines spanning the entire (whole) section, regardless of the width defined for the NOMADS control.
Grids | Created using the [grid] short code. Program option to point to a method created in the .wbs program to load the grid data into a memory file. Support for grid header definitions using the [col] short code with ttl, width, align and source options. Support for the gridlines option.
Horizontal Line Shapes | Converted as horizontal lines spanning the entire (whole) section, regardless of the width defined for the NOMADS control.
Images | Converted using the [image] short code. Support for the file and align options. All images are scaled to fit within the designated size in Webster+.
List Boxes | Converted using the [list] or [tree] short code with the size= option specifying both width and height. Support for Data Classes defined as list boxes. Support for Dynamic Data Classes using Load from File option for List Values. #### Note: In Webster+, list boxes using Dynamic Data Classes will be sorted alphabetically by return value (value or translation value). Smart Load list boxes converted using the query and optional queryif options. If Conditional Trigger Test logic references a control on the panel, that control must have On Change logic defined to trigger an event in order to update the page display. Column header data is converted using the [col] short code with the ttl, align and source options. Initially disabled list boxes are converted using the locked option. Data values use the [data] short code and the rowsep and colsep options. Tree view list boxes that are not Smart Controls are converted using a program option to point to a method created in the .wbs program to load the tree view data into a memory file.
Multi-Lines | Converted using the [input] short code. Support for format, default, uppercase, align, locked, query and password options. Numeric multi-lines or those with a format or query defined are all converted as one line high.
Radio Buttons | Converted using the [radio] short code. Images are not supported. Radio buttons sharing the same control name will be converted into separate whole sections (either aligned vertically or horizontally). Support for the onright option.

## What is Not Converted for the HTML Pages?

This table provides information about what is not converted for the HTML pages.

Logic Associated with the Panel Header: Pre-Display Logic Post-Display Logic On Exit Logic | If there is logic to be executed at any time while loading the form, this can be accomplished with the use of the [execute] short code. Example: [execute perform "panel_name.wbs;method_name",err=*proceed] Where: panel_name.wbs is the name of the program created by the utility. method_name is the name of the method manually added to that program.
Foreground and Background Colors for the Panel | This can be controlled by other means in Webster+.
Some Control Types: Shapes other than Horizontal lines Frames with Heights of more than 1 line Horizontal Scrollbars Vertical Scrollbars Charts not loaded via SmartLoad External Controls Embedded Panels | These controls are converted only as red text (using the [show] short code) as a reminder to the developer that they were not actually converted to the Webster+ HTML page. The HTML added for these controls should be removed after the conversion is completed.
Post Create and When Receiving Focus Logic for individual controls | While the On Change (When Button Pressed, When Entry is Selected or On Change) logic is converted to a Webster+ event, any Post Create or When Receiving Focus logic defined for a control is not converted.
Precise Screen Layout | Controls within approximately the same line in NOMADS will be converted on the same Webster+ line with three non-breakable spaces (&nbsp) between each control for separation. Each approximate line is surrounded by the [section whole] and [\section] short codes. After conversion, the HTML file should be edited by replacing all or some of these whole sections with the appropriate Webster+ section short codes - [section half], [section third], [section quarter] and [section flex] - to control the Webster+ screen layout and resizing as required.
Background Colors for Check Boxes and Radio Buttons | In NOMADS, these colors control the color of the actual check box or radio button portion of the control only. In Webster+, the fill_xxxxx classes control the background color of the entire control; therefore, these colors are not converted.
Visual Classes | Since most appearance-related attributes are controlled via style sheets in the Web, only Foreground and Background colors for controls are converted. All Theme and Visual Class settings are ignored.
Initially Hidden Attribute | Webster+ has no hidden option. Controls may be hidden by adding code to the panel's .wbs program to use the Hide method in the Webster+ Object.
Dependencies | Any dependencies defined for the panel are not converted. Dependencies may be added to the panel's .wbs program by using the [depends] short code.
Italics Font Attribute | Webster+ does not support this via an option. The Font Name specified with the font_xxxx class would need to include 'Italics'.

See Example HTML Page below.

See Example HTML Page Running in Webster+ below.

## What is Converted for the PxPlus (.wbs) Program?

The PxPlus programs created contain an initial section common to all programs. The name of the program (determined by the panel name) and the path to the bound HTML page are the only variables. This logic intercepts the events triggered by changes to the Web page and sends program control to the proper methods defined for the events below.

Any button control with When Button Pressed logic defined will result in a method called EVENT_CONTROL_NAME_PRESSED (where CONTROL_NAME is the name of the button control).

Any other control type with On Change logic defined will result in a method called EVENT_CONTROL_NAME_CHANGED (where CONTROL_NAME is the name of the control).

All of the above event methods are created as an outline with only the method label, a remark line indicating what happened in NOMADS and the EXIT statement. It will be necessary for the developer to review the NOMADS code indicated and translate it appropriately to work in Webster+.

See Example PxPlus .wbs Program below.

## Example – NOMADS Panel Conversion

For this example, a simple NOMADS panel (Sample) has been defined as shown below:

When converting the Sample panel above, an .HTML file (sample.html) will be created in the Webster+ pages directory defined for the screen library, and a sample.wbs PxPlus program will be created according to the current PREFIX rules.

Example HTML Page (sample.html)

> <!DOCTYPE html>
> <html>
> <head>
> <meta name="author" content="Susan" />
> </head>
> <body>
> [ttl]sample[/ttl]<br>
> [form program=sample.wbs]<br>
> [section whole]
> [show "Sample Panel to be converted to Webster+" size=37.5/1.88 align=left class=font_200,text_#0000ff,fill_default]&nbsp;&nbsp;&nbsp;
> [/section]
> <br>
> [section whole]
> [show "Input 1:" size=10 align=left]&nbsp;&nbsp;&nbsp;
> [input MULTI_LINE_1$ size=28 event=MULTI_LINE_1_CHANGED]&nbsp;&nbsp;&nbsp;
> [/section]
> <br>
> [section whole]
> [show "Input 2:" size=10 align=left]&nbsp;&nbsp;&nbsp;
> [input MULTI_LINE_2$ size=33 event=MULTI_LINE_2_CHANGED]&nbsp;&nbsp;&nbsp;
> [/section]
> <br>
> [section whole]
> [show "Box/Frame BOXES_1$ not converted" size=15/5 align=center class=text_red bold]&nbsp;&nbsp;&nbsp;
> [/section]
> <br>
> [section whole]
> [/section]
> [section whole]
> [radio RADIO_BUTTON_1$ size=23/2.25 event=RADIO_BUTTON_1_PRESSED]Radio Button 1[/radio]&nbsp;&nbsp;&nbsp;<br>[radio RADIO_BUTTON_1$ size=22/2.25]Radio Button 2[/radio]&nbsp;&nbsp;&nbsp;<br>[radio RADIO_BUTTON_1$ size=22/2.25]Radio Button 3[/radio]&nbsp;&nbsp;&nbsp;<br><br>
> [/section]
> <br>
> [section whole]
> [checkbox CHECK_BOX_1$ size=16/2.25 event=CHECK_BOX_1_PRESSED]Check Box[/checkbox]&nbsp;&nbsp;&nbsp;
> [/section]
> <br>
> [section whole]
> [show "Locked 1:" size=10 align=left]&nbsp;&nbsp;&nbsp;
> [input MULTI_LINE_3 size=15 locked]&nbsp;&nbsp;&nbsp;
> [show "Locked 2:" size=10 align=left]&nbsp;&nbsp;&nbsp;
> [input MULTI_LINE_4 size=15 locked]&nbsp;&nbsp;&nbsp;
> [/section]
> <br>
> [section whole]
> <hr>
> [button id=BUTTON_1$ size=14/2.75 event=*close class=text_#ffffff,fill_#0000ff text="Exit"]&nbsp;&nbsp;&nbsp;<br><br>
> [/form]

Example HTML Page Running in Webster+

After conversion, all of the elements, except the frame control, have been converted and look similar; however, the alignment is not the same since there are only whole sections in use.

The developer would need to edit the HTML files as follows:

- Remove the short codes created for any controls not converted.
- Correct alignment by removing &nbsp codes and assign [section] short codes for whole, half, third, quarter or flex sections as desired.
- Fine-tune the converted file as needed.

Example PxPlus .wbs Program (sample.wbs)

> ! sample.wbs - Webster program for sample panel
> ! Initially generated by Create Base Webster+ Page(s) Utility on 15/04/25
> !
> %webster'BindFile$="c:\webster2024\pages/sample.html"
> !
> ! Handle events
> GOTO LNO("EVENT_"+_event$,ERR=*NEXT)
> %webster'msgbox("Invalid event: "+_event$,"Internal Error - "+PGM(-3),"!")
> !
> EXIT
> !
> EVENT_MULTI_LINE_1_CHANGED:
> ! Perform ";change_input_1"
> EXIT
> !
> EVENT_MULTI_LINE_2_CHANGED:
> ! Perform ";change_input_2"
> EXIT
> !
> EVENT_RADIO_BUTTON_1_PRESSED:
> ! Perform ";change_radio_button"
> EXIT
> !
> EVENT_CHECK_BOX_1_PRESSED:
> ! Perform ";change_check_box"
> EXIT

## See Also

Short Codes
Short Codes Examples
Short Code Options
Webster+ General Configuration
Webster+ Setup and Configuration
Webster+ Object Methods
Webster+ Object Properties
Webster+ Defined Classes