Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wicket: hide comments in HTML

JSPs support the <%-- comment --%> syntax for comments, which is a way to comment markup code such that it doesn't get included in the emitted HTML.

Is there a way to do this in Wicket?

like image 765
George Armhold Avatar asked Jul 19 '11 15:07

George Armhold


2 Answers

<wicket:remove> is your friend. Wicket will remove this from output.

See here https://cwiki.apache.org/confluence/display/WICKET/Wicket's+XHTML+tags#Wicket%27sXHTMLtags-Elementwicket%3Aremove

like image 103
Hajo Thelen Avatar answered Sep 23 '22 05:09

Hajo Thelen


there's

Application#getMarkupSettings().setStripComments(true) 

which will remove

<!-- comment --> 

from your markup

like image 29
Peter Ertl Avatar answered Sep 23 '22 05:09

Peter Ertl