vaadin

How to create different Themes on top of Valo in Vaadin?

北战南征 提交于 2020-01-22 21:29:09
问题 Now vaadin 7.3 has came out and it has the very nice Valo Theme . But I don't know how to import it to my project? Now I am using a default theme with my custom scss files. I would like to taste Valo . Please somebody help me how to import valo theme to my project. More over, how can I choose theme styles? Valo Theme Demo has different theme styles such as Default, Blueprint, Dark, Metro, Flat . How to choose this categories as I wish? 回答1: read the fine manual: https://vaadin.com/book

How to select just one row, prevent to unselect item in singleselect mode

馋奶兔 提交于 2020-01-21 11:59:50
问题 My question is very simple but I really didn't find any solution here. I have a Table setSelectable(true), setMultiselect(false), setImmediate(true). It works fine by first click and moving through the table using arrows. But if I click again to the row already having been selected, then it becomes unselected. How to prevent it? I'd like to have kept just one row always selected. 回答1: As from the Vaadin Book here: If the user clicks on an already selected item, the selection will deselected

How to select just one row, prevent to unselect item in singleselect mode

情到浓时终转凉″ 提交于 2020-01-21 11:59:46
问题 My question is very simple but I really didn't find any solution here. I have a Table setSelectable(true), setMultiselect(false), setImmediate(true). It works fine by first click and moving through the table using arrows. But if I click again to the row already having been selected, then it becomes unselected. How to prevent it? I'd like to have kept just one row always selected. 回答1: As from the Vaadin Book here: If the user clicks on an already selected item, the selection will deselected

Customize Vaadin Navigator

回眸只為那壹抹淺笑 提交于 2020-01-17 07:49:11
问题 I just extended Vaadin's navigator and overriden some some methods: public class MyNavigator extends Navigator { final SpringViewProvider viewProvider; public MyNavigator(UI ui, SingleComponentContainer container, SpringViewProvider viewProvider) { super(ui, container); this.viewProvider = viewProvider; addProvider(this.viewProvider); } @Override public void navigateTo(String navigationState) { if(ViewTokens.AVAILABLE_TOKENS.contains(navigationState)) { if(viewProvider.getView(navigationState

Vaadin app with MySQL database

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-16 17:08:25
问题 I am currently creating a Vaadin app that is supposed to get it's content data from a mysql database on a server (e.g. server run with Xampp). The problem is I am confused with a direction that most information sources give me. Every single tutorial has spring and spring boot code and there is no actual reference to creating a connection with data base in vaadin. I read a lot about the matter but still all that comes up are spring backends with some vaadin UI elements. Does it mean that

Vaadin app with MySQL database

牧云@^-^@ 提交于 2020-01-16 17:08:07
问题 I am currently creating a Vaadin app that is supposed to get it's content data from a mysql database on a server (e.g. server run with Xampp). The problem is I am confused with a direction that most information sources give me. Every single tutorial has spring and spring boot code and there is no actual reference to creating a connection with data base in vaadin. I read a lot about the matter but still all that comes up are spring backends with some vaadin UI elements. Does it mean that

How to access `ServletContext` from within a Vaadin 14 app?

白昼怎懂夜的黑 提交于 2020-01-16 13:05:26
问题 I am asking the same as the Question, How to access ServletContext from within a Vaadin 7 app?, but for Vaadin 14. In Vaadin 7, Vaadin provided the simple and handy call: ServletContext servletContext = VaadinServlet.getCurrent().getServletContext(); That particular call is no longer there on VaadinServlet in Vaadin 14. ➥ Is there an equivalent somewhere else in the Vaadin API? My end goal is to use the key-value "attribute" collection to keep references to my app-wide objects. 回答1: Methods

How to access `ServletContext` from within a Vaadin 14 app?

放肆的年华 提交于 2020-01-16 13:05:23
问题 I am asking the same as the Question, How to access ServletContext from within a Vaadin 7 app?, but for Vaadin 14. In Vaadin 7, Vaadin provided the simple and handy call: ServletContext servletContext = VaadinServlet.getCurrent().getServletContext(); That particular call is no longer there on VaadinServlet in Vaadin 14. ➥ Is there an equivalent somewhere else in the Vaadin API? My end goal is to use the key-value "attribute" collection to keep references to my app-wide objects. 回答1: Methods

Updating the page view after closing the modal window (Vaadin 8)

房东的猫 提交于 2020-01-16 08:38:10
问题 I use Vaadin version 8.9.3. I need to show a modal window when I click a button. In this window, the user enters the information, clicks on the button, the information is saved and displayed in a table in the main window. Main page: Modal page: To display the modal window I use BrowserWindowOpener. In order not to overload the question, I will give only a small piece of code. The FormLayout in which there is TextField("uid"), Grid and Button("Создать") - DeviceForm: private

Autowiring services in Vaadin view and components not working

百般思念 提交于 2020-01-15 10:26:51
问题 Hello fellow programmers! I am relatively new to Vaadin so spare me please. I am trying to autowire my service layer into my view as follows: @Route("") @PWA(name = "First time bruh", shortName = "Project Base") public class MainView extends VerticalLayout { private TextField filterText = new TextField(); private Grid<Customer> grid = new Grid<>(Customer.class); private CustomerForm customerForm = new CustomerForm(this); @Autowired private CustomerService customerService; and the