How to use the existing comment web scripts to post?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2015 11:50 AM
Hello,
I have a problem to understand how to use especially the POST Web script (because of the use of comment.lib.js)
I need to understand how it works to implement a Aikau service which allows users to add comments everithings from a dialog form.
I am inspired by https://github.com/Alfresco/Aikau/blob/master/tutorial/chapters/Tutorial7.md
In comparison with the POST web script of groups :
1 - github) url : /api/rootgroups/{shortName}
1 - me) url : /api/node/{store_type}/{store_id}/{id}/comments (I have not seen an other comment webscript to POST a comment)
2 - github) in the model we can see
2 - me) the model send us to comment.lib.js , so I gone on C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\templates\webscripts\org\alfresco\repository\comments\comment.lib.ftl, but I seen nothing about adding or updating comments!!!
3 - github) in the custom service we have to write something like :
<blockcode>
this.serviceXhr({
url: AlfConstants.PROXY_URI + "api/rootgroups/" + payload.shortName,
method: "POST",
data: {
displayName: payload.displayName
}
});
</blockcode>
3 - me) i am not here ><
Thank you for future help!
I have a problem to understand how to use especially the POST Web script (because of the use of comment.lib.js)
I need to understand how it works to implement a Aikau service which allows users to add comments everithings from a dialog form.
I am inspired by https://github.com/Alfresco/Aikau/blob/master/tutorial/chapters/Tutorial7.md
In comparison with the POST web script of groups :
1 - github) url : /api/rootgroups/{shortName}
1 - me) url : /api/node/{store_type}/{store_id}/{id}/comments (I have not seen an other comment webscript to POST a comment)
2 - github) in the model we can see
displayName = json.get("displayName")
and model.group = groups.createRootGroup(shortName, displayName);
2 - me) the model send us to comment.lib.js , so I gone on C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\templates\webscripts\org\alfresco\repository\comments\comment.lib.ftl, but I seen nothing about adding or updating comments!!!
3 - github) in the custom service we have to write something like :
<blockcode>
this.serviceXhr({
url: AlfConstants.PROXY_URI + "api/rootgroups/" + payload.shortName,
method: "POST",
data: {
displayName: payload.displayName
}
});
</blockcode>
3 - me) i am not here ><
Thank you for future help!
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2015 09:30 AM
I find it is worry to do that but, I can see any other way, so I am writing my own web script.
