|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--HTMLUtils
HTMLUtils is a collection static methods that can be used to print out HTML constructs such as form widgets and tables. All methods accept PrintWriter objects to print out to.
| Constructor Summary | |
HTMLUtils()
|
|
| Method Summary | |
static void |
printError(java.io.PrintWriter out,
java.lang.String errorMsg)
Prints out an error message in a new paragraph. |
static void |
printException(java.io.PrintWriter out,
java.lang.Exception e)
Prints out an exception and its stack trace to the HTML page. |
static void |
printExpireTags(java.io.PrintWriter out)
Prints out meta-tags regcogized by various browsers, telling them not to cache the page. |
static void |
printFooter(java.io.PrintWriter out)
Prints out a standard footer to an HTML page. |
static void |
printHeader(java.io.PrintWriter out,
java.lang.String title)
Prints out a standard header to an HTML page. |
static void |
printRedirectPage(java.io.PrintWriter out,
java.lang.String msg,
java.lang.String url)
Prints out a page that will redirect the user to another page using JavaScript. |
static void |
printSelect(java.io.PrintWriter out,
java.lang.String description,
java.lang.String name,
java.util.HashMap options,
java.lang.String defSelection)
Prints out an HTML form select (Usually rendered natively as a combo box). |
static void |
printTable(java.io.PrintWriter out,
java.util.Collection format)
Prints out an HTML table to an HTML Page. |
static void |
printTextBox(java.io.PrintWriter out,
java.lang.String type,
java.lang.String description,
java.lang.String name,
java.lang.String sideText,
java.lang.String size,
java.lang.String maxSize)
Prints out an HTML form input object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HTMLUtils()
| Method Detail |
public static void printExpireTags(java.io.PrintWriter out)
throws java.io.IOException
out - The PrintWriter to print to.
java.io.IOException - if an error occurs while writing to the PrintWriter.
public static void printRedirectPage(java.io.PrintWriter out,
java.lang.String msg,
java.lang.String url)
throws java.io.IOException
out - The PrintWriter to print to.msg - A message to display to the user specific to why a redirection is occuring.url - The absolute or relative path to redirect the user to.
java.io.IOException - if an error occurs while writing to the PrintWriter.
public static void printHeader(java.io.PrintWriter out,
java.lang.String title)
throws java.io.IOException
out - The PrintWriter to print to.title - A message to display in the title bar of the browser.
java.io.IOException - if an error occurs while writing to the PrintWriter.
public static void printTable(java.io.PrintWriter out,
java.util.Collection format)
throws java.io.IOException
out - The PrintWriter to print to.format - A collection of String objects. See system documentation for details.
java.io.IOException - if an error occurs while writing to the PrintWriter.
public static void printSelect(java.io.PrintWriter out,
java.lang.String description,
java.lang.String name,
java.util.HashMap options,
java.lang.String defSelection)
throws java.io.IOException
out - The PrintWriter to print to.description - A message to be displayed on top of the select object.name - The name field of the select object.options - A HashMap mapping option names to values.defSelection - The option selected by default (this can be null).
java.io.IOException - if an error occurs while writing to the PrintWriter.
public static void printTextBox(java.io.PrintWriter out,
java.lang.String type,
java.lang.String description,
java.lang.String name,
java.lang.String sideText,
java.lang.String size,
java.lang.String maxSize)
throws java.io.IOException
out - The PrintWriter to print to.type - The type of the input object (ex. text, password, button, etc.)description - A message to appear on top of the input object.name - The name field of the input object.sideText - A String to appear on the side of the input object. (can be null)size - the number of characters wide the input object is.maxSize - the maximum number of characters allowed to be entered.
java.io.IOException - if an error occurs while writing to the PrintWriter.
public static void printFooter(java.io.PrintWriter out)
throws java.io.IOException
out - The PrintWriter to print to.
java.io.IOException - if an error occurs while writing to the PrintWriter.
public static void printError(java.io.PrintWriter out,
java.lang.String errorMsg)
throws java.io.IOException
out - The PrintWriter to print to.errorMsg - The message to print.
java.io.IOException - if an error occurs while writing to the PrintWriter.
public static void printException(java.io.PrintWriter out,
java.lang.Exception e)
throws java.io.IOException
out - The PrintWriter to print to.e - the exception to print.
java.io.IOException - if an error occurs while writing to the PrintWriter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||