Expresso 5-6

com.jcorporate.expresso.services.html
Class Form

java.lang.Object
  extended bycom.jcorporate.expresso.services.html.HtmlElement
      extended bycom.jcorporate.expresso.services.html.Form

public class Form
extends HtmlElement

An HTML form

Version:
$Revision $Date: 2004/11/17 20:48:18 $
Author:
Michael Nash

Field Summary
 
Fields inherited from class com.jcorporate.expresso.services.html.HtmlElement
attributes, contents, cSSClass, cSSID
 
Constructor Summary
Form()
          Constructor
Form(HtmlElement newElement)
          Constructor Create a form with the contents of the given element
Form(String newName)
          Constructor
 
Method Summary
protected  void display(PrintWriter out, int depth)
          Display the form
 void setAction(String newAction)
          Set the "action" field of this form - what happens when the form is submitted
 void setEncoding(String newEncoding)
          Set the "enctype" field of this form - sets the encoding of the request to the server
 void setMethod(String newMethod)
          Set the "method" of this form - post or get
 
Methods inherited from class com.jcorporate.expresso.services.html.HtmlElement
add, display, finalize, getAttribute, getContentCount, getCSSClass, getName, padWithTabs, setAttribute, setCSSClass, setCSSID, setDisplayed, setName, setParent
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Form

public Form()
     throws HtmlException
Constructor

Throws:
HtmlException - If the superclass constructor fails

Form

public Form(HtmlElement newElement)
     throws HtmlException
Constructor Create a form with the contents of the given element

Parameters:
newElement - An HTML element to be the contents of this form
Throws:
HtmlException - If the parameter is invalid

Form

public Form(String newName)
     throws HtmlException
Constructor

Parameters:
newName - Name of the form
Throws:
HtmlException - if the parameter is invalid or the superclass constructor fails
Method Detail

display

protected void display(PrintWriter out,
                       int depth)
                throws HtmlException
Display the form

Specified by:
display in class HtmlElement
Parameters:
depth - the number of tabs to indent
out - PrintWriter for display
Throws:
HtmlException - If there is an error displaying the form

setAction

public void setAction(String newAction)
               throws HtmlException
Set the "action" field of this form - what happens when the form is submitted

Parameters:
newAction - New Action field for this form
Throws:
HtmlException - if the parameter is invalid

setEncoding

public void setEncoding(String newEncoding)
                 throws HtmlException
Set the "enctype" field of this form - sets the encoding of the request to the server

Parameters:
newEncoding - New ENCTYPE field for this form
Throws:
HtmlException - if the parameter is invalid

setMethod

public void setMethod(String newMethod)
               throws HtmlException
Set the "method" of this form - post or get

Parameters:
newMethod - POST or GET
Throws:
HtmlException - If the parameter is invalid

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.