I'm using alloy-ui Diagram Builder, I want to set Diagram Builder Property value when other Properties is set or change.
I have problem when name property is set or change other property is set for a new value but the table don't refresh. So it must click the node again for refreshing the property table.
How I can refreshing the property table?
This is my Attr Setting for setting the new value:
duration: {
setter: function(val) {
var instance = this;
var newVal = getBrackets( this.get("name") );
newVal = defaultDuration[newVal];
if( newVal == "" || newVal == null) newVal = 0;
if( val == "" || newVal != val ){
return newVal;
}
else{
return val;
}
}
}
You can listen to the
durationChangeevent on theDiagramBuilderin order to execute code when the value of thedurationattribute changes.You can do this using the
DiagramBuilder.on()Method:OR the
DiagramBuilder.after()Method: