@ Override public String getItemCaption ( final Object itemId ) { if ( itemId != null && itemId . equals ( getValue ( ) ) && ! StringUtils . isEmpty ( selectedValueCaption ) ) { return selectedValueCaption ; } return super . getItemCaption ( itemId ) ; }
Overriden in order to return the caption for the selected distribution set from cache . Otherwise it could lead to multiple database queries trying to retrieve the caption from container when it is not present in filtered options .