| |
|
| java.lang.Object org.apache.cocoon.forms.formmodel.AbstractWidget org.apache.cocoon.forms.formmodel.Repeater
All known Subclasses: org.apache.cocoon.forms.formmodel.EnhancedRepeater,
Repeater | public class Repeater extends AbstractWidget implements ValidationErrorAware(Code) | | A repeater is a widget that repeats a number of other widgets.
Technically, the Repeater widget is a ContainerWidget whose children are
RepeaterRow s, and the RepeaterRows in turn are ContainerWidgets
containing the actual repeated widgets. However, in practice, you won't need
to use the RepeaterRow widget directly.
Using the methods
Repeater.getSize() and
Repeater.getWidget(int,java.lang.String) you can access all of the repeated widget instances.
version: $Id: Repeater.java 462520 2006-10-10 19:39:14Z vgritsenko $ |
addRow | public RepeaterRow addRow()(Code) | | |
addRow | public RepeaterRow addRow(int index)(Code) | | |
clear | public void clear()(Code) | | Clears all rows from the repeater and go back to the initial size
|
generateSize | public void generateSize(ContentHandler contentHandler) throws SAXException(Code) | | Generates a repeater-size element with a size attribute indicating the size of this repeater.
|
getMaxSize | public int getMaxSize()(Code) | | |
getMinSize | public int getMinSize()(Code) | | |
getParentRow | public static RepeaterRow getParentRow(Widget widget)(Code) | | Crawls up the parents of a widget up to finding a repeater row.
Parameters: widget - the widget whose row is to be found the repeater row |
getRow | public RepeaterRow getRow(int index)(Code) | | |
getSize | public int getSize()(Code) | | |
getValidationError | public ValidationError getValidationError()(Code) | | Set a validation error on this field. This allows repeaters be externally marked as invalid by
application logic.
the validation error |
getWidget | public Widget getWidget(int rowIndex, String id)(Code) | | Gets a widget on a certain row.
Parameters: rowIndex - startin from 0 Parameters: id - a widget id null if there's no such widget |
getXMLElementName | public String getXMLElementName()(Code) | | "repeater" |
hasRepeaterListeners | public boolean hasRepeaterListeners()(Code) | | |
indexOf | public int indexOf(RepeaterRow row)(Code) | | Get the position of a row in this repeater.
Parameters: row - the row which we search the index for the row position or -1 if this row is not in this repeater |
initialize | public void initialize()(Code) | | |
moveRow | public void moveRow(int from, int to)(Code) | | Move a row from one place to another
Parameters: from - the existing row position Parameters: to - the target position. The "from" item will be moved before that position. |
moveRow2 | public void moveRow2(int from, int to)(Code) | | Move a row from one place to another. In contrast to
Repeater.moveRow , this
method treats the to-index as the exact row-index where you want to have the
row moved to.
Parameters: from - the existing row position Parameters: to - the target position. The "from" item will be moved before that position. |
moveRowLeft | public void moveRowLeft(int index)(Code) | | |
moveRowRight | public void moveRowRight(int index)(Code) | | |
Fields inherited from org.apache.cocoon.forms.formmodel.AbstractWidget | protected boolean wasValid(Code)(Java Doc)
|
|
|
|