Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CmisStore example page</title>
<script type="text/javascript">
var directory = location.pathname.replace(/\/[^/]+$/, '');
d = directory.split('/');
d.pop();
directory = d.join('/');
var dojoConfig = {
tlmSiblingOfDojo: false,
async: true,
parseOnLoad: false,
packages: [
{ name: "dojo", location: directory + '/node_modules/dojo'},
{ name: "dijit", location: directory + '/example/js/lib/dijit'},
{ name: "dgrid", location: directory + '/target/classes/META-INF/resources/webjars/dgrid/1.1.0'},
{ name: "dstore", location: directory + '/target/classes/META-INF/resources/webjars/dstore/1.1.1'},
{ name: "wrighting", location: directory + '/src/main/resources/wrighting'}
]
};
</script>
<link rel="stylesheet" href="../target/classes/META-INF/resources/webjars/dgrid/1.1.0/css/dgrid.css">
<script type="text/javascript" src="../node_modules/dojo/dojo.js"></script>
<style media="screen" type="text/css">
@import url("js/lib/dijit/themes/claro/claro.css");
</style>
<style>
.errorMessage {
height: 1em;
margin: 1em 2em;
padding: 1em 2em;
background-color: #fcc;
color: #900;
}
.hidden {
display: none;
}
</style>
<script>
require(
[ "dojo/dom", "wrighting/cmis/CmisGrid", "dojo/domReady!" ],
function(dom, CmisGrid) {
//The share proxy URL is *probably* the better one to use, due to setting up authentication
//however, as of 5.1.g, you can't use it for updates
// var targetRoot = "http://localhost:8080/share/proxy/alfresco-api/-default-/public/cmis/versions/1.1/browser";
var targetRoot = "http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser";
//var testFolder = '/User Homes/admin';
var testFolder = '/sites/test-site/documentLibrary/Test';
this.grid = new CmisGrid(
{
targetRoot : targetRoot,
timeout : 10000,
query : {
/* Example statement - it's better to enumerate the fields rather than using *
'statement' : 'SELECT * FROM myns:mytype ' +
'join myns:mytype as p on cmis:objectId = p.cmis:objectId ' +
'join cm:titled as t on cmis:objectId = t.cmis:objectId',
*/
path : testFolder
},
columns : [ {
parentType: 'cmis:item',
field : "cmis:name",
formatter : this.formatLinkFunction
}, {
parentType: 'cm:titled',
field : "cm:title"
}, {
parentType: 'cm:titled',
field : "cm:description"
}, {
parentType: 'cmis:item',
"field" : "cmis:createdBy"
},{
parentType: 'cmis:item',
field : "cmis:creationDate"
}
]
});
this.grid.placeAt("grid-place");
this.grid.startup();
});
</script>
</head>
<body id="Share" class="yui-skin-lightTheme claro alfresco-share">
<div id="grid-place"></div></td>
</body>
</html>