/** * Returns the field label.<p> * * @param info the info * * @return the label */ private String getLabel(CmsAccountInfo info) { if (info.isAdditionalInfo()) { String label = CmsVaadinUtils.getMessageText("GUI_USER_DATA_" + info.getAddInfoKey().toUpperCase() + "_0"); if (CmsMessages.isUnknownKey(label)) { return info.getAddInfoKey(); } else { return label; } } else { return CmsVaadinUtils.getMessageText("GUI_USER_DATA_" + info.getField().name().toUpperCase() + "_0"); } }
/** * Returns the account info value for the given user.<p> * * @param user the user * * @return the value */ public String getValue(CmsUser user) { String value = null; if (isAdditionalInfo()) { value = (String)user.getAdditionalInfo(getAddInfoKey()); } else { try { PropertyUtilsBean propUtils = new PropertyUtilsBean(); value = (String)propUtils.getProperty(user, getField().name()); } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) { LOG.error("Error reading account info field.", e); } } return value; }
infoElement.addAttribute(A_FIELD, info.getField().name()); if (info.isAdditionalInfo()) { infoElement.addAttribute(A_ADD_INFO_KEY, info.getAddInfoKey());
if (info.isEditable()) { if (info.isAdditionalInfo()) { m_user.setAdditionalInfo(info.getAddInfoKey(), m_infos.getItemProperty(info).getValue()); } else { propUtils.setProperty(