Skip to content
Permalink
Browse files

Merge pull request #709 from Orckestra/bug/treeselector-select-by-ent…

…ity-token

GetProperty returns EntityToken for SystemTreeNodeBinding
  • Loading branch information
mawtex committed Nov 28, 2019
2 parents 44ba5ae + d93cb5a commit cc0a3df443fec2a5bed8e41bea0a3f691ab3842d
@@ -601,16 +601,9 @@ TreeSelectorDialogPageBinding.prototype._updateDisplayAndResult = function (tree
var prop = this._selectionResult;

selections.each ( function ( binding ) {
if (prop == "EntityToken" && binding.node) {

result.add(
binding.node.getEntityToken()
);
} else {
result.add(
binding.getProperty(prop)
);
}
result.add(
binding.getProperty(prop)
);
value += binding.getLabel ();
if ( selections.hasNext ()) {
value += "; ";
@@ -633,6 +633,19 @@ SystemTreeNodeBinding.prototype.selectToken = function (entityToken) {
this.setHandle(this.node.getHandle());
}

/**
* Get bound element attribute or EnityToken.
* @overloads {Binding#getProperty}
*/
SystemTreeNodeBinding.prototype.getProperty = function ( attname ) {

if(attname == 'EntityToken' && this.node && this.node.getEntityToken()) {
return this.node.getEntityToken();
}

return SystemTreeNodeBinding.superclass.getProperty.call ( this, attname );
}

/**
* SystemTreeNodeBinding factory. Notice that we supply a {@link SystemNode} as argument here!
* @param {SystemNode} node

0 comments on commit cc0a3df

Please sign in to comment.
You can’t perform that action at this time.