Holger Knublauch

Tree now uses SPIN templates

This diff is collapsed. Click to expand it.
......@@ -2,7 +2,8 @@
ui:format="json"
ui:sendQueryGraph="true"
ui:snippet="true"
ui:view="{= ?dataProvider }">
ui:view="{= ?dataProvider }"
arg:root="{= ?root }">
<!-- The div that will be turned into a jsTree below -->
<div id="{= ?id }" />
......
<ui:group xmlns:ui="http://uispin.org/ui#">
[
<ui:if ui:condition="{= spr:rowCount(?resultSet) &gt; 0 }">
<ui:forEach ui:indexVar="index" ui:resultSet="{= ?resultSet }">
<ui:if ui:condition="{= ?index &gt; 0 }">,</ui:if>
<ui:forEach ui:indexVar="index" ui:resultSet="{= ?resultSet }" ui:separator=",">
{
"data" : {
"title" : "{= IF(bound(?label), ?label, ui:label(?child)) }"
"title" : "{= COALESCE(?label, ui:label(?node)) }"
<ui:if ui:condition="{= bound(?icon) }">,
"icon" : "{= ?icon }"
</ui:if>
},
"attr" : {
"id": "{= ui:encodeNode(?child) }::{= ui:uniqueId() }",
"resource" : "{= IRI(?child) }"
"id": "{= ui:encodeNode(?node) }::{= ui:uniqueId() }",
"resource" : "{= IRI(?node) }"
},
<ui:if ui:condition="{= ?leaf }">
"children" : []
......@@ -20,7 +18,7 @@
<ui:else>
"state" : "closed"
</ui:else>
}</ui:forEach>
</ui:if>
}
</ui:forEach>
]
</ui:group>
\ No newline at end of file
......
......@@ -48,9 +48,10 @@ log:LogBrowser
html:class "ui-layout-content"^^xsd:string ;
ui:child
[ rdf:type app:Tree ;
arg:dataProvider log:LogEventClassTreeDataProvider ;
arg:dataProvider app:ClassTreeDataProvider ;
arg:id "classTree"^^xsd:string ;
arg:onSelect "appLoadWithResource('form', 'resourceType', resource)"^^xsd:string ;
arg:root "log:LogEvent"^^xsd:string ;
ui:childIndex 0
] ;
ui:childIndex 1
......