@Override
public String convertValueToText(Object value, boolean selected,
boolean expanded, boolean leaf, int row, boolean hasFocus) {
if (value != null) {
if (value instanceof PortfolioNode) {
PortfolioNode portfolioNode = (PortfolioNode) value;
return portfolioNode.getName();
} else if (value instanceof Position) {
Position position = (Position) value;
ExternalIdBundle bundle = position.getSecurityLink().getExternalId().withCustomIdOrdering(_idBundleComparator);
if (!bundle.isEmpty()) {
return bundle.iterator().next() + " (" + position.getQuantity() + ")";