Hi xwiki-users,
I've been playing with the new XWiki Syntax 2.0, but there are still some
things possible with the old 1.0 syntax which are impossible in the new 2.0
syntax. One thing that I still cannot figure out is something like the
following:
{{html wiki=true}}
<table id="serverList" class="grid sortable filterable
doOddEven">
<tr class="sortHeader">
<th class="selectFilter">Space</th>
<th>Class</th>
<th>Server Name</th>
<th class="unsortable noFilter">Link</th>
</tr>
{{velocity}}
#foreach($serverDocument in $serverDocuments)
<tr>
<td>$serverDocument.Space</td>
<td>$serverDocument.Name</td>
<td>
#foreach($serverObject in $serverDocument.getObjects($serverClass))
* $serverObject.HostName
#end
</td>
<td>[[$serverDocument]]</td>
</tr>
#end
{{/velocity}}
</table>
{{/html}}
This gives me a lot of <br /> tags (the number of $server in $serverList),
and ends up displaying 1 row with the literal string $server.Space,
$server.Class, etc. It works if I use the normal table syntax:
|=Space|=Class|=Server Name|=Link
{{velocity}}
#foreach($serverDocument in $serverDocuments)
|$serverDocument.Space|$serverDocument.Name|???|[[$serverDocument]]
#end
{{/velocity}}
but I'm not sure how I'd iterate over each object associated with the
document in the tag marked '???'.
Also, whenever I have a {{velocity}} tag, I end up with a lot of empty <p>
elements:
* Line 1
{{velocity}}
#set($foo = "bar")
{{/velocity}}
* Line 2
This ends up with a <p> tag between "Line 1" and "Line 2", which
seems very
strange when rendered (since there's no content when "viewing").
Just my 2 cents on the new syntax. But other than that, creating macros now
is a breeze (XWiki + Plexus is just purely amazing!), and I think the new
syntax is only inches away from surpassing the old 1.0 syntax :-D Thanks
again for the great work!