|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cometway.httpd.HTMLFormWriter
com.cometway.httpd.XHTMLFormWriter
public class XHTMLFormWriter
XHTMLFormWriter is a tool for writing simple XHTML-based forms to a StringBuffer or AgentRequest output stream. Using this class it is relatively simple to create generic forms without worrying about the XHTML code.
| Constructor Summary | |
|---|---|
XHTMLFormWriter(AgentRequest agentRequest)
Use this constructor to write XHTML and CSS forms directly to an AgentRequest. |
|
XHTMLFormWriter(java.lang.StringBuffer b)
Use this constructor to write XHTML forms to a StringBuffer. |
|
| Method Summary | |
|---|---|
protected java.lang.String |
encode(java.lang.String in)
|
void |
writeCaption(java.lang.String caption)
Adds a caption to the form output. |
void |
writeCheckbox(java.lang.String label,
java.lang.String name,
boolean checked)
Writes a checkbox to the form output. |
void |
writeField(java.lang.String label,
java.lang.String name,
int size)
Writes a standard input field to the form output. |
void |
writeField(java.lang.String label,
java.lang.String name,
Props p,
int size)
Writes a standard input field to the form output displaying the value as retrieved from the Props using the specified name as the Props key. |
void |
writeField(java.lang.String label,
java.lang.String name,
java.lang.String value,
int size)
Writes a standard input field to the form output displaying the specified value. |
void |
writeFooter()
Writes the form footer to the output. |
void |
writeHeader(java.lang.String submitURL)
Writes the form header to the output. |
void |
writeHeader(java.lang.String submitURL,
Props userProps)
Writes the form header to the output. |
void |
writeHelp(java.lang.String message)
Adds a help description over the fields. |
void |
writeHiddenField(java.lang.String name,
Props p)
Writes a hidden input parameter to the form output as retrieved from the Props using the specified name as the Props key. |
void |
writeHiddenField(java.lang.String name,
java.lang.String value)
Writes a hidden input parameter to the form output. |
protected void |
writeLabel(java.lang.String title)
|
protected void |
writeLabel(java.lang.String title,
java.lang.String name)
|
void |
writeLoginFields(Props p)
Hidden "login_name" and "login_hash" parameters are added to the form output using the "name" and "password" values of the specified Props. |
void |
writeLoginFields(java.lang.String name,
java.lang.String password)
Hidden "login_name" and "login_hash" parameters are added to the form output using the specified name and password. |
void |
writeMultilineField(java.lang.String label,
java.lang.String name,
int columns,
int rows)
Writes a multiline field (TEXTAREA) to the form output. |
void |
writeMultilineField(java.lang.String label,
java.lang.String name,
Props p,
int columns,
int rows)
Writes a multiline field (TEXTAREA) to the form output displaying the specified value as retrieved from the Props using the specified name as a key. |
void |
writeMultilineField(java.lang.String label,
java.lang.String name,
java.lang.String value,
int columns,
int rows)
Writes a multiline field (TEXTAREA) to the form output displaying the specified value. |
void |
writePassword(java.lang.String label,
java.lang.String name,
int size)
Writes a password input field to the form output. |
void |
writePassword(java.lang.String label,
java.lang.String name,
java.lang.String value,
int size)
Writes a password input field to the form output containing the specified value. |
void |
writeProps(Props p)
Writes a table containing the Props keys and associated values to the output. |
void |
writeResetButton(java.lang.String title,
java.lang.String description)
Writes a reset button and description to the form output that resets changes to the form when pressed. |
void |
writeSelectFooter()
Writes the footer XHTML for a SELECT to the form output. |
void |
writeSelectHeader(java.lang.String label,
java.lang.String name,
boolean multiple)
Writes the header XHTML for a SELECT to the form output to display a popup menu or selection list. |
void |
writeSelectItem(java.lang.String name,
java.lang.String value,
boolean selected)
Writes a SELECT OPTION to the form output. |
void |
writeSelectItem(java.lang.String name,
java.lang.String value,
java.lang.String currentSelection)
Writes a SELECT OPTION to the form output. |
void |
writeSpace()
Writes appropriate XHTML to the output to add vertical space between form items. |
void |
writeStaticField(java.lang.String label,
java.lang.String value)
Writes a static text field to the form output. |
void |
writeStaticField(java.lang.String label,
java.lang.String name,
java.lang.String value,
int size)
Writes a static text field to the form output. |
void |
writeSubmitButton(java.lang.String title,
java.lang.String name,
java.lang.String description)
Writes a submit button and description to the form output. |
| Methods inherited from class com.cometway.httpd.HTMLFormWriter |
|---|
print, print, println, println, writeCheckbox |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XHTMLFormWriter(AgentRequest agentRequest)
public XHTMLFormWriter(java.lang.StringBuffer b)
| Method Detail |
|---|
public void writeCaption(java.lang.String caption)
throws java.io.IOException
writeCaption in class HTMLFormWriterjava.io.IOException
public void writeCheckbox(java.lang.String label,
java.lang.String name,
boolean checked)
throws java.io.IOException
writeCheckbox in class HTMLFormWriterjava.io.IOException
public void writeFooter()
throws java.io.IOException
writeFooter in class HTMLFormWriterjava.io.IOException
public void writeHeader(java.lang.String submitURL)
throws java.io.IOException
writeHeader in class HTMLFormWriterjava.io.IOException
public void writeHeader(java.lang.String submitURL,
Props userProps)
throws java.io.IOException
writeHeader in class HTMLFormWriterjava.io.IOException
public void writeHelp(java.lang.String message)
throws java.io.IOException
writeHelp in class HTMLFormWriterjava.io.IOException
public void writeSpace()
throws java.io.IOException
writeSpace in class HTMLFormWriterjava.io.IOException
public void writeField(java.lang.String label,
java.lang.String name,
int size)
throws java.io.IOException
writeField in class HTMLFormWriterjava.io.IOException
public void writeField(java.lang.String label,
java.lang.String name,
java.lang.String value,
int size)
throws java.io.IOException
writeField in class HTMLFormWriterjava.io.IOException
public void writeField(java.lang.String label,
java.lang.String name,
Props p,
int size)
throws java.io.IOException
writeField in class HTMLFormWriterjava.io.IOException
public void writeHiddenField(java.lang.String name,
java.lang.String value)
throws java.io.IOException
writeHiddenField in class HTMLFormWriterjava.io.IOException
public void writeHiddenField(java.lang.String name,
Props p)
throws java.io.IOException
writeHiddenField in class HTMLFormWriterjava.io.IOException
public void writeLoginFields(java.lang.String name,
java.lang.String password)
throws java.io.IOException
writeLoginFields in class HTMLFormWriterjava.io.IOException
public void writeLoginFields(Props p)
throws java.io.IOException
writeLoginFields in class HTMLFormWriterjava.io.IOException
public void writeMultilineField(java.lang.String label,
java.lang.String name,
int columns,
int rows)
throws java.io.IOException
writeMultilineField in class HTMLFormWriterjava.io.IOException
public void writeMultilineField(java.lang.String label,
java.lang.String name,
java.lang.String value,
int columns,
int rows)
throws java.io.IOException
writeMultilineField in class HTMLFormWriterjava.io.IOException
public void writeMultilineField(java.lang.String label,
java.lang.String name,
Props p,
int columns,
int rows)
throws java.io.IOException
writeMultilineField in class HTMLFormWriterjava.io.IOException
public void writePassword(java.lang.String label,
java.lang.String name,
int size)
throws java.io.IOException
writePassword in class HTMLFormWriterjava.io.IOException
public void writePassword(java.lang.String label,
java.lang.String name,
java.lang.String value,
int size)
throws java.io.IOException
writePassword in class HTMLFormWriterjava.io.IOException
public void writeProps(Props p)
throws java.io.IOException
writeProps in class HTMLFormWriterjava.io.IOException
public void writeResetButton(java.lang.String title,
java.lang.String description)
throws java.io.IOException
writeResetButton in class HTMLFormWriterjava.io.IOException
public void writeSelectFooter()
throws java.io.IOException
writeSelectFooter in class HTMLFormWriterjava.io.IOException
public void writeSelectHeader(java.lang.String label,
java.lang.String name,
boolean multiple)
throws java.io.IOException
writeSelectHeader in class HTMLFormWriterjava.io.IOException
public void writeSelectItem(java.lang.String name,
java.lang.String value,
boolean selected)
throws java.io.IOException
writeSelectItem in class HTMLFormWriterjava.io.IOException
public void writeSelectItem(java.lang.String name,
java.lang.String value,
java.lang.String currentSelection)
throws java.io.IOException
writeSelectItem in class HTMLFormWriterjava.io.IOException
public void writeStaticField(java.lang.String label,
java.lang.String value)
throws java.io.IOException
writeStaticField in class HTMLFormWriterjava.io.IOException
public void writeStaticField(java.lang.String label,
java.lang.String name,
java.lang.String value,
int size)
throws java.io.IOException
java.io.IOException
public void writeSubmitButton(java.lang.String title,
java.lang.String name,
java.lang.String description)
throws java.io.IOException
writeSubmitButton in class HTMLFormWriterjava.io.IOExceptionprotected java.lang.String encode(java.lang.String in)
encode in class HTMLFormWriter
protected void writeLabel(java.lang.String title)
throws java.io.IOException
java.io.IOException
protected void writeLabel(java.lang.String title,
java.lang.String name)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||