Skip to content

Commit

Permalink
Merge pull request #709 from Orckestra/bug/treeselector-select-by-ent…
Browse files Browse the repository at this point in the history
…ity-token

GetProperty returns EntityToken for SystemTreeNodeBinding
  • Loading branch information
mawtex authored Nov 28, 2019
2 parents 44ba5ae + d93cb5a commit cc0a3df
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 += "; ";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cc0a3df

Please sign in to comment.