My use case is actually turning out slightly more complex than I posted. What I actually have is:
<span wicket:id="foo">TEXT<span wicket:id="star">*</span><span> and I'd like to sometimes remove the star. So my java (which doesn't work) looks like: private static class LabelWithStar extends WebMarkupContainer { public LabelWithStar(String id, String model, final boolean starIsVisible) { super(id, new Model(model)); this.add(new WebMarkupContainer("star") { public boolean isVisible() { return starIsVisible; } }); } protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { replaceComponentTagBody(markupStream, openTag, getModelObjectAsString()); } } This doesn't work because the call to replaceComponentTagBody() removes the span with the star. How should I be doing this instead? Thanks Lowell On 5/30/07, Timo Rantalaiho <[EMAIL PROTECTED]> wrote: > On Wed, 30 May 2007, Lowell Kirsh wrote: > > I making a web page which contains some markup that I'd like to remove > > (sometimes). I imagine it would look like: > > > > ... > > <span wicket:id="removeMe">Hello <b>W</b>orld</span> > > ... > > > > Is it possible to remove this markup? > > new WebMarkupContainer("removeMe") { > protected void onBeforeRender() { > super.onBeforeRender(); > setVisible(sometimesFalse()); > } > } > > - Timo > > -- > Timo Rantalaiho > Reaktor Innovations Oy <URL: http://www.ri.fi/ > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user