03-06-2012 08:27 AM
renderers:
{
"arca:template-picker":
{
/* Mark this renderer as "manual" in edit mode so no default ui handling is done */
manual:
{
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());
picker.setOptions(
{
type: "category",
container: containerEl,
value: (ruleConfig.parameterValues ? ruleConfig.parameterValues["template_node"] : null),
controlParams:
{
multipleSelectMode: false
},
fnValueChanged:
{
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
this._updateSubmitElements(ctx.configDef);
},
scope: this
}
});
picker.show();
}
}
}
05-16-2014 02:54 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.