I believe AttributeModifier is the appropriate class to use to modify
tag attributes. Moreover, it is described in the section you refer to.
For reference, ComponentTag#writeOutput() is the method which calls
Strings.escapeMarkup(value); and escapes your tag value. This is called
by Component#renderComponentTag().
Unfortunately, there doesn't seem to currently be a way to not escape
the markup of the tag values. It is possible for labels but not for the
tag attributes. I can think of 3 options:
1) [unsafe] remove the tag escaping at large
2) modify Wicket to add a flag somewhere to disable tag escaping
3) create your Component subclass which overrides getMarkup() to weave
in your raw html
Either way, I think this should be added to Wicket because html data-
attributes seem to gain popularity.
Regards,
Bertrand
On 03/06/2013 10:22 AM, Paul Bors wrote:
AttributeModifier?
You might be interested in taking a quick look at (Section 4.2 "Modifying
Tag Attributes"):
http://wicket.apache.org/learn/books/freeguide.html
~ Thank you,
Paul Bors
-----Original Message-----
From: Simon B [mailto:simon.bott...@gmail.com]
Sent: Monday, June 03, 2013 6:28 AM
To: users@wicket.apache.org
Subject: AttributeModifier with html in the attribute?
Hello
I want to add html content in an attribute of an html tag.
This is for a bootstrap tooltip.
What is the best way to do this? When I simply add html to the attribute
modifier e.g.
it gets converted into
What I'd like is:
What's the best way to achieve this?
Simon
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/AttributeModifier-with-html-in-th
e-attribute-tp4659206.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org