Class RepeatingView

All Implemented Interfaces:
Serializable, Iterable<Component>, IEventSink, IEventSource, IFeedbackContributor, IConverterLocator, IMetadataContext<Serializable,Component>, IHeaderContributor, IRequestableComponent, IHierarchical<Component>, IClusterable
Direct Known Subclasses:
RefreshingView, SelectOptions

public class RepeatingView extends AbstractRepeater

A repeater view that renders all of its children, using its body markup, in the order they were added.



 RepeatingView view = new RepeatingView("repeater");
 view.add(new Label(view.newChildId(), "hello"));
 view.add(new Label(view.newChildId(), "goodbye"));
 view.add(new Label(view.newChildId(), "good morning"));


  <ul><li wicket:id="repeater"></li></ul>


  <ul><li>hello</li><li>goodbye</li><li>good morning</li></ul>
To expand a bit: the repeater itself produces no markup, instead every direct child inherits the entire markup of the repeater. In the example above repeaters's markup is:
  <li wicket:id="repeater"></li>
and so this is the markup that is available to the direct children - the Label components. So as each label renders it produces a line of the output that has the litag.
Igor Vaynberg ( ivaynberg )
See Also: