Jesse Barnum
Jesse Barnum

Reputation: 6816

How to insert dynamic text into a Wicket page

I have a page like this:

<html>
<body>
Foo
</body>
</html>

I want to use Wicket to replace the word "Foo" with "Bar", like this:

<html>
<body>
Bar
</body>
</html>

I cannot figure out how to do that. I don't want any HTML escaping on "Bar", and I don't want any tags placed around it.

Upvotes: 1

Views: 529

Answers (1)

martin-g
martin-g

Reputation: 17513

Welcome to Wicket! You need to use a Label component for the dynamic text. See http://wicket.apache.org/guide/guide/helloWorld.html#helloWorld_3. Or just create the application with the Maven archetype (http://wicket.apache.org/start/quickstart.html) - it has a label for the version of Wicket. Just replace the text with "Bar"

Upvotes: 4

Related Questions