adapforms.form.elements
Class BeanElement

java.lang.Object
  extended by adapforms.form.elements.FormElement
      extended by adapforms.form.elements.BeanElement
All Implemented Interfaces:
ElementContainer

public class BeanElement
extends FormElement
implements ElementContainer

An element which is itself an element container. The element itself holds no data, but its child elements are produced at runtime by enumerating all properties of a given JavaBean type, identified by a BeanType.

The label is optional, see description of GroupElement.

Author:
Henrik Gammelmark, geemark@cs.au.dk

Constructor Summary
BeanElement(java.lang.String id, SimpleLabel label, BeanType type)
           
 
Method Summary
 BeanElement clone(java.lang.String id, SimpleLabel label)
          Create a clone of the element, given a new ID and label.
 java.util.List<FormElement> getElements()
          Ordered list of form elements contained in this instance.
 BeanType getType()
          Get the BeanType this element refers to.
 java.lang.String toString()
          Used for pretty-printing the element.
 
Methods inherited from class adapforms.form.elements.FormElement
cloneFinalize, getElementID, getLabel, getRolesRead, getUIFlags, isRelevant, setRelevant, setRolesRead, setUIFlags, toStringHelper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BeanElement

public BeanElement(java.lang.String id,
                   SimpleLabel label,
                   BeanType type)
Parameters:
type - Fully qualified name of the bean type.
Method Detail

clone

public BeanElement clone(java.lang.String id,
                         SimpleLabel label)
Description copied from class: FormElement
Create a clone of the element, given a new ID and label.

Important: The method should call FormElement.cloneFinalize(FormElement) before returning. This adds common parameters to the clone.

Specified by:
clone in class FormElement

getElements

public java.util.List<FormElement> getElements()
Description copied from interface: ElementContainer
Ordered list of form elements contained in this instance.

Specified by:
getElements in interface ElementContainer

toString

public java.lang.String toString()
Description copied from class: FormElement
Used for pretty-printing the element. See Form.prettyPrintStructure().

Specified by:
toString in class FormElement

getType

public BeanType getType()
Get the BeanType this element refers to.