|
LogWeb V3 Default Emulator (AJAX based) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--lw
The global lw Object.
Primarily contains the basic logging utilities, such as log(), debug, showException().
Many sub-objects will be added by other include files.
Note: the standard logger function requires lw.JSON sub-object.
Defined in lw.js
Nested Class Summary | |
<static class> |
lw.Cookie |
<static class> |
lw.Menu |
<static class> |
lw.login |
<static class> |
lw.env |
Field Summary | |
<static> {int} |
debug
the current log level for the logger function used in log(). |
<static> {Function} |
logger
Holds the current log routine called in log(). |
Constructor Summary | |
lw
()
The global lw Object. |
Method Summary | |
<static> String
|
clean(<String> str)
In the specified String, replaces all control chars (< ASCII 32) by SPACE |
<static> StringArray
|
extractKeys(obj)
from the specified Object, extracs all keys. |
<static> void
|
log(<String> text, <Object> obj)
Log the specified text and object. |
<static> void
|
log1(<String> str, <Object> obj)
logs errors1 only |
<static> void
|
log2(<String> str, <Object> obj)
logs errors1, warnings2, and important2 |
<static> void
|
log3(<String> str, <Object> obj)
logs errors1, warnings2, important2, and detail3 |
<static> void
|
log4(<String> str, <Object> obj)
logs errors1, warnings2, important2, detail3, and test4 |
<static> void
|
log5(<String> str, <Object> obj)
logs errors1, warnings2, important2, detail3, test4, and test5 |
<static> void
|
logAlert(<String> text)
Log routine: alerts the specified text. |
<static> void
|
logArea(<String> text)
Log routine: Logs the specified String to TEXTAREA. |
<static> void
|
logNothing(<String> text)
Empty log routine: does not log the specified text. |
<static> String
|
logText(<String> text)
Helper for Log routine: Prepends time stamp to log text. |
<static> void
|
logWin(<String> text)
Log routine: Logs the specified String in Browser Window "LWDebug". |
<static> Node
|
node(<String_Node> id)
Returns the node for the specified id. |
<static> boolean
|
removeOption(<String_Node> node, <String> value)
In the specified SELECT node, removes the OPTION with the specified VALUE. |
<static> boolean
|
selectOption(<String_Node> node, <String> value)
In the specified SELECT node, selects the OPTION with the specified VALUE. |
<static> Node
|
setSelectOptions(<String_Node> node, <int> startIndex, <StringArray_Object> arrText, arrValue)
In the specified SELECT node, removes existing OPTIONs and appends new OPTIONs. |
<static> void
|
showException(<Exception> myErr, <String> prefix)
Shows an exception message caught in a try/catch statement. |
<static> Object
|
showOnerror(<String> msg, <String> url, <String> line)
Callback from window.onerror: Alerts error message. |
<static> String
|
trim(<String> str, <boolean> clean)
Removes all leading and trailing Spaces from the specified String. |
Field Detail |
<static> {int} debug
<static> {Function} logger
Constructor Detail |
lw()
Method Detail |
<static> String clean(<String> str)
str
- the String to be cleaned.
<static> StringArray extractKeys(obj)
the
- object (Associative Array)
<static> void log(<String> text, <Object> obj)
text
- the log text
obj
- optional: the object to be logged in JSON format
<static> void log1(<String> str, <Object> obj)
str
- the text to be logged
obj
- optional: an Object to be JSON encoded
<static> void log2(<String> str, <Object> obj)
str
- the text to be logged
obj
- optional: an Object to be JSON encoded
<static> void log3(<String> str, <Object> obj)
str
- the text to be logged
obj
- optional: an Object to be JSON encoded
<static> void log4(<String> str, <Object> obj)
str
- the text to be logged
obj
- optional: an Object to be JSON encoded
<static> void log5(<String> str, <Object> obj)
str
- the text to be logged
obj
- optional: an Object to be JSON encoded
<static> void logAlert(<String> text)
text
- the text to be logged
<static> void logArea(<String> text)
lw.logger = lw.logArea; lw.logger.area = nodeTextarea;
text
- the text to be logged
<static> void logNothing(<String> text)
text
- the text to be logged
<static> String logText(<String> text)
text
- the text to be logged
<static> void logWin(<String> text)
text
- the text to be logged
<static> Node node(<String_Node> id)
window.document.getElementById(id);
lw.node(lw.node(id))
id
- the id of the node, or the node.
<static> boolean removeOption(<String_Node> node, <String> value)
node
- the id of the SELECT node, or the SELECT Node
value
- the OPTION.VALUE to be removed.
<static> boolean selectOption(<String_Node> node, <String> value)
node
- the id of the SELECT node, or the SELECT Node
value
- the OPTION.VALUE to be selected.
<static> Node setSelectOptions(<String_Node> node, <int> startIndex, <StringArray_Object> arrText, arrValue)
node
- the id of the SELECT node, or the SELECT Node
startIndex
- if >= 0: the index of the first OPTION to be removed; else: no OPTION will be removed
arrText
- optional: usually a String Array containing the OPTION.TEXT to be appended
arrText
- optional: usually a String Array containing the OPTION.VALUE to be appended
<static> void showException(<Exception> myErr, <String> prefix)
myErr
- the Exception caught
prefix
- optional: a text to be prefixed; if missing: prefix "Error: "
<static> Object showOnerror(<String> msg, <String> url, <String> line)
msg
- the error message
url
- the url
line
- the line where the error occured
<static> String trim(<String> str, <boolean> clean)
str
- the String to be trimmed.
clean
- if missing or true: additionally cleans the String
|
LogWeb V3 Default Emulator (AJAX based) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |