|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.xsp.util.JSUtil
public class JSUtil
Some basic client side JavaScript utilities.
Constructor Summary | |
---|---|
JSUtil()
|
Method Summary | |
---|---|
static void |
addBoolean(java.lang.StringBuilder b,
boolean value)
Add a boolean value as part of the string your building |
static void |
addDouble(java.lang.StringBuilder b,
double value)
Add a number as part of the string your building |
static void |
addInt(java.lang.StringBuilder b,
int value)
Add a number as part of the string your building |
static void |
addLong(java.lang.StringBuilder b,
long value)
Add a number as part of the string your building |
static void |
addMessage(java.lang.StringBuilder b,
java.lang.String s)
Same as addString except the string is translated text which will not contain any backslashes (\) |
static void |
addNumber(java.lang.StringBuilder b,
java.lang.Number value)
Add a number as part of the string your building |
static void |
addString(java.lang.StringBuilder b,
java.lang.String s)
Add a string to a javascript string being constructed |
static void |
addVariable(java.lang.StringBuilder buildingString,
java.lang.String variableName)
Adds a variable parameter for passing to a javascript function |
static void |
appendJavaScriptString(java.lang.StringBuilder b,
java.lang.String s)
Utility for changing a string so that its compatbile in javascript and does not prevent backslashes |
static void |
appendJavaScriptString(java.lang.StringBuilder b,
java.lang.String s,
boolean preventBackslash)
Utility for changing a string so that its compatbile in javascript |
static java.lang.String |
toJavaScriptString(java.lang.String s)
Utility for changing a string so that its compatbile in javascript |
static void |
writeln(javax.faces.context.ResponseWriter writer)
Writes out a "/n" |
static void |
writelnAfterStartTag(javax.faces.context.ResponseWriter writer)
Writes out a "/n", differs from writeln because it closes the start tag, |
static void |
writeTextBlank(javax.faces.context.ResponseWriter writer)
Used to emit a space |
static void |
writeTextBlank(javax.faces.context.ResponseWriter writer,
int count)
Used to emit a space |
static void |
writeTextln(javax.faces.context.ResponseWriter writer)
Just calls writelnAfterStartTag |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JSUtil()
Method Detail |
---|
public static void addMessage(java.lang.StringBuilder b, java.lang.String s)
buildingString
- String being constructedString
- string to be added when its translatedpublic static void addString(java.lang.StringBuilder b, java.lang.String s)
buildingString
- String being constructedString
- string to be added when its convertedpublic static void addVariable(java.lang.StringBuilder buildingString, java.lang.String variableName)
buildingString
- String being constructedvariableName
- Name of variable to addpublic static void addInt(java.lang.StringBuilder b, int value)
buildingString
- String being constructedinteger
- you want to addpublic static void addLong(java.lang.StringBuilder b, long value)
buildingString
- String being constructedLong
- you want to addpublic static void addDouble(java.lang.StringBuilder b, double value)
buildingString
- String being constructeddouble
- you want to addpublic static void addBoolean(java.lang.StringBuilder b, boolean value)
buildingString
- String being constructedboolean
- you want to addpublic static void addNumber(java.lang.StringBuilder b, java.lang.Number value)
buildingString
- String being constructedNumber
- the number you want to addpublic static void appendJavaScriptString(java.lang.StringBuilder b, java.lang.String s)
StringBuilder
- string
- converted to comply with javascriptpublic static void appendJavaScriptString(java.lang.StringBuilder b, java.lang.String s, boolean preventBackslash)
buildingString
- String being constructedstring
- converted to comply with javascriptpreventBackslash
- public static java.lang.String toJavaScriptString(java.lang.String s)
String
- to convert
public static void writeln(javax.faces.context.ResponseWriter writer) throws java.io.IOException
writer
- ResponseWriter
java.io.IOException
public static void writelnAfterStartTag(javax.faces.context.ResponseWriter writer) throws java.io.IOException
writer
- ResponseWriter
java.io.IOException
public static void writeTextln(javax.faces.context.ResponseWriter writer) throws java.io.IOException
writer
- ResponseWriter
java.io.IOException
public static void writeTextBlank(javax.faces.context.ResponseWriter writer) throws java.io.IOException
writer
- ResponseWriter
java.io.IOException
public static void writeTextBlank(javax.faces.context.ResponseWriter writer, int count) throws java.io.IOException
writer
- ResponseWriter
count
-
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |