vaadin/src/main/java/net/typedrest/vaadin/forms/AutoEntityForm.java
protected Component buildAndBind(Class<TEntity> entityType) {
        FormLayout layout = new FormLayout();

        getPropertiesWithoutAnnotation(entityType, EditorHidden.class).forEach((property) -> {
            if (property.getWriteMethod() == null) {
                return;
            }

            Component component = buildAndBind(property);
            component.setWidth(100, Unit.PERCENTAGE);
            if (component.getCaption() == null) {
                component.setCaption(propertyIdToHumanFriendly(property.getName()));
            }
            if (component instanceof DateField) {
                ((DateField) component).setResolution(Resolution.SECOND);
            }
            layout.addComponent(component);

            getAnnotation(entityType, property, Description.class)
                    .ifPresent(x -> layout.addComponent(buildDescriptionComponent(property, x.value())));
        }
protected Component buildAndBind(Class<TEntity> entityType) {
        FormLayout layout = new FormLayout();

        getPropertiesWithoutAnnotation(entityType, EditorHidden.class).forEach((property) -> {
            if (property.getWriteMethod() == null) {
                return;
            }

            Component component = buildAndBind(property);
            component.setWidth(100, Unit.PERCENTAGE);
            if (component.getCaption() == null) {
                component.setCaption(propertyIdToHumanFriendly(property.getName()));
            }
            if (component instanceof DateField) {
                ((DateField) component).setResolution(Resolution.SECOND);
            }
            layout.addComponent(component);

            getAnnotation(entityType, property, Description.class)
                    .ifPresent(x -> layout.addComponent(buildDescriptionComponent(property, x.value())));
        }
protected Component buildAndBind ( Class < TEntity > entityType ) { FormLayout layout = new FormLayout ( ) ; getPropertiesWithoutAnnotation ( entityType , EditorHidden . class ) . forEach ( ( property ) - > { if ( property . getWriteMethod ( ) == null ) { return ; } Component component = buildAndBind ( property ) ; component . setWidth ( 100 , Unit . PERCENTAGE ) ; if ( component . getCaption ( ) == null ) { component . setCaption ( propertyIdToHumanFriendly ( property . getName ( ) ) ) ; } if ( component instanceof DateField ) { ( ( DateField ) component ) . setResolution ( Resolution . SECOND ) ; } layout . addComponent ( component ) ; getAnnotation ( entityType , property , Description . class ) . ifPresent ( x -> layout . addComponent ( buildDescriptionComponent ( property , x . value ( ) ) ) ) ; }
Builds a form layout with fields for all properties exposed by the
entity.

@param entityType The type of entity to build a form for.
@return The form layout.
Builds a form layout with fields for all properties exposed by the entity .