_setupDataSources: function DemInter__setupDataSources()
{
var listNodeRef = new Alfresco.util.NodeRef('workspace://SpacesStore/4c5b7844-78f6-48f0-b753-e73709dd7317');
//var listNodeRef = "workspace/SpacesStore/4c5b7844-78f6-48f0-b753-e73709dd7317";
console.log("nb colonne " + this.datalistColumns.length);
for (var i = 0, ii = this.datalistColumns.length; i < ii; i++)
{
var column = this.datalistColumns[i],
columnName = column.name.replace(":", "_"),
fieldLookup = (column.type == "property" ? "prop" : "assoc") + "_" + columnName;
this.dataRequestFields.push(columnName);
this.dataResponseFields.push(fieldLookup);
this.datalistColumns[fieldLookup] = column;
}
// DataSource definition
this.widgets.dataSource = new YAHOO.util.DataSource(Alfresco.constants.PROXY_URI + 'slingshot/datalists/data/node/' + listNodeRef.uri,
{
connMethodPost: true,
connXhrMode: "queueRequests",
responseType: YAHOO.util.DataSource.TYPE_JSON,
responseSchema:
{
resultsList: "items",
metaFields:
{
totalRecords: "totalRecords"
}
}
});
this.widgets.dataSource.connMgr.setDefaultPostHeader(Alfresco.util.Ajax.JSON);
// Intercept data returned from data webscript to extract custom metadata
this.widgets.dataSource.doBeforeCallback = function DemInter_doBeforeCallback(oRequest, oFullResponse, oParsedResponse)
{
// Container userAccess event
var permissions = oFullResponse.metadata.parent.permissions;
if (permissions && permissions.userAccess)
{
Bubbling.fire("userAccess",
{
userAccess: permissions.userAccess
});
}
return oParsedResponse;
};
},
12:35:08,157 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 03110005 Failed to convert request to JSON
org.springframework.extensions.webscripts.WebScriptException: 03110005 Failed to convert request to JSON
at org.springframework.extensions.webscripts.json.JSONReader.read(JSONReader.java:82)
at org.springframework.extensions.webscripts.json.JSONReader.createScriptParameters(JSONReader.java:93)
at org.springframework.extensions.webscripts.AbstractWebScript.createScriptParameters(AbstractWebScript.java:407)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:81)
at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:377)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:436)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:466)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:304)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)
at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.json.JSONException: A JSONObject text must begin with '{' at character 0
at org.json.JSONTokener.syntaxError(JSONTokener.java:413)
at org.json.JSONObject.<init>(JSONObject.java:180)
at org.json.JSONObject.<init>(JSONObject.java:420)
at org.springframework.extensions.webscripts.json.JSONReader.read(JSONReader.java:77)
… 27 more
Le noderef est le bon j'ai vérifié dans Alfresco Explorer ainsi que dans la page datalists.
{
"status" :
{
"code" : 500,
"name" : "Internal Error",
"description" : "An error inside the HTTP server which prevented it from fulfilling the request."
},
"message" : "03110013 Failed to convert request to JSON",
"exception" : "org.springframework.extensions.webscripts.WebScriptException - 03110013 Failed to convert request to JSON",
"callstack" :
[
"" ,"org.json.JSONException: A JSONObject text must begin with '{' at character 0"
,"org.json.JSONTokener.syntaxError(JSONTokener.java:413)"
,"org.json.JSONObject.<init>(JSONObject.java:180)"
,"org.json.JSONObject.<init>(JSONObject.java:420)"
,"org.springframework.extensions.webscripts.json.JSONReader.read(JSONReader.java:77)"
,"org.springframework.extensions.webscripts.json.JSONReader.createScriptParameters(JSONReader.java:93)"
,"org.springframework.extensions.webscripts.AbstractWebScript.createScriptParameters(AbstractWebScript.java:407)"
,"org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:81)"
,"org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:377)"
,"org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)"
,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:436)"
,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:466)"
,"org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:304)"
,"org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)"
,"org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)"
,"org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)"
,"javax.servlet.http.HttpServlet.service(HttpServlet.java:717)"
,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)"
,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)"
,"org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)"
,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)"
,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)"
,"org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)"
,"org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)"
,"org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)"
,"org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)"
,"org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)"
,"org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)"
,"org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)"
,"org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)"
,"org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)"
,"java.lang.Thread.run(Thread.java:619)"
,"org.springframework.extensions.webscripts.WebScriptException: 03110013 Failed to convert request to JSON"
,"org.springframework.extensions.webscripts.json.JSONReader.read(JSONReader.java:82)"
],
"server" : "Community v3.4.0 (d 3370) schema 4 113",
"time" : "11 avr. 2011 15:01:14"
}
Alfresco.util.Ajax.jsonPost({
url: Alfresco.constants.PROXY_URI + "slingshot/datalists/data/node/workspace/SpacesStore/4c5b7844-78f6-48f0-b753-e73709dd7317",
successCallback: {
fn: function (res) {
console.log(res.json);
}
},
failureCallback: {
fn: function (response) {
console.log('error');
}
}
});
{
"status" :
{
"code" : 500,
"name" : "Internal Error",
"description" : "An error inside the HTTP server which prevented it from fulfilling the request."
},
"message" : "03120008 Wrapped Exception (with status template): 03120005 Failed to execute script 'classpath*:alfresco\/templates\/webscripts\/org\/alfresco\/slingshot\/datalists\/data.post.json.js': 03120004 TypeError: Cannot read property \"filterData\" from null (file:\/opt\/alfresco-3.4.d\/tomcat\/webapps\/alfresco\/WEB-INF\/classes\/alfresco\/templates\/webscripts\/org\/alfresco\/slingshot\/datalists\/data.post.json.js#290)",
"exception" : "org.springframework.extensions.webscripts.WebScriptException - 03120008 Wrapped Exception (with status template): 03120005 Failed to execute script 'classpath*:alfresco\/templates\/webscripts\/org\/alfresco\/slingshot\/datalists\/data.post.json.js': 03120004 TypeError: Cannot read property \"filterData\" from null (file:\/opt\/alfresco-3.4.d\/tomcat\/webapps\/alfresco\/WEB-INF\/classes\/alfresco\/templates\/webscripts\/org\/alfresco\/slingshot\/datalists\/data.post.json.js#290)",
"callstack" :
[
"" ,"org.mozilla.javascript.EcmaError: TypeError: Cannot read property \"filterData\" from null (file:\/opt\/alfresco-3.4.d\/tomcat\/webapps\/alfresco\/WEB-INF\/classes\/alfresco\/templates\/webscripts\/org\/alfresco\/slingshot\/datalists\/data.post.json.js#290)"
,"org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3350)"
,"org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3340)"
,"org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3356)"
,"org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3375)"
,"org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3388)"
,"org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1362)"
,"org.mozilla.javascript.gen.c7._c5(file:\/opt\/alfresco-3.4.d\/tomcat\/webapps\/alfresco\/WEB-INF\/classes\/alfresco\/templates\/webscripts\/org\/alfresco\/slingshot\/datalists\/data.post.json.js:290)"
,"org.mozilla.javascript.gen.c7.call(file:\/opt\/alfresco-3.4.d\/tomcat\/webapps\/alfresco\/WEB-INF\/classes\/alfresco\/templates\/webscripts\/org\/alfresco\/slingshot\/datalists\/data.post.json.js)"
,"org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)"
,"org.mozilla.javascript.gen.c7._c10(file:\/opt\/alfresco-3.4.d\/tomcat\/webapps\/alfresco\/WEB-INF\/classes\/alfresco\/templates\/webscripts\/org\/alfresco\/slingshot\/datalists\/data.post.json.js:698)"
,"org.mozilla.javascript.gen.c7.call(file:\/opt\/alfresco-3.4.d\/tomcat\/webapps\/alfresco\/WEB-INF\/classes\/alfresco\/templates\/webscripts\/org\/alfresco\/slingshot\/datalists\/data.post.json.js)"
,"org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)"
,"org.mozilla.javascript.gen.c7._c0(file:\/opt\/alfresco-3.4.d\/tomcat\/webapps\/alfresco\/WEB-INF\/classes\/alfresco\/templates\/webscripts\/org\/alfresco\/slingshot\/datalists\/data.post.json.js:748)"
,"org.mozilla.javascript.gen.c7.call(file:\/opt\/alfresco-3.4.d\/tomcat\/webapps\/alfresco\/WEB-INF\/classes\/alfresco\/templates\/webscripts\/org\/alfresco\/slingshot\/datalists\/data.post.json.js)"
,"org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)"
,"org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)"
,"org.mozilla.javascript.gen.c7.call(file:\/opt\/alfresco-3.4.d\/tomcat\/webapps\/alfresco\/WEB-INF\/classes\/alfresco\/templates\/webscripts\/org\/alfresco\/slingshot\/datalists\/data.post.json.js)"
,"org.mozilla.javascript.gen.c7.exec(file:\/opt\/alfresco-3.4.d\/tomcat\/webapps\/alfresco\/WEB-INF\/classes\/alfresco\/templates\/webscripts\/org\/alfresco\/slingshot\/datalists\/data.post.json.js)"
,"org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:472)"
,"org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:190)"
,"org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:282)"
,"org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:102)"
,"org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:981)"
,"org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86)"
,"org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:377)"
,"org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)"
,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:436)"
,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:466)"
,"org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:304)"
,"org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)"
,"org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)"
,"org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)"
,"javax.servlet.http.HttpServlet.service(HttpServlet.java:717)"
,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)"
,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)"
,"org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)"
,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)"
,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)"
,"org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)"
,"org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)"
,"org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)"
,"org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)"
,"org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)"
,"org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)"
,"org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)"
,"org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)"
,"org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)"
,"java.lang.Thread.run(Thread.java:619)"
,"org.alfresco.error.AlfrescoRuntimeException: 03120004 TypeError: Cannot read property \"filterData\" from null (file:\/opt\/alfresco-3.4.d\/tomcat\/webapps\/alfresco\/WEB-INF\/classes\/alfresco\/templates\/webscripts\/org\/alfresco\/slingshot\/datalists\/data.post.json.js#290)"
,"org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:488)"
,"org.alfresco.scripts.ScriptException: 03120005 Failed to execute script 'classpath*:alfresco\/templates\/webscripts\/org\/alfresco\/slingshot\/datalists\/data.post.json.js': 03120004 TypeError: Cannot read property \"filterData\" from null (file:\/opt\/alfresco-3.4.d\/tomcat\/webapps\/alfresco\/WEB-INF\/classes\/alfresco\/templates\/webscripts\/org\/alfresco\/slingshot\/datalists\/data.post.json.js#290)"
,"org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:194)"
,"org.springframework.extensions.webscripts.WebScriptException: 03120008 Wrapped Exception (with status template): 03120005 Failed to execute script 'classpath*:alfresco\/templates\/webscripts\/org\/alfresco\/slingshot\/datalists\/data.post.json.js': 03120004 TypeError: Cannot read property \"filterData\" from null (file:\/opt\/alfresco-3.4.d\/tomcat\/webapps\/alfresco\/WEB-INF\/classes\/alfresco\/templates\/webscripts\/org\/alfresco\/slingshot\/datalists\/data.post.json.js#290)"
,"org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:758)"
],
"server" : "Community v3.4.0 (d 3370) schema 4,113",
"time" : "Apr 12, 2011 8:46:20 AM"
}
dataObj: {
filter: "all"
}
Alfresco.util.Ajax.jsonPost({
url: Alfresco.constants.PROXY_URI + "slingshot/datalists/data/node/workspace/SpacesStore/4c5b7844-78f6-48f0-b753-e73709dd7317",
dataObj: {
filter: "all"
},
successCallback: {
fn: function (res) {
console.log(res.json);
}
},
failureCallback: {
fn: function (response) {
console.log('error');
}
}
});
dataObj: {
filter: {filterId: "all", filterData: ""}
}
// DataSource definition
this.widgets.dataSource = new YAHOO.util.DataSource(Alfresco.constants.PROXY_URI + 'slingshot/datalists/data/node/' + listNodeRef.uri,
{
connMethodPost: true,
responseType: YAHOO.util.DataSource.TYPE_JSON,
connXhrMode: "queueRequests",
responseSchema:
{
resultsList: "items",
fields :{
"filter" :{ "filterData" : "",
"filterId" : "all"
}
},
metaFields:
{
paginationRecordOffset: "startIndex",
totalRecords: "totalRecords"
}
}
});
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.