/** * Capitalizes the string, and inserts a space before each upper case character (or sequence of upper case * characters). Thus "userId" becomes "User Id", etc. Also, converts underscore into space (and capitalizes the * following word), thus "user_id" also becomes "User Id". */ public static String toUserPresentable(String id) { return InternalCommonsUtils.toUserPresentable(id); }
/** * Capitalizes the string, and inserts a space before each upper case character (or sequence of upper case * characters). Thus "userId" becomes "User Id", etc. Also, converts underscore into space (and capitalizes the * following word), thus "user_id" also becomes "User Id". */ public static String toUserPresentable(String id) { return InternalCommonsUtils.toUserPresentable(id); }
/** * Looks for a label within the messages based on the id. If found, it is used, otherwise the name is converted to a * user presentable form. */ public static String defaultLabel(String id, Messages messages, String propertyExpression) { String key = id + "-label"; if (messages.contains(key)) return messages.get(key); return toUserPresentable(extractIdFromPropertyExpression(InternalCommonsUtils.lastTerm(propertyExpression))); }