Hi,
I want to add a div that wraps my content based on a condition:
<t:if test="test">
<div class="cssclass">
</t:if>
... content ...
<t:if test="test">
</div>
</t:if>
This is not possible as it will give following exception:
/org.xml.sax.SAXParseException/
/The element type "div" must be terminated by the matching end-tag "</div>".
/For my use case I can make a property for the css class and base it on
the condition:
<div class="${cssClass}">
... content ...
</div>
public String getCssClass() {
return test ? "cssclass" : "";
}
But I was just wondering if there is a way of adding a wrapping element
conditionally as I showed at the top.
Nathan