07-25-2012 05:49 AM
function main()
{
var json = remote.call("/api/task-instances?state=completed");
if (json.status == 200)
{
data = eval('(' + json + ')');
}
model.data = data.data;
}
main();
2)<Project home>/source/web/components/dashlets/mydashlet.js
…
loadData: function MyDashlet_loadData()
{
alert(model.data);
}
…
07-25-2012 01:07 PM
Alfresco.util.Ajax.request(
{
method: "POST",
url: "/alfresco/service/com/someservice",
dataObj:
{
var1:'value1',
var2:'value2',
},
successCallback:
{
fn: function dlA_onActionDetails_refreshSuccess(response)
{
var rawResponse = response.serverResponse.responseText+"";
var obj = eval('(' + rawResponse + ')');
//to do something with this object…
}
}
});
07-27-2012 01:31 AM
…
<script type="text/javascript">//<![CDATA[
var d=new Alfresco.dashlet.MyDashlet("${args.htmlid}").setOptions(
{
"componentId": "${instance.object.id}",
}).setMessages(
${messages}
);
<#list data as item>
d.setData("${item.id}", "${item.name}", "${item.title}", "${item.state}", "${item.properties.bpm_description}");
</#list>
//]]></script>
…
2) mydashlet.js
…
setData: function MyDashlet_setData(id, name, title, state, description)
{
//just passing data from view to my global array
var o = new Object();
o.id=id;
o.name=name;
o.title=title;
o.state=state;
o.description=description;
tasks.push(o);
},
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.