Friday, April 3, 2015

How to add custom aspect to a node using Alfresco Share ?

How to add custom aspect  to a node using Alfresco Share.

var added= {added:["example:myTestAspect"]};
Alfresco.util.Ajax.request(
{
method: Alfresco.util.Ajax.POST,
requestContentType: Alfresco.util.Ajax.JSON,
url: Alfresco.constants.PROXY_URI +"slingshot/doclib/action/aspects/node/workspace/SpacesStore/d4ecd376-c0bf-4162-bee3-7a61f3e8ba51",
 dataObj:  added ,
             
successCallback:
{
fn: this.onAspectAdded_success,
scope: this
},
failureCallback:
{
fn: this.onAspectAdded_failure,
scope: this
}
});

function onAspectAdded_success()
{
alert('Added');
}

function onAspectAdded_failure()
{
alert('Failed');

}

No comments:

Post a Comment