开发者

Apache Wicket exposes internal attributes

I just tried the Apache Wicket "Hello, world" application and I noticed that in the rendered HTML output, Wicket is exposing it's internal attributes.

This is what the rendered HTML looks like in the 'view source' of the browser:

<html>
<body>
    <span wicket:id="message" id="message">Hello World!</span>
</body>
</html>

How do I get rid of the wicket:id="message" attribut开发者_StackOverflowe in the rendered HTML output?


Switch to deployment mode, e.g. in web.xml:

<context-param>
 <param-name>configuration</param-name>
 <param-value>deployment</param-value>
</context-param>


You can place below code in the init method if your applciation class

Application.get().getMarkupSettings().setStripWicketTags(true)

There was this one as well if not removed in the newer versions.


Also: this setting is configurable in runtime with:

Application.get().getMarkupSettings().setStripWicketTags(boolean)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜