Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Business Components
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.jdeveloper.html
Class HTMLForm

    java.lang.Object
      |
      +--oracle.jdeveloper.html.HTMLElement
            |
            +--oracle.jdeveloper.html.HTMLElementContainer
                  |
                  +--oracle.jdeveloper.html.HTMLForm

Direct Known Subclasses:
  EditForm

public class HTMLForm
extends HTMLElementContainer

This class represents an HTML FORM. It provides methods for configuring and populating the HTML FORM with input elements such as buttons and edit controls. Since it's derived from HTMLElementContainer it can contain any HTMLElements that you would like to add to it's collection.

Version:
  PUBLIC

Field Summary
`protected boolean` | `bGenerateLabels`
`protected DHTMLButtonBar` | `buttonBar`
`protected java.util.Vector` | `Fields`
`protected java.lang.String` | `sContentType`
`protected java.lang.String` | `target`
`protected java.lang.String` | `theAction`
`protected java.lang.String` | `theName`
`protected java.util.Vector` | `theScripts`
`protected java.util.Vector` | `topButtons`
`protected boolean` | `useJS`

Fields inherited from class oracle.jdeveloper.html.HTMLElementContainer
`Elements`

Fields inherited from class oracle.jdeveloper.html.HTMLElement
`sClassName`

Constructor Summary
`HTMLForm(java.lang.String sAction, java.lang.String sName)` Constructs the HTML FORM object.
`HTMLForm(java.lang.String sAction, java.lang.String sName, java.lang.String sTarget)` Constructs the HTML FORM object.

Method Summary
`void` | `addCheckBoxField(java.lang.String sPrompt, java.lang.String sLabel, java.lang.String sName, java.lang.String sValue, boolean bChecked)` Adds a checkbox field.
`void` | `addFieldElement(HTMLElement elem)` Adds an HTMLElement to the FORM.
`void` | `addHiddenField(java.lang.String sName, java.lang.String sValue)` Adds a hidden field to the FORM.
`void` | `addInputField(java.lang.String sLabel, HTMLInputElement input)`
`void` | `addMultilineTextField(java.lang.String sLabel, java.lang.String sName, java.lang.String sValue)` Adds a multiline text field
`void` | `addMultilineTextField(java.lang.String sLabel, java.lang.String sName, java.lang.String sValue, java.lang.String rows)` Adds a textarea text field with a target number of rows.
`void` | `addMultilineTextField(java.lang.String sLabel, java.lang.String sName, java.lang.String sValue, java.lang.String cols, java.lang.String rows, java.lang.String sClass)` Adds a textarea text field with a target number of rows and columns.
`void` | `addMultilineTextField(java.lang.String sLabel, java.lang.String sName, java.lang.String sValue, java.lang.String cols, java.lang.String rows, java.lang.String sClass, java.lang.String sMaxLength)` Adds a textarea text field with a target number of rows and columns.
`void` | `addPasswordField(java.lang.String sLabel, java.lang.String sName, java.lang.String sValue, int nWidth)` Adds a password field.
`void` | `addRadioButtonField(java.lang.String sPrompt, java.lang.String sLabel, java.lang.String sName, java.lang.String sValue, boolean bChecked)` Adds a radio button field.
`void` | `addReadOnlyField(java.lang.String sLabel, java.lang.String sName, java.lang.String sValue, int nWidth)` Adds a read-only field.
`void` | `addResetButton(java.lang.String sName, java.lang.String sValue)` Adds a RESET button to the form.
`void` | `addScript(HTMLScript aScript)` Adds an HTMLScript to the form.
`void` | `addSelectField(java.lang.String sLabel, HTMLSelect aSelect)` Adds an HTML SELECT field.
`void` | `addSubmitButton(java.lang.String sName, java.lang.String sValue)` Adds a SUBMIT button to the form.
`void` | `addTextField(java.lang.String sLabel, java.lang.String sName, java.lang.String sValue)` Adds a text field.
`void` | `addTextField(java.lang.String sLabel, java.lang.String sName, java.lang.String sValue, int nWidth)` Adds a password field.
`void` | `addTextField(java.lang.String sLabel, java.lang.String sName, java.lang.String sValue, java.lang.String sWidth, java.lang.String sClass)` Adds a password field.
`void` | `addTextField(java.lang.String sLabel, java.lang.String sName, java.lang.String sValue, java.lang.String sWidth, java.lang.String sClass, java.lang.String sMaxLength)` Adds a text field.
`void` | `addTopResetButton(java.lang.String sName, java.lang.String sValue)` Adds a RESET button to the form.
`void` | `addTopSubmitButton(java.lang.String sName, java.lang.String sValue)` Adds a SUBMIT button to the form.
`void` | `addURLTextField(java.lang.String sLabel, java.lang.String URL, java.lang.String sName, java.lang.String sValue)` Adds a text URL field.
`void` | `addWideTextField(java.lang.String sLabel, java.lang.String sName, java.lang.String sValue)` Adds a Wide text field.
`java.lang.String` | `getFormAction()`
`java.lang.String` | `getFormName()`
`void` | `render(java.io.PrintWriter out)` This is the main method for invoking the FORM's rendering
`protected void` | `renderContainerFooter(java.io.PrintWriter out)`
`protected void` | `renderContainerHeader(java.io.PrintWriter out)`
`protected void` | `renderFields(java.io.PrintWriter out)`
`protected void` | `renderScripts(java.io.PrintWriter out)`
`protected void` | `renderTopButtons(java.io.PrintWriter out)`
`void` | `setFormAction(java.lang.String sURL)` Sets the FORM's action to use a different URL than the onw provided via the constructor.
`void` | `setUseJS(boolean bSet)`
`void` | `useDefaultFormat()`
`void` | `useMultiPartFormat()`

Methods inherited from class oracle.jdeveloper.html.HTMLElementContainer
`addElement, addForm, addHeader, addImage, addImageClass, addImageURL, addTable, addTextURL, addToolBar, elementAt, endCenter, numberOfElements, renderElementFooter, renderElementHeader, skipLine, startCenter`

Methods inherited from class oracle.jdeveloper.html.HTMLElement
`fixFieldValueForHTML, getAsString, getCSSClassName, render, setCSSClassName`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### theAction

    protected java.lang.String theAction

### theName

    protected java.lang.String theName

### bGenerateLabels

    protected boolean bGenerateLabels

### Fields

    protected java.util.Vector Fields

### theScripts

    protected java.util.Vector theScripts

### topButtons

    protected java.util.Vector topButtons

### target

    protected java.lang.String target

### useJS

    protected boolean useJS

### buttonBar

    protected DHTMLButtonBar buttonBar

### sContentType

    protected java.lang.String sContentType

Constructor Detail

### HTMLForm

    public HTMLForm(java.lang.String sAction,
                    java.lang.String sName)

  Constructs the HTML FORM object. You provide the URL via the sAction parameter and the FORM nmae via the sName parameter.

### HTMLForm

    public HTMLForm(java.lang.String sAction,
                    java.lang.String sName,
                    java.lang.String sTarget)

  Constructs the HTML FORM object. You provide the URL via the sAction parameter and the FORM nmae via the sName parameter. The sTarget parameter refers to the target window of the form when it gets submitted.

Method Detail

### addScript

    public void addScript(HTMLScript aScript)

  Adds an HTMLScript to the form. The script may contain functions that are called by the HTML FORM and it's fields. The script gets rendered after all the form's content.

### useMultiPartFormat

    public void useMultiPartFormat()

### useDefaultFormat

    public void useDefaultFormat()

### renderScripts

    protected void renderScripts(java.io.PrintWriter out)
                          throws java.lang.Exception

### getFormName

    public java.lang.String getFormName()

### renderContainerHeader

    protected void renderContainerHeader(java.io.PrintWriter out)

  Overrides:
    renderContainerHeader in class HTMLElementContainer

### renderContainerFooter

    protected void renderContainerFooter(java.io.PrintWriter out)
                                  throws java.lang.Exception

  Overrides:
    renderContainerFooter in class HTMLElementContainer

### setUseJS

    public void setUseJS(boolean bSet)

### setFormAction

    public void setFormAction(java.lang.String sURL)

  Sets the FORM's action to use a different URL than the onw provided via the constructor.

### getFormAction

    public java.lang.String getFormAction()

  Returns:
    The current value of the FORM action URL

### addInputField

    public void addInputField(java.lang.String sLabel,
                              HTMLInputElement input)

### addHiddenField

    public void addHiddenField(java.lang.String sName,
                               java.lang.String sValue)

  Adds a hidden field to the FORM. This is very useful for passing additional hidden values with the FORM.

### addFieldElement

    public void addFieldElement(HTMLElement elem)

  Adds an HTMLElement to the FORM. This is a good method to use when you are providing your own classes that are used to populate the FORM's field collection.

### addPasswordField

    public void addPasswordField(java.lang.String sLabel,
                                 java.lang.String sName,
                                 java.lang.String sValue,
                                 int nWidth)

  Adds a password field.
  Parameters:
    `sLabel` - The prompt for the field.
    `sName` - The field name
    `sValue` - The field value
    `nWidth` - The field width

### addReadOnlyField

    public void addReadOnlyField(java.lang.String sLabel,
                                 java.lang.String sName,
                                 java.lang.String sValue,
                                 int nWidth)

  Adds a read-only field.
  Parameters:
    `sLabel` - The prompt for the field.
    `sName` - The field name
    `sValue` - The field value
    `nWidth` - The field width

### addSelectField

    public void addSelectField(java.lang.String sLabel,
                               HTMLSelect aSelect)

  Adds an HTML SELECT field.
  Parameters:
    `sLabel` - The prompt for the field.
    `aSelect` - The HTMLSelect fiedl to be added.

### addTextField

    public void addTextField(java.lang.String sLabel,
                             java.lang.String sName,
                             java.lang.String sValue)

  Adds a text field.
  Parameters:
    `sLabel` - The prompt for the field.
    `sName` - The field name
    `sValue` - The field value

### addTextField

    public void addTextField(java.lang.String sLabel,
                             java.lang.String sName,
                             java.lang.String sValue,
                             int nWidth)

  Adds a password field.
  Parameters:
    `sLabel` - The prompt for the field.
    `sName` - The field name
    `sValue` - The field value
    `nWidth` - The field width

### addTextField

    public void addTextField(java.lang.String sLabel,
                             java.lang.String sName,
                             java.lang.String sValue,
                             java.lang.String sWidth,
                             java.lang.String sClass)

  Adds a password field.
  Parameters:
    `sLabel` - The prompt for the field.
    `sName` - The field name
    `sValue` - The field value
    `nWidth` - The field width
    `sClass` - The CSS class name

### addCheckBoxField

    public void addCheckBoxField(java.lang.String sPrompt,
                                 java.lang.String sLabel,
                                 java.lang.String sName,
                                 java.lang.String sValue,
                                 boolean bChecked)

  Adds a checkbox field.
  Parameters:
    `sPrompt` - The prompt for the field.
    `sLabel` - The label for the field.
    `sName` - The field name
    `sValue` - The field value
    `bChecked` - The field's checked state

### addRadioButtonField

    public void addRadioButtonField(java.lang.String sPrompt,
                                    java.lang.String sLabel,
                                    java.lang.String sName,
                                    java.lang.String sValue,
                                    boolean bChecked)

  Adds a radio button field.
  Parameters:
    `sPrompt` - The prompt for the field.
    `sLabel` - The label for the field.
    `sName` - The field name
    `sValue` - The field value
    `bChecked` - The field's checked state

### addTextField

    public void addTextField(java.lang.String sLabel,
                             java.lang.String sName,
                             java.lang.String sValue,
                             java.lang.String sWidth,
                             java.lang.String sClass,
                             java.lang.String sMaxLength)

  Adds a text field.
  Parameters:
    `sLabel` - The label for the field.
    `sName` - The field name.
    `sValue` - The field value.
    `sWidth` - The field width.
    `sClass` - The field's CSS class name.
    `sMaxLength` - The maximum data length for the field.

### addURLTextField

    public void addURLTextField(java.lang.String sLabel,
                                java.lang.String URL,
                                java.lang.String sName,
                                java.lang.String sValue)

  Adds a text URL field.
  Parameters:
    `sLabel` - The label for the field.
    `URL` - The target URL.
    `sName` - The field name.
    `sValue` - The field value.

### addWideTextField

    public void addWideTextField(java.lang.String sLabel,
                                 java.lang.String sName,
                                 java.lang.String sValue)

  Adds a Wide text field.
  Parameters:
    `sLabel` - The label for the field.
    `sName` - The field name.
    `sValue` - The field value.

### addMultilineTextField

    public void addMultilineTextField(java.lang.String sLabel,
                                      java.lang.String sName,
                                      java.lang.String sValue)

  Adds a multiline text field
  Parameters:
    `sLabel` - The label for the field.
    `sName` - The field name.
    `sValue` - The field value.

### addMultilineTextField

    public void addMultilineTextField(java.lang.String sLabel,
                                      java.lang.String sName,
                                      java.lang.String sValue,
                                      java.lang.String rows)

  Adds a textarea text field with a target number of rows.
  Parameters:
    `sLabel` - The label for the field.
    `sName` - The field name.
    `sValue` - The field value.
    `rows` - Number of rows

### addMultilineTextField

    public void addMultilineTextField(java.lang.String sLabel,
                                      java.lang.String sName,
                                      java.lang.String sValue,
                                      java.lang.String cols,
                                      java.lang.String rows,
                                      java.lang.String sClass)

  Adds a textarea text field with a target number of rows and columns.
  Parameters:
    `sLabel` - The label for the field.
    `sName` - The field name.
    `sValue` - The field value.
    `cols` - Number of columns
    `rows` - Number of rows
    `sClass` - CSS class name for field.

### addMultilineTextField

    public void addMultilineTextField(java.lang.String sLabel,
                                      java.lang.String sName,
                                      java.lang.String sValue,
                                      java.lang.String cols,
                                      java.lang.String rows,
                                      java.lang.String sClass,
                                      java.lang.String sMaxLength)

  Adds a textarea text field with a target number of rows and columns.
  Parameters:
    `sLabel` - The label for the field.
    `sName` - The field name.
    `sValue` - The field value.
    `cols` - Number of columns
    `rows` - Number of rows
    `sClass` - CSS class name for field.
    `sMaxLength` - Maximum data length

### addSubmitButton

    public void addSubmitButton(java.lang.String sName,
                                java.lang.String sValue)

  Adds a SUBMIT button to the form.
  Parameters:
    `sName` - button name
    `sValue` - button value

### addResetButton

    public void addResetButton(java.lang.String sName,
                               java.lang.String sValue)

  Adds a RESET button to the form.
  Parameters:
    `sName` - button name
    `sValue` - button value

### addTopSubmitButton

    public void addTopSubmitButton(java.lang.String sName,
                                   java.lang.String sValue)

  Adds a SUBMIT button to the form. This button will show up in the top of the form.
  Parameters:
    `sName` - button name
    `sValue` - button value

### addTopResetButton

    public void addTopResetButton(java.lang.String sName,
                                  java.lang.String sValue)

  Adds a RESET button to the form. This button will show up in the top of the form.
  Parameters:
    `sName` - button name
    `sValue` - button value

### render

    public void render(java.io.PrintWriter out)
                throws java.lang.Exception

  This is the main method for invoking the FORM's rendering
  Overrides:
    render in class HTMLElementContainer

### renderFields

    protected void renderFields(java.io.PrintWriter out)
                         throws java.lang.Exception

### renderTopButtons

    protected void renderTopButtons(java.io.PrintWriter out)
                             throws java.lang.Exception

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Business Components
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD