AnsweredAssumed Answered

Custom Renders

Question asked by c4lc4ll on Mar 6, 2012
Latest reply on May 16, 2014 by izodev
    I have created a custom action which needs severl parameters. In order to set these parameters I add a js "handler" rule-config-action-custom.js but I don't know how to create new renders.
For example I want to create a render, template-picker in oder to list (and select) all template files in /company_home/dictionary/content_templates.

I start from this code
            /* Mark this renderer as "manual" in edit mode so no default ui handling is done */
               edit: true
            /* Object to save values in */
            currentCtx: {},
            edit: function (containerEl, configDef, paramDef, ruleConfig, value)
               // Save variables from the last click in the currentCtx object
               this.renderers["arca:template-picker"].currentCtx =
                  configDef: configDef,
                  ruleConfig: ruleConfig,
                  paramDef: paramDef
               // Create a category picker
               var picker = new Alfresco.module.ControlWrapper(Alfresco.util.generateDomId());
                  type: "category",
                  container: containerEl,
                  value: (ruleConfig.parameterValues ? ruleConfig.parameterValues["template_node"] : null),
                     multipleSelectMode: false
                     fn: function(obj)
                        // When picker is closed make sure we save the values from the picker in the hidden form fields
                        var ctx = this.renderers["arca:template-picker"].currentCtx;
                        // this._setHiddenParameter(ctx.configDef, ctx.ruleConfig, "category-aspect", "cm:generalclassifiable");
                        // this._setHiddenParameter(ctx.configDef, ctx.ruleConfig, "category-value", obj.selectedItems[0]);
                        // Re run validations for the form connected to the config component
                     scope: this

But I don't know how to go on after var ctx ………..