protected String getPropertyHeader(String propertyName) { String header = propertyToHeader.get(propertyName); if (header == null) { header = DefaultFieldFactory.createCaptionByPropertyId(propertyName); } return header; }
/** * Builds a field and binds it to the given property id using the field * binder. * * @param propertyId * The property id to bind to. Must be present in the field * finder. * @throws BindException * If there is a problem while building or binding * @return The created and bound field */ public Field<?> buildAndBind(Object propertyId) throws BindException { String caption = DefaultFieldFactory .createCaptionByPropertyId(propertyId); return buildAndBind(caption, propertyId); }
@Override public Field<?> createField(Item item, Object propertyId, Component uiContext) { Class<?> type = item.getItemProperty(propertyId).getType(); Field<?> field = createFieldByPropertyType(type); field.setCaption(createCaptionByPropertyId(propertyId)); return field; }
@Override public Field createField(Container container, Object itemId, Object propertyId, Component uiContext) { Property containerProperty = container.getContainerProperty(itemId, propertyId); Class<?> type = containerProperty.getType(); Field<?> field = createFieldByPropertyType(type); field.setCaption(createCaptionByPropertyId(propertyId)); return field; }
} else { caption = DefaultFieldFactory .createCaptionByPropertyId(propertyId);