I'm currently try to add some kind of microdata
(http://en.wikipedia.org/wiki/Microdata_%28HTML%29) to our project. Exists a
wicketstuff project dealing with this problem?
What is the preferred way to add "valueless" attributes to HTML tags? E.g. I
have to add the following attributes to the body tag:

<body id="foo" itemscope itemtype="http://scheme.org/WebPage";>

</body>

At the base page class I've added a TransparentMarkupContainer the following
way:

this.body = new TransparentWebMarkupContainer("body");
this.body.setOutputMarkupId(true);

HTML:

<body wicket:id="body">
   <wicket:child/>
</body>

At a subclass I did:

getBody().setMarkupId("foo").add( AttributeModifier.append("itemscope",
AttributeModifier.VALUELESS_ATTRIBUTE_ADD ) ).add( AttributeModifier.append(
"itemtype", Model.of( "http://scheme.org/WebPage"; ) ) );

Is this the preferred way to add "valueless" attributes to a tag (I've never
seen this before)? Or is this marker value for internal use only? At least
the generated HTML code looks like intended.
I would like to know whether there is a kind of general solution to deal
with "microdata", say a bunch of Behavior-classes to add this kind of data.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-microdata-tp4661135.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

Reply via email to