org.apache.cocoon.forms.formmodel
Interface ContainerWidget

All Superinterfaces:
org.apache.cocoon.util.location.Locatable, Widget
All Known Implementing Classes:
AbstractContainerWidget, AggregateField

public interface ContainerWidget
extends Widget

Interface to be implemented by Widgets which contain other widgets. So all widgets together form a widget tree, with its root being the Form widget, the ContainerWidgets being the branches/forks, and the Widgets with values being the leaves.

Version:
$Id: ContainerWidget.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
 
Fields inherited from interface org.apache.cocoon.forms.formmodel.Widget
PATH_SEPARATOR
 
Method Summary
 void addChild(Widget widget)
          Adds a child widget.
 Widget getChild(String id)
          Gets the child widget with the given id.
 Iterator getChildren()
           
 boolean hasChild(String id)
          Checks if there is a child widget with the given id.
 
Methods inherited from interface org.apache.cocoon.forms.formmodel.Widget
addValidator, broadcastEvent, generateLabel, generateSaxFragment, getAttribute, getCombinedState, getDefinition, getForm, getFullName, getId, getLocation, getName, getParent, getRequestParameterName, getState, getValue, getWidget, initialize, isRequired, isValid, lookupWidget, readFromRequest, removeAttribute, removeValidator, setAttribute, setParent, setState, setValue, validate
 

Method Detail

addChild

public void addChild(Widget widget)
Adds a child widget.


hasChild

public boolean hasChild(String id)
Checks if there is a child widget with the given id.


getChild

public Widget getChild(String id)
Gets the child widget with the given id.

Returns:
null if there is no child with the given id.

getChildren

public Iterator getChildren()
Returns:
an iterator over the widgets this object contains


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.