| java.lang.Object org.apache.cocoon.forms.util.WidgetFinder
WidgetFinder | public WidgetFinder(Widget context, Iterator paths, boolean keepUpdated)(Code) | | Searches for widgets. It will iterate on the given paths and find all
corresponding widgets. If a path is in the forms repeater/* /widget
then all the rows of the repeater will be iterated and subwidgets
will be fetched.
Parameters: context - The context widget to start from. Parameters: paths - An iterator of Strings containing the paths. Parameters: keepUpdated - If true, listeners will be installed on repeatersto keep lists updated without polling. |
WidgetFinder | public WidgetFinder(Widget context, String path, boolean keepUpdated)(Code) | | Searches for widgets. If path is in the forms repeater/* /widget
then all the rows of the repeater will be iterated and subwidgets
will be fetched.
Parameters: context - The context widget to start from. Parameters: path - Path to search for.. Parameters: keepUpdated - If true, listeners will be installed on repeatersto keep lists updated without polling. |
addRepeaterListener | public void addRepeaterListener(RepeaterListener listener)(Code) | | Adds a repeater listener. New widget additions or deletions will be notified thru this listener (events received
from monitored repeaters will be forwarded, use
WidgetFinder.getNewAdditions() to retrieve new widgets).
Parameters: listener - The listener to add. |
getNewAdditions | public List getNewAdditions()(Code) | | Gets the new widgets that has been added to the list, as a consequence of new repeater rows additions, since
last time this method was called or the finder was initialized.
A List of Widgets. |
getWidgets | public Collection getWidgets()(Code) | | Return all widgets found for the given paths.
A Collection of Widgets. |
hasNewAdditions | public boolean hasNewAdditions()(Code) | | true if new widgets have been added to this list (i.e. new repeater rows have been created) since last time getNewAdditions() was called. |
isMutable | public boolean isMutable()(Code) | | true if this finder is mutable (i.e. it's monitoring some repeaters) or false if getWidgets() will always return the same list (i.e. it's not monitoring any widget). |
refreshForAdd | protected void refreshForAdd(Repeater repeater, int index)(Code) | | Called when a new row addition event is received from a monitored repeater.
Parameters: repeater - The repeated that generated the event. Parameters: index - The new row index. |
refreshForClear | protected void refreshForClear(Repeater repeater)(Code) | | Called when a repeater clear event is received from a monitored repeater.
Parameters: repeater - The repeated that generated the event. |
refreshForDelete | protected void refreshForDelete(Repeater repeater, int index)(Code) | | Called when a row deletion event is received from a monitored repeater.
Parameters: repeater - The repeated that generated the event. Parameters: index - The deleted row index. |
|
|