In ScreenSurfer V3, the HTML pages created using the Visual Surfer Screen Object wizard are not formatted in a PRE tag, as HTML tables are used instead to maintain a correct visual layout of the fields on the screen.
While the syntax for defining a Screenmap is included here, the recommended method of managing ScreenMaps is with the Screen Object Wizard. In Version 3 of ScreenSurfer, the "create" and "manage" Screenmap function is in the Screen Object Wizard which is within the new Visual Surfer functionality (see the Visual Surfer documentation within the DevCenter tab for more information).
Unlike the non-Visual Surfer wizards in the DevCenter, the screen object wizard enables both initial screenmap definition and ongoing maintenance/editing of a screenmap.
This DevCenter wizard provides management of one or more screen maps per screen (the screen must be identified with a TESECTION before a screen map can be created for it; the wizard will only work with screens that have already been identified in the Identify and Navigate Wizard.
<TEDECLARE SCREENMAP [MapName=]{name} [Formatted=yes|no] [ForSection=SectionName] {[name=]VarName [type=]Type [row=]Row [column=]Column [length=]Length [[actions=]read|write|readwrite]}[,] [VarDecl2...][,] [...][,] [VarDeclN]>
Defines a row of SurferScript variables which may be "loaded" from the active screen buffer using the <TEGETSCREEN MapName> tag and "put" to the screen using the <TEPUTSCREEN MapName> tag.
MapName is the name of the ScreenMap, referenced in the <TEACTION WEBTOSCREENMAP>, <TEPUTSCREEN>, <TEGETSCREEN> and <TERESULT> tags.
Formatted is an optional parameter with the default of "yes"--if set to "no", the target screen is assumed to be unformatted, and fields will be read and written with no expectation of field attributes (the field data "put" and "get" actions will operate on the exact data area defined, without clearing to any field delimiter).
ForSection is an optional parameter associating this screen map with a specific screen section (defined using TESECTION name when Screen_r_c is "text"). This association enables the DevCenter to work with ScreenSurfer to edit the ScreenMap definition following the initial definition; using this facility, the visual editing of the screenmap can be used throughout the development lifecycle.
Variable Definition Each variable, as with the TEDECLARE ROW tag, is defined using standard variable definitions (name type size) except that instead of the size attribute being in the list, the row column size is used, so that not only the length of a text field is defined; so is its location on the screen.
Name | Name of the Variable |
Type | Text Integer Number |
Row | Screen row of data |
Column | Screen column of first character |
Length | Length on the screen |
Actions | Read=read from screen ReadAttn=read from screen; attention field Write=write to screen ReadWrite=Read from and write to screen html-Ignore=Used in generating pagebody only html-Script=Used in generating in-line Surferscript in pagebody only html-Literal=Used in generating a literal text value in the Pagebody Not specified=work variable (sent on TERESULT) |
Attrs | Generation attributes passed to the DHTML function or used by the PageBody generation phase in the Screen Object Wizard |
HtmlFunc | DHTML Function used to generate HTML for field, or Literal if Actions=html-Literal |
Note that in the TERESULT tag, the SCREENMAP may be used in an identical fashion to the ROW defined using TEDECLARE ROW. All variables defined as READ, READWRITE or not having any screen actions will be sent to a co-server requestor in a TERESULT which specifies the defined screenmap.
Another use of the ScreenMap is in processing web input; the <TEACTION WEBTOSCREENMAP TargetScreenMap> tag will copy all Web. variables with a matching name to the target ScreenMap.
#sampletsc1
TEDECLARE SCREENMAP Example 1 | |||
---|---|---|---|
| |||
|
TEDECLARE ScreenMap Example 2 | |||
---|---|---|---|
| |||
|
<TEGETSCREEN [ScreenMap=]{name}>
Automatically populates the screenmap values with the current host screen values based on row, column placement from the host screen with the specified length. This replaces the need to code a series of <TESET> tags to populate each defined field in the screenmap.
ScreenMap is the name of the ScreenMap, referenced in the <TEDECLARE SCREENMAP> tag.
<TEPUTSCREEN [ScreenMap=]{name}>
The <TEPUTSCREEN> tag does the reverse of the <TEGETSCREEN> tag. This tag automatically populates host screen values based on row, column placement on the host screen with the specified length from the <TEDECLARE SCREENMAP> screenmap definition. The <TEPUTSECTION> tag replaces the need to code a series of <TEACTION PUTFIELD> or <TEACTION PUTDATA> tags to populate the host screen values.
ScreenMap is the name of the ScreenMap, referenced in the <TEDECLARE SCREENMAP> tag.
<TEDECLARE SCREENCHANGE {[Fromscreen=]FromScreen} {[Toscreen=]ToScreen} {[Enterkeys=]EnterKeys} [Navpath=NO|yes] [[Testkeys=]testkeys]>
The <TEDECLARE SCREENCHANGE> tag defines the screen transition and the needed aid key(s) to cause the transition. To utilize the SCREENCHANGE definition and cause the screen transition, you must code a <TEENTER> tag with the Fromscreen and Toscreen parameters.
FromScreen is the name of the screen recognition section for the "From" screen. If the screen recognition section is called VSRecog, then you can just use the template name.
ToScreen is the name of the screen recognition section for the "To" screen. If the screen recognition section is called VSRecog, then you can just use the template name.
EnterKeys are all keystrokes that are a fixed portion of the transition--this does NOT include variable data, such as the input to a customer search criteria screen. It always includes the final AID key.
Navpath if YES, this tag feeds the PATHTO metabase, which enables the use of this definition to perform TEACTION GOTO navigation. The Visual Surfer Identify and Navigate Wizard will set this to YES if all entries made in the transition are retained as "fixed" (no variable entries made during the transition).
Testkeys are the keystrokes, as entered. This enables the navigation to
this screen in test and the "screen change alerts" mode, using the
original test data. This is to be used in development for quick navigation to the
target screen during testing. For example, if there is a test customer
number, the Visual Surfer environment will be able to navigate directly to the
actual results screen in one click of the mouse.
TEDECLARE SCREENCHANGE | |||
---|---|---|---|
| |||
|
Will send the current host screen area defined using row, column and length (which each may be any valid numeric expression) to the current browser page. AS INPUT will send a full HTML INPUT tag including the correct HTML form field name to return any data the user enters back to the current screen in the specified location.
Only use the AS INPUT clause for true 3270 unprotected (entry) areas, as using it in a protected area will cause a runtime error and error text to be displayed to the user.
AS OUTPUT is the default, which simply sends the specified data as unformatted text.
AS "USEREXT" represents any tag provided by user extension DLL's, which
can format the data in a customized manner. The keywords supported (in
place of the "USEREXT" token) are defined by the user extension DLL's.
The SAMPLE.DLL user extension provides the AS BOLD extension to this tag.
<TEAREA topLeftRow topLeftColumn bottomRightRow bottomRightColumn [AS USEREXT optional parms] [AS CLICKABLE {TranID | JavaScript="JavaFunctionName"}] [READONLY] [WRAPINPUT] [SELECTABLE] [BREAKONBLANK]>
Sends the specified rectangle from the current host screen to the active HTML page-- note that the data will need to be pre-pended with a <PRE> tag and followed with a </PRE> tag if the formatting of the fixed-font 3270 screen is to be preserved. Any unprotected (entry) fields found in the area will be sent as HTML INPUT tags.
AS "USEREXT" supports user extension DLL's which can format the data in a customized manner. The keywords supported (in place of the USEREXT token) are defined by the user extension DLL's. The SAMPLE.DLL user extension provides the AS READONLY (no entry fields are created) and AS PLAIN (no <PRE> tags are generated) extensions to this tag.
AS CLICKABLE supports the generation of unique links surrounding each protected field in the TEAREA-- this will create a URL that can be captured with a <TESECTION WHEN TranPath...> section (a transaction section). The URL will include values for C_POS (cursor position), SessionKey and ScreenID, all of which can be used to interact with the current host screen session. Note that the links will target an alternate browser window named "3270tranid".
Note that when using the AS CLICKABLE, you can also enter the keyword JavaScript=, followed by the name of a Javascript function that will need to be defined in some manner in the HTML page currently being generated.
The called Javascript function should have a single parameter, which will be the cursor position of the field that is being given a link.
[READONLY] Prevents the generation of any INPUT form objects should there be any unprotected fields within the specified area. Use this attribute any time the user should be able to see the data but not be able to change it.
[WRAPINPUT] Will cause input fields to be broken and contintued on the next line. By default, if an unprotected field on the 3270 display runs past the end of one line and continues on the next, the TEAREA tag will only generate a single input field in the current form, making the "size" of the field the visual size it takes on the first line, and the "maxlength" attribute equal to the total size of the field on the screen. Use WRAPINPUT to override this default behavior and break the field up into multiple HTML INPUT tags.
[SELECTABLE] When Screen.SelectClicks is set to "off" or 0, you can make individual areas of a 3270 screen support the SELECTABLE attribute with this setting. Selectable fields are used commonly in the health industry to enable the selection and triggering of events with a light pen (or in the case of a PC, with the mouse). When a protected field has the selectable attribute and SELECTABLE is used in the TEAREA (or Screen.SelectClicks=1), the TEAREA tag will generate special links that manage the emulation of the light pen when the user at the browser clicks on fields with the mouse.
[BREAKONBLANK] When AS CLICKABLE is specified, or SELECTABLE, use BREAKONBLANK to treat each "word" on the screen as an individual HTML field. This allows the cursor location to be set to individual words on the screen rather than individual fields. In some applications, the cursor location is critical to individual areas within a large field-- when combined with the CLICKABLE support, you can zero-in on any word within a field using BREAKONBLANK.
TEAREA Simple Clickable Example | |||
---|---|---|---|
| |||
|
TEAREA Clickable JavaScript Example | |||
---|---|---|---|
| |||
|
You can use the TESHOW tag to display text in the current HTML stream.
Any text expression is valid (see the <TESET>
tag for examples).
TESHOW Examples | |||
---|---|---|---|
| |||
|
<TEFIELD [var=]VariableName [[dhtmlFunc=]JavaScript handler] [[length=]Length of field (maxlength)] [[attrs=]Customization properties]> [[formName=]Name the field should have in the HTML form]>Parameters:
Parameter | Use | Default |
---|---|---|
var | Variable full name, usually a variable inside a screenmap, so it's screenmapname.varname. | No default--required value |
dhtmlFunc | The DHTML function used to generate the data entry or presentation HTML for the field. | Value set in the ScreenMap definition for this field. |
Length | Maximum data length for the field if a data entry field. | Value set in the screenmap definition for this field. |
Attrs | URL-encoded (safe) set of name-value pairs providing customization properties to the DHTML function. | Value set in the screenmap definition for this field. |
FormName | Name the field should be given inside the document.Surf_Form object. | Variable name without the screenmap prefix. |
The TEField tag will "package" the active value for a ScreenSurfer surferscript variable into a call to a Javascript function, along with customization properties for the field.
This tag is principally used by the Visual Surfer Screen Object Wizard as part of the Visual Surfer HTML forms generation framework, but it can be called independently as long as the attributes are managed properly in the field's screenmap entry (or in the tag itself).
Javascript functions used to generate the DHTML are provided by Teamstudio, by Teamstudio business partners or customers. Additional functions may be registered in the userdefs.js file (\screensurfer\hostserver\docs\devtool) and may be authored in a .JS file, which should then be included in the call to global.header in the global module (edit in the Visual Surfer global settings wizard).
The TEFORM tag will generate a <FORM> HTML tag while synchronizing and automating the <FORM tag with the active session. The TEFORM tag replaces the <TEMACRO TERMFORM> tag, which will not be enhanced any further.
TEFORM Generate an HTML Form for use as a terminal emulation form
Syntax:
<TEFORM
[[name=]NameExpression]
[[transaction=]TargetTransactionExpression]
[[extra=]ExtraScriptExpression]
[[selectable=]"yes" or "no"]>
Parameters:
Parameter Use Default
name
Name of the form as generated for scripting purposes
Surf_Form
transaction
Target SurferScript transaction-- enables web-driven SurferScript more flexibly than when the <TEEVENT WEBINPUT> tag is used.
/surfer/emulator (internal Screensurfer emulation transaction)
extra
Any additional JavaScript you wish to have inside the <FORM> tag
none
Selectable
When set to "yes", will generate supporting JavaScript for selectable fields (light-pen or cursor-selectable fields). You can cause this to occur on a global (constant) basis by setting Screen.SelectClicks to 1 or "true". When Screen.SelectClicks is not on, you use the "SELECTABLE" attribute in your <TEAREA> tags in conjunction with this setting in <TEFORM> to make selectable fields inside the TEAREA mouse selectable in the browser page.
no
Simple TEFORM Example | |||
---|---|---|---|
| |||
|
Selectable Fields TEFORM Example | |||
---|---|---|---|
| |||
|