You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by pureza <pu...@gmail.com> on 2013/04/11 17:04:45 UTC

Component containing a repeater with customizable item markup

Hi,

I want to create a custom component with a repeater, where the markup for
each item in the repeater is specified by the users of the component, not in
its internal definition.

That is, the internal markup of the component looks like this:



And the component is used with:



So, for each "menu-item", I want to render the custom HTML 


I may want to reuse the same component in other places, but providing
different item markup. Is this possible?

I tried to use a <wicket:border/>, but I guess it wasn't supposed to work
like that...

Thanks.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Component-containing-a-repeater-with-customizable-item-markup-tp4657895.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: Component containing a repeater with customizable item markup

Posted by pureza <pu...@gmail.com>.
I managed to make it work by using panels and fragments.

Thanks!



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Component-containing-a-repeater-with-customizable-item-markup-tp4657895p4657899.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: Component containing a repeater with customizable item markup

Posted by pureza <pu...@gmail.com>.
I don't think a Border should work, because the Border constructor calls
addToBorder(body), but I want my body to be added to each of the list items,
not to the border itself.

Anyway, I'm using #addToBorder() to add the button and the menu.




--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Component-containing-a-repeater-with-customizable-item-markup-tp4657895p4657897.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: Component containing a repeater with customizable item markup

Posted by Sven Meier <sv...@meiers.net>.
Hi,

a Border should work fine here.
Are you using #add() and #addToBorder() correctly?

Regards
Sven

On 04/11/2013 05:04 PM, pureza wrote:
> Hi,
>
> I want to create a custom component with a repeater, where the markup for
> each item in the repeater is specified by the users of the component, not in
> its internal definition.
>
> That is, the internal markup of the component looks like this:
>
>
>
> And the component is used with:
>
>
>
> So, for each "menu-item", I want to render the custom HTML
>
>
> I may want to reuse the same component in other places, but providing
> different item markup. Is this possible?
>
> I tried to use a <wicket:border/>, but I guess it wasn't supposed to work
> like that...
>
> Thanks.
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Component-containing-a-repeater-with-customizable-item-markup-tp4657895.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