Hi,
I am using Apache Tiles 2.2.2 (with Spring) and I am wondering if nobody
except me had the following problem as I can't find any information
about it.
In my .jspx file I have the following markup:
<div class="actions">
<button><i class="icon-ok"></i> Button 1</button>
<button><i class="icon-remove "></i> Button 2</button>
</div>
When rendered using Apache Tiles it becomes this:
<div class="actions"><button><i class="icon-ok" />Button
1</button><button><i class="icon-remove" />Button 2</button></div>
As you can see, there are several modifications to the markup I've
written.
- line breaks and indentation are missing
- the <i> elements have been re-written to self-closing elements
- the space between <i> and the button's text has been removed
Those modifications have some pretty annoying consequences:
1. I have no problem with the removal of the indentation spaces but the
missing line breaks cause the buttons to sit directly next to each
other. With the old markup there was a space between both buttons.
2. The self-closing <i> elements do not work in Firefox and Opera as per
HTML specification those tags aren't allowed to be self-closing
(However, there's a workaround (or hack as I would call it) by inserting
<jsp:text />).
3. The missing space between <i> and the element's text should be an
obvious problem. When I want a space at this position, it shouldn't be
stripped.
Of course I could solve all these problems using workarounds like adding
margin via CSS or - but isn't there another solution? Something
more professional?
Thanks in advance for any advice
Best regards,
Marvin