BEA Systems, Inc.

WebLogic Server 5.1.0 API Reference

weblogic.html
Class FormElement

java.lang.Object
  |
  +--weblogic.html.HtmlElement
        |
        +--weblogic.html.ElementWithAttributes
              |
              +--weblogic.html.MultiPartElement
                    |
                    +--weblogic.html.FormElement

public class FormElement
extends MultiPartElement

FormElement objects are used to set and get attributes customarily used in the HTML FORM indicator, like "ACTION" and "ONSUBMIT". Add InputElements, TextAreaElements, ButtonElement, FieldsetElement, and SelectElements to a FormElement with the addElement() method.

Author:
Copyright (c) 1995-97, WebLogic, Inc.
Copyright © 2000 BEA Systems, Inc. All Rights Reserved.
See Also:
InputElement, TextAreaElement, SelectElement, ButtonElement, FieldsetElement

Fields inherited from class weblogic.html.HtmlElement
codeset, useObsolete
 
Constructor Summary
FormElement(java.lang.String actionstr, java.lang.String methodstr)
          Constructs a FormElement with the specified action and method.
FormElement(java.lang.String actionstr, java.lang.String methodstr, java.lang.String encstr)
          Constructs a FormElement with the specified action, method, and encoding.
 
Method Summary
 FormElement addElement(HtmlElement val)
          Adds an HtmlElement to a FormElement.
 FormElement addElement(java.lang.String str)
          Adds a string to a FormElement.
 HtmlElement getElementAt(int pos)
          Gets the HtmlElement at the specified index position.
protected  java.lang.String getHtmlCode()
           
protected  boolean printCR()
           
 FormElement setAction(java.lang.String actionstr)
          Sets the form action, which specifies the location to which the contents of the form is to be submitted for a response.
 FormElement setEncType(java.lang.String encstr)
          Sets the encoding attribute, which specifies the MIME content type to be used to encode the contents of the form.
 FormElement setMethod(java.lang.String methodstr)
          Sets the form method, which is used to send the form contents.
 FormElement setName(java.lang.String name)
          Sets the name for a FormElement.
 FormElement setOnSubmit(java.lang.String submitstr)
          Sets the ONSUBMIT attribute.
 FormElement setTarget(java.lang.String targetstr)
          Sets the window or frame target for a FormElement.
 FormElement setTarget(WindowName window)
          Sets the window or frame target for a FormElement to a WindowName, which supports magic target names.
 
Methods inherited from class weblogic.html.MultiPartElement
addHeadMultiElement, addMultiElement, getMultiElementAt, getNumElements, printBody, printBody, printBody, removeElement, removeElementAt, replaceElementAt, replaceMultiElementAt, widthAsLiteral
 
Methods inherited from class weblogic.html.ElementWithAttributes
addAttribute, addAttribute, escapeQuotes, getBooleanAttribute, getElementAttribute, getLocalVar, getQuotedAttribute, output, output, output, printBody, printEndingTag, setBooleanAttribute, setBooleanAttribute, setClass, setDirection, setElementAttribute, setElementAttribute, setElementAttribute, setElementAttribute, setElementAttribute, setId, setLang, setLocalVar, setQuotedAttribute, setStyle
 
Methods inherited from class weblogic.html.HtmlElement
asAnchorElement, asBigElement, asBlockquoteElement, asBoldElement, asCenteredElement, asCiteElement, asCodeElement, asCommentElement, asDefineTermElement, asEmphasisElement, asFontElement, asFontElement, asFontElement, asHtmlContainer, asItalicElement, asKeyboardElement, asLiteralElement, asParagraphElement, asSampleElement, asSmallElement, asStrikeElement, asStrongElement, asSubscriptElement, asSuperscriptElement, asTeletypeElement, asUnderlineElement, asVariableElement, getVersion, setAnchorMode, setCodeset, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FormElement

public FormElement(java.lang.String actionstr,
                   java.lang.String methodstr)
Constructs a FormElement with the specified action and method.

Parameters:
actionstr - Server-side form handler (URI)
methodstr - Form method

FormElement

public FormElement(java.lang.String actionstr,
                   java.lang.String methodstr,
                   java.lang.String encstr)
Constructs a FormElement with the specified action, method, and encoding.

Parameters:
actionstr - Server-side form handler (URI) enclosed in double quotes
methodstr - Form method enclosed in double quotes
encstr - Form encoding enclosed in double quotes
Method Detail

getHtmlCode

protected java.lang.String getHtmlCode()

Overrides:
getHtmlCode in class ElementWithAttributes

printCR

protected boolean printCR()

Overrides:
printCR in class ElementWithAttributes

addElement

public FormElement addElement(HtmlElement val)
Adds an HtmlElement to a FormElement.

Parameters:
val - HtmlElement object
Returns:
FormElement object

addElement

public FormElement addElement(java.lang.String str)
Adds a string to a FormElement.

Parameters:
val - String object
Returns:
FormElement object

getElementAt

public HtmlElement getElementAt(int pos)
Gets the HtmlElement at the specified index position.

Parameters:
pos - Index position
Returns:
HtmlElement object

setAction

public FormElement setAction(java.lang.String actionstr)
Sets the form action, which specifies the location to which the contents of the form is to be submitted for a response.

Parameters:
actionstr - Action
Returns:
FormElement object

setEncType

public FormElement setEncType(java.lang.String encstr)
Sets the encoding attribute, which specifies the MIME content type to be used to encode the contents of the form. The default is the string "application/x-www-form-urlencoded".

Parameters:
encstr - Encapsulation
Returns:
FormElement object

setMethod

public FormElement setMethod(java.lang.String methodstr)
Sets the form method, which is used to send the form contents. (It is currently restricted to GET (default) or POST.)

Parameters:
methodstr - Method
Returns:
FormElement object

setName

public FormElement setName(java.lang.String name)
Sets the name for a FormElement.

Parameters:
name - String form name
Returns:
FormElement

setTarget

public FormElement setTarget(java.lang.String targetstr)
Sets the window or frame target for a FormElement.

Parameters:
targetstr - String window name
Returns:
FormElement

setTarget

public FormElement setTarget(WindowName window)
Sets the window or frame target for a FormElement to a WindowName, which supports magic target names.

Parameters:
target - WindowName object
Returns:
FormElement

setOnSubmit

public FormElement setOnSubmit(java.lang.String submitstr)
Sets the ONSUBMIT attribute.

Parameters:
submitstr - Submit string
Returns:
FormElement object

Documentation is available at
http://www.weblogic.com/docs51