Interface CompositeComponentHandler<T,S>
-
- Type Parameters:
T
- the data type of thisComponentHandler
S
- the data type of the child handlers
- All Superinterfaces:
ComponentHandler<T>
- All Known Implementing Classes:
AbstractCompositeComponentHandler
,AbstractRadioButtonHandler
,DefaultRadioButtonHandler
public interface CompositeComponentHandler<T,S> extends ComponentHandler<T>
Definition of an interface for complex component handlers that can contain other component handlers.
The form builder library supports component handlers that can combine other handlers and let them appear as a single component. This can be useful e.g. for radio buttons: Instead of storing the state of each button in the form's data bean, a composite handler can be defined, which encapsulates the buttons in the radio group and transforms their states into a number, describing the index of the selected radio button.
There are some tag handler classes in the form builder tag library that support the creation of such composite handler instances (and their association with an input component). These tags make use of this interface to add simple component handlers to the composite one.
- Version:
- $Id: CompositeComponentHandler.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addHandler(String name, ComponentHandler<S> handler)
Adds a simpleComponentHandler
object to this composite handler.-
Methods inherited from interface net.sf.jguiraffe.gui.forms.ComponentHandler
getComponent, getData, getOuterComponent, getType, isEnabled, setData, setEnabled
-
-
-
-
Method Detail
-
addHandler
void addHandler(String name, ComponentHandler<S> handler)
Adds a simpleComponentHandler
object to this composite handler.- Parameters:
name
- the name of the corresponding componenthandler
- the handler to add
-
-