They may contain information like a build number, version number of application for debugging purposes that I can see on the rendered HTML output.
I was thinking of sub-classing label because the output of a comment is similar to that kind of markup. -----Original Message----- From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Monday, March 28, 2011 12:19 PM To: users@wicket.apache.org Subject: Re: HTML comment tag An reusable behavior can be archived using the MarkupComponentBorder. On a side note, why do you want to write commented model values in markup? On Mon, Mar 28, 2011 at 11:02 AM, Brown, Berlin [GCG-PFS] < berlin.br...@primerica.com> wrote: > This is simple code and works, do you think this is a way to add > dynamic HTML comments that use some Wicket model? > Or have you done something else? > > I am not as familiar with onComponentTagBody. > > public class HtmlComment extends Label { > > /** > * @see > org.apache.wicket.Component#onComponentTagBody(org.apache.wicket.markup. > MarkupStream, > * org.apache.wicket.markup.ComponentTag) > */ > @Override > protected void onComponentTagBody(final MarkupStream markupStream, > final ComponentTag openTag) { > replaceComponentTagBody(markupStream, openTag, "<!-- " + > getDefaultModelObjectAsString() + " -->"); > } > > } > > and the output will be in the final HTML output: > > <!-- DATA --> > -- Pedro Henrique Oliveira dos Santos --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org