No able to access variable of YUI events

Showing results for 
Search instead for 
Did you mean: 
Member II

No able to access variable of YUI events


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( + "-createPackage");

var zIndex = 0;
if (this.fullscreen !== undefined && ( this.fullscreen.isWindowOnly || Dom.hasClass(, 'alf-fullscreen')))
zIndex = 1000;

var parentElement = undefined;
if (Dom.hasClass(, 'alf-true-fullscreen'))
parentElement = Dom.get(;

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 Reply

Re: No able to access variable of YUI events

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)