searchResultsGrid.uispin.html
1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<ui:group
let:keyProperties="{= app:getKeyProperties(?type) }"
let:pagerId="{= ui:uniqueId() }"
let:tableId="{= ui:uniqueId() }">
<table id="{= ?tableId }" style="width: 100%"/>
<div id="{= ?pagerId }" />
<script>
$("#{= ?tableId }").jqGrid({
<swon:NameValuePair arg:name="url" arg:value="{= fn:concat('getSearchResults?', ?params) }" />,
<swon:NameValuePair arg:name="datatype" arg:value="json" />,
colNames:[
'Resource'
<ui:if ui:condition="{= bound(?keyProperties) }">,
<ui:forEach ui:resultSet="{#
SELECT ?colName
WHERE {
GRAPH ui:graph {
?keyProperties (rdf:rest*)/rdf:first ?keyProperty .
BIND (spif:titleCase(ui:label(?keyProperty) AS ?colName)) .
}
}
}" ui:separator=",">
'{= ?colName }'
</ui:forEach>
</ui:if>
],
colModel:[
{
name : 'result',
width: 200
}
<ui:if ui:condition="{= bound(?keyProperties) }">,
<ui:forEach ui:resultSet="{#
SELECT ?varName
WHERE {
GRAPH ui:graph {
?keyProperties (rdf:rest*)/rdf:first ?property .
BIND (app:keyPropertyVarName(?property) AS ?varName) .
}
}
}" ui:separator=",">
{
<swon:NameValuePair arg:name="name" arg:value="{= ?varName }" />
}
</ui:forEach>
</ui:if>
],
rowNum: 10,
rowList:[5,10,20],
pager: '#{= ?pagerId }',
viewrecords: true,
sortorder: "desc",
height: "100%",
width: "500"
}).jqGrid('navGrid', '#{= ?pagerId }', { add:false, edit:false, del:false});
</script>
</ui:group>