You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Johan Maasing <jm...@gmail.com> on 2007/10/22 08:21:18 UTC

which component to use to preserve the template html

I have some places where I use components only to modify the tag
attributes.  As in:

----
<div wicket:id="id"></div>

----
final Label noopComponent = new Label(id, "");
noopComponent.add(new AttributeModifier("style"...


I was just wondering if there is an alternative to using Labels? It
works fine but seems a bit silly to always output an empty string. In
Tapestry I would have used the Any component for this, is there
something similar in wicket?

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


Re: which component to use to preserve the template html

Posted by Johan Maasing <jm...@gmail.com>.
Of course, sometimes it is too simple :-) Thank you.

On 10/22/07, Gerolf Seitz <ge...@gmail.com> wrote:
> you could use a WebMarkupContainer.
>
> Gerolf
>
> On 10/22/07, Johan Maasing <jm...@gmail.com> wrote:
> >
> > I have some places where I use components only to modify the tag
> > attributes.  As in:
> >
> > ----
> > <div wicket:id="id"></div>
> >
> > ----
> > final Label noopComponent = new Label(id, "");
> > noopComponent.add(new AttributeModifier("style"...
> >
> >
> > I was just wondering if there is an alternative to using Labels? It
> > works fine but seems a bit silly to always output an empty string. In
> > Tapestry I would have used the Any component for this, is there
> > something similar in wicket?
> >
> > ---------------------------------------------------------------------
> > 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


Re: which component to use to preserve the template html

Posted by Gerolf Seitz <ge...@gmail.com>.
you could use a WebMarkupContainer.

Gerolf

On 10/22/07, Johan Maasing <jm...@gmail.com> wrote:
>
> I have some places where I use components only to modify the tag
> attributes.  As in:
>
> ----
> <div wicket:id="id"></div>
>
> ----
> final Label noopComponent = new Label(id, "");
> noopComponent.add(new AttributeModifier("style"...
>
>
> I was just wondering if there is an alternative to using Labels? It
> works fine but seems a bit silly to always output an empty string. In
> Tapestry I would have used the Any component for this, is there
> something similar in wicket?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>