@InstanceName
    public String getCaption() {
        // todo rework when new instance name is ready
        String pattern =/* AppContext.getProperty("cuba.user.namePattern");
        if (StringUtils.isBlank(pattern)) {
            pattern =*/ "{1} [{0}]";
        /*}*/
        MessageFormat fmt = new MessageFormat(pattern);
        return StringUtils.trimToEmpty(fmt.format(new Object[]{
                StringUtils.trimToEmpty(username),
                StringUtils.trimToEmpty(name)
        }));
    }
@InstanceName
    public String getCaption() {
       
        String pattern  "{1} [{0}]";
       
        MessageFormat fmt = new MessageFormat(pattern);
        return StringUtils.trimToEmpty(fmt.format(new Object[]{
                StringUtils.trimToEmpty(username),
                StringUtils.trimToEmpty(name)
        }));
    }
@instancename public string getcaption() { string pattern "{1} [{0}]"; messageformat fmt = new messageformat(pattern); return stringutils.trimtoempty(fmt.format(new object[]{ stringutils.trimtoempty(username), stringutils.trimtoempty(name) })); }