alejandro-du / crudui

Automatically generate CRUD-like Vaadin views for any Java Bean
https://vaadin.com/directory#!addon/crud-ui-add-on
Apache License 2.0
86 stars 54 forks source link

Question: Implement select box field? #65

Closed DanielMartensson closed 4 years ago

DanielMartensson commented 4 years ago

Hi!

Is it possible to implement a select box field as a field provider?

        // Provider - role can be USER or ADMIN
        crud.getCrudFormFactory().setFieldProvider("role", new FieldProvider<Component, String>() {

            /**
             * 
             */
            private static final long serialVersionUID = 1L;

            @Override
            public HasValueAndElement<?, ?> buildField() {
                // TODO Auto-generated method stub
                return null;
            }

        });
alejandro-du commented 4 years ago

Hi, let's not use issues for questions. Please use the thread at:

https://vaadin.com/forum#!/thread/14437640

But yeah, it should be possible. You can also use a lambda expression to make the code simpler.