AnsweredAssumed Answered

Access NodeRef in Webscript

Question asked by art99trash on Feb 23, 2016
Latest reply on Feb 26, 2016 by art99trash
I am attempting to create a custom action that invokes a webscript. The action will be available
on folders.

My action definition in share-config-custom.xml is:

<action id="my-action" type="pagelink" label="My Action"
   <param name="page">hdp/ws/my-action?nodeRef={node.nodeRef}</param>
      <permission allow="true">Write</permission>


  <shortname>Custom Action Page</shortname>
  <description>Custom action description</description>


<@processJsonModel group="share"/>

The problem I am having is that I cannot access the nodeRef argument in the Controller  my-action.get.js

Any help would be appreciated.

The controller, my-action.get.js

var noderx = args.nodeRef;

model.jsonModel = {
    widgets: [{
        id: "SET_PAGE_TITLE",
        name: "alfresco/header/SetTitle",
        config: {
            title: noderx + "-This is a simple page"
        name: "alfresco/layout/HorizontalWidgets",
        config: {
            widgetWidth: 50,
            widgets: [
                    name: "alfresco/logo/Logo",
                    config: {
                        logoClasses: "alfresco-logo-only"
                  name: "example/widgets/TemplateWidget"