Previously I've used TextTemplateHeaderContributor.forJavaScript() to add Javascript to the page &l开发者_如何学编程t;head>
from a template file.
Is there any way to do the same thing, but have the interpolated JS appear in the page <body>
?
See org.apache.wicket.util.template.TextTemplate and its family. You can feed it, interpolate and get its content (#getString()), then you can render the string in a Label for example.
精彩评论