You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "wmike1987@gmail.com" <wm...@gmail.com> on 2011/06/13 06:15:25 UTC

repeatingview or listview help

The only example the wicket docs give of a repeatingView is one with 1 html
element in the repeater's markup:

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

If I wanted something like:
<div wicket:id="repeater">
      <div wicket:id="label1"></div>
      <div wicket:id="label2"></div>
</div>


Is this even possible with a repeatingView? Or is it more suitable for a
ListView? Thanks

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/repeatingview-or-listview-help-tp3593171p3593171.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: repeatingview or listview help

Posted by Martin Grigorov <mg...@apache.org>.
Use a Panel or a Fragment.

RepeatingView rv = new RV("repeater");
Panel p = new Panel(rv.newChildId());
p.add(new Label("label1", ...));
....

On Mon, Jun 13, 2011 at 7:15 AM, wmike1987@gmail.com
<wm...@gmail.com> wrote:
> The only example the wicket docs give of a repeatingView is one with 1 html
> element in the repeater's markup:
>
> <ul><li wicket:id="repeater"></li></ul>
>
> If I wanted something like:
> <div wicket:id="repeater">
>      <div wicket:id="label1"></div>
>      <div wicket:id="label2"></div>
> </div>
>
>
> Is this even possible with a repeatingView? Or is it more suitable for a
> ListView? Thanks
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/repeatingview-or-listview-help-tp3593171p3593171.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: repeatingview or listview help

Posted by Sven Meier <sv...@meiers.net>.
Sure, if your repeated component has two children:

repeatingView.add(new 
WebMarkupContainer(repeatingView.newChildId()).add(new 
Label("label1")).add(new Label("label2")));

Sven

On 06/13/2011 06:15 AM, wmike1987@gmail.com wrote:
> The only example the wicket docs give of a repeatingView is one with 1 html
> element in the repeater's markup:
>
> <ul><li wicket:id="repeater"></li></ul>
>
> If I wanted something like:
> <div wicket:id="repeater">
>        <div wicket:id="label1"></div>
>        <div wicket:id="label2"></div>
> </div>
>
>
> Is this even possible with a repeatingView? Or is it more suitable for a
> ListView? Thanks
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/repeatingview-or-listview-help-tp3593171p3593171.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org