|
LogWeb V3 Default Emulator (AJAX based) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--lw.env
Holds all methods for environment handling before actually calling the AJAX emulator.
Defined in doLogin.jsp
Field Summary | |
<static> {Applet} |
ajaxapplet
The applet embedded in this page, initially undefined. |
<static> {Array} |
allClientIP
All Client IP Addresses as returned by the loaded applet, initially empty. |
<static> {boolean} |
autoStart
Specifies if the ajax client is started automatically. |
<static> {String} |
clientIP
The Client IP Address as returned by the loaded applet, initially empty. |
<static> {Object} |
environment
The current environment as read by the loaded applet, initially empty. |
Constructor Summary | |
lw.env
()
Holds all methods for environment handling. |
Method Summary | |
<static> String
|
buildPoolname(<String> name, <int> number)
Replaces the first sequence of question marks with the appropriate padded number. |
<static> boolean
|
collectParams()
User callback: Extracts the necessary information from the environment or the text fields on this page. |
<static> void
|
createAppletTag(<node> button)
Dynamically creates the applet tag for the ajax applet providing the names of the callback functions and puts it into the designated div element. |
<static> String
|
getClientIP(<Object> hdr)
Extracts the Client IP Address from the specified HTTP headers. |
<static> void
|
login()
Processes the user callback collectParams() first and fills the InputForm from the resulting lwData object. |
Field Detail |
<static> {Applet} ajaxapplet
<static> {Array} allClientIP
<static> {boolean} autoStart
<static> {String} clientIP
<static> {Object} environment
Constructor Detail |
lw.env()
Method Detail |
<static> String buildPoolname(<String> name, <int> number)
name
- required: the name possibly containing question marks
number
- required: the number
<static> boolean collectParams()
This is the starting point for customizations of the required values from the local (client) environment.
The local environment must be retrieved by a Java Applet first that will be
started automatically in function myOnload
.
Example 1:
Set up a station pool name without using a displayed text field.
// to get the computer name, check for terminal server client first var computername = lw.env.environment['CLIENTNAME']; if (!computername || computername == "Console") { computername = lw.env.environment['COMPUTERNAME']; } if (computername) { // you may need to change the pattern for building the poolname. // question mark(s) will be replaced by the next available session index. lwData.LOGWEB_StationName = lw.env.buildPoolname(computername + "??S", sessionIndex); lwData.LOGWEB_PrinterName = lw.env.buildPoolname(computername + "??P", sessionIndex); }
Example 2:
Create a startup macro using the currently logged in local user.
var username = lw.env.environment['USERNAME']; if (username) { username = lw.env.buildPoolname(username + "?", sessionIndex); lwData["LOGWEB_$-autoinit"] = '"<WAIT>nat sys=prod,etid=' + username + '<DUE1>"'; }
Example 3:
Provide the client IP address in the Unix VT environment variable "PRINTER"
and the user name in the variable "USER"
var address = lw.env.clientIP.split('/')[1]; if (address) { lwData._VTEnvironment_PRINTER = address; } var username = lw.env.environment['USERNAME']; if (username) { lwData._VTEnvironment_USER = username; }
Example 4:
display Station and Printer name in the AJAX status line if present
if (lwData.LOGWEB_StationName || lwData.LOGWEB_PrinterName) { lwData._StatusText = lwData.LOGWEB_StationName + "/" + lwData.LOGWEB_PrinterName; }
true
if parameters have been set successfully. If an error occurred this method notifies the user and returns false
<static> void createAppletTag(<node> button)
button
- the button that activates this function. The button will be disabled to ensure the applet is loaded only once.
<static> String getClientIP(<Object> hdr)
hdr
- the HTTP headers as received by the server
<static> void login()
|
LogWeb V3 Default Emulator (AJAX based) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |