Hi Team,
I am using set and get methods in property panel for input fields.Please find the piece of code.
var ruleSetEntry = entryFactory.textField({
id: 'ruleSetId',
description: '',
label: 'RuleSetId',
modelProperty: 'ruleSetId',
set : function(element, values) {
var businessObject = getBusinessObject(element),
newObjectList = [];
if (typeof values.ruleSet !== 'undefined' && values.ruleSet !== '') {
newObjectList.push(bpmnFactory.create('bpmn:RuleSetId', {
text: values.ruleSet
}));
}
return cmdHelper.setList(element, businessObject, 'ruleSetId', newObjectList);
},
get : function(element) {
var businessObject = getBusinessObject(element);
var documentations = businessObject.get('ruleSetId'), text = (documentations.length > 0) ? documentations[0].text : '';
return { ruleSetId: text };
}
});
group.entries.push(ruleSetEntry);
with this code i am getting ‘can not read property ‘length’ of undefined’.Please find the attached screenshot.Please let me know why this error coming in console.
Thanks
-Prameela