/** * 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) { return InternalCommonsUtils.defaultLabel(id, messages, propertyExpression); }
/** * 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) { return InternalCommonsUtils.defaultLabel(id, messages, propertyExpression); }
public PropertyModelImpl(BeanModel model, String name, PropertyConduit conduit, Messages messages) { this.model = model; this.name = name; this.conduit = conduit; id = InternalCommonsUtils.extractIdFromPropertyExpression(name); label = InternalCommonsUtils.defaultLabel(id, messages, name); // TAP5-2305 if (conduit != null) { Sortable sortableAnnotation = conduit.getAnnotation(Sortable.class); if (sortableAnnotation != null) { sortable = sortableAnnotation.value(); } else { // Primitive types need to be converted to wrapper types before checking to see // if they are sortable. Class wrapperType = PlasticUtils.toWrapperType(getPropertyType()); sortable = Comparable.class.isAssignableFrom(wrapperType); } } }