How to set the model property of a child node in properties panel


#1

hello guys,
i want to set an get the modelproperty of a child node in properties panel
how can i achieve it ?


#2

Regarding your other topic, do you also already get a solution for this?


#4

hi Niklas
and thank you for asking
i get a solution for getting data but i’m looking for a solution for setter


#5

Like having a getter, you can also create a setter function.

EntryFactory.textBox({
   id: 'attribute',
   label: this.translate('attribute'),
   modelProperty: 'Attribute' ,
   get: function() { ... },
   set: function(element, values) { ... }
})

See this for further documentation. Make sure you really got the properties updated. The e.g. this example:

entryFactory.textBox({
    // ...

    set: function(element, values) {
      var bo = element.businessObject;
      var newProps = { /* .... whatever from values **/ }
      return cmdHelper.updateBusinessObject(element, bo, props);

    }
});

#6

thanks again niklas ,
it works for me
the problem was that i passed only one parameter to the set function so when passing two values it works


#7

Great to hear! You’re welcome.


#8