Hi,
i have written below code in one js file .. to add custom functionality o n my action:
onActionCreatePackage: function dlA__createPackage(record)
{
if (!this.modules.createPackage)
{
this.modules.createPackage = new Alfresco.module.DoclibCreatePackage(this.id + "-createPackage");
}
var zIndex = 0;
if (this.fullscreen !== undefined && ( this.fullscreen.isWindowOnly || Dom.hasClass(this.id, 'alf-fullscreen')))
{
zIndex = 1000;
}
var parentElement = undefined;
if (Dom.hasClass(this.id, 'alf-true-fullscreen'))
{
parentElement = Dom.get(this.id);
}
this.modules.createPackage.setOptions(
{
siteId: this.options.siteId,
containerId: this.options.containerId,
path: this.currentPath,
files: record,
rootNode: this.options.repositoryBrowsing ? this.modules.createPackage.options.rootNode : this.options.rootNode,
repositoryRoot: this.options.repositoryRoot,
parentId: this.getParentNodeRef(record),
zIndex: zIndex,
parentElement : parentElement ? parentElement : undefined,
currNodeRef: record.nodeRef
}).showDialog()//.showDialog(); //setOptions(
}
But how can i access this currNodeRef in my .get.js file.
Thank you!!
1) You actually have to make a call to a web script somewhere - in the code sample you provided there is no mention of any call to a *.get.js web script anywhere
2) any event details that you need in your web script you have to pass yourself by providing them in the URL query arguments
3) any access to nodes will require you to lookup nodes based on their node ref or metadata - you don't magically get a node that you can access. In a JS file, this will usually be done vie search.findNode(ref) or search.query(paramObj)
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
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.