|
Decision Center API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ilog.webui.dhtml.IlxWUtil
public class IlxWUtil
Utility methods.
Method Summary | |
---|---|
static String |
escape(String s)
Escapes the given text into a JavaScript string. |
static boolean |
hasSessionExpired(javax.servlet.http.HttpSession session)
|
static void |
prettyPrintBOM(Reader reader,
Writer out)
Formats the BOM code read in the given reader in an HTML block. |
static void |
prettyPrintIrl(Reader reader,
Writer out)
Formats the IRL code read in the given reader in an HTML block. |
static void |
prettyPrintJava(Reader reader,
Writer out)
Formats the Java code read in the given reader in an HTML block. |
static void |
prettyPrintJSP(Reader reader,
Writer out)
Formats the JSP code read in the given reader in an HTML block. |
static void |
sendLoadURL(javax.servlet.http.HttpServletResponse response,
String url)
Prints an HTML page containing a script block that asks the browser to request the specified URL. |
static void |
setClientStatus(String message)
Asks to modify the status of the browser window with the given message. |
static String |
toHtml(Color color)
Converts the given AWT color to an hexadecimal string representation of the color. |
static String |
toHtml(String s)
Converts the given string into an HTML string. |
static String |
toXml(String s)
Converts the given string into an XML string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String toHtml(String s)
This method is similar to toXml(java.lang.String)
except that it generates
some special HTML text for special characters:
public static String toXml(String s)
public static String escape(String s)
The surrounding quotes are not included; they must be placed by the caller.
public static String toHtml(Color color)
For instance Color.white
is converted
into "#FFFFF"
.
color
- An AWT color. May be null
.
null
if the given color is
null
.public static void setClientStatus(String message)
This will be done using the current port and adding a JavaScript command to it, which will be executed when the response associated with the port will be sent to the client.
message
- The message to display.IlxWPort.getCurrentPort()
public static void sendLoadURL(javax.servlet.http.HttpServletResponse response, String url) throws IOException
This method performs almost the same job as
HttpServletResponse.sendRedirect
, but is safer, since
sendRedirect
has a bad behavior on IE5.0 and IE5.5.
Actually, when redirecting the response to a given URL, the caching
headers are not taken into account by the browser and the page
is directly reloaded from the IE cache. This has been fixed in IE6.0.
For optimal portability, use sendLoadURL
instead of sendRedirect
.
IOException
public static void prettyPrintJSP(Reader reader, Writer out)
public static void prettyPrintBOM(Reader reader, Writer out)
public static void prettyPrintJava(Reader reader, Writer out)
public static void prettyPrintIrl(Reader reader, Writer out)
public static boolean hasSessionExpired(javax.servlet.http.HttpSession session)
|
Decision Center API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |