vaadin

View Constructor with Dependency Injection throws NPE

和自甴很熟 提交于 2021-01-28 18:44:37
问题 Yesterday I pushed my new Vaadin 13 Spring application to my server. When I then opened my app in the browser, the login and the dashboard view worked fine, but whenever I tried to navigate to a View that has a constructor with injected dependencies, it threw a NullPointerException. This never happens to me when I run the app locally! I am at a total loss here and have no idea how to fix this. I have tried all possible variations how to annotate the injections for the view constructor. They

How to have a click on component in a grid cell in Vaadin 8 Grid to select cells row?

隐身守侯 提交于 2021-01-28 03:49:22
问题 When clicking a cell in a Vaadin 8 Grid that contains component like VerticalLayout row does not get selected (using Vaadin 8.1.5). If the component does not fill the whole cell then clicking the unused area in cell makes the row selected. I have been researching how could the click on component be forwarded to the cell click listener but have not get any grip yet on that. Guess it is even not the best way to do it. What would be the solution? 回答1: I provide my own current solution as an

Resizing Vaadin Image

自作多情 提交于 2021-01-27 14:51:53
问题 I am inserting an image from file into a UI. I am creating it in Vaadin 7.6.8 by following these instructions. String basepath = VaadinService.getCurrent().getBaseDirectory().getAbsolutePath(); FileResource resource = new FileResource(new File(basepath + "/WEB-INF/images/image.png")); Image image = new Image("", resource); However I am unable to rescale or resize the image at all. The image is always being displayed in full size. Is there a way that I can scale down the image without using

Vaadin, Jetty, Spring Data, Maven - Exception

梦想与她 提交于 2021-01-27 06:20:22
问题 I'm trying to integrate Spring Data within our Vaadin project. So I tried running the following sample code which uses the same technologies: https://github.com/henrikerola/vaadin-spring-boot-todo The only thing I changed is that I added jetty as we need to use it for our project. Unfortunately, after jetty:run I'm getting the following exception: Exception in thread "main" java.util.ServiceConfigurationError: org.apache.juli.logging.Log: Provider org.eclipse.jetty.apache.jsp.JuliLog not a

Can the text in a column header wrap to multiple lines in a Grid in Vaadin 14?

纵然是瞬间 提交于 2021-01-04 05:28:56
问题 In above image, I have a Grid created in Vaadin 14. Notice the red lines where the column titles were not wrapping. I'm trying to figure out if it's possible (and safe/easy/standard) to get the column labels to wrap (like they would in Excel, for example). Neither I nor my colleagues could figure out how to do so. 回答1: You will need to adapt the Vaadin Grid styles as in the following snippet: /* wrap text in grid column headers */ [part~="header-cell"] { white-space: normal; } Include the CSS

Can the text in a column header wrap to multiple lines in a Grid in Vaadin 14?

隐身守侯 提交于 2021-01-04 05:27:54
问题 In above image, I have a Grid created in Vaadin 14. Notice the red lines where the column titles were not wrapping. I'm trying to figure out if it's possible (and safe/easy/standard) to get the column labels to wrap (like they would in Excel, for example). Neither I nor my colleagues could figure out how to do so. 回答1: You will need to adapt the Vaadin Grid styles as in the following snippet: /* wrap text in grid column headers */ [part~="header-cell"] { white-space: normal; } Include the CSS

Can the text in a column header wrap to multiple lines in a Grid in Vaadin 14?

99封情书 提交于 2021-01-04 05:24:12
问题 In above image, I have a Grid created in Vaadin 14. Notice the red lines where the column titles were not wrapping. I'm trying to figure out if it's possible (and safe/easy/standard) to get the column labels to wrap (like they would in Excel, for example). Neither I nor my colleagues could figure out how to do so. 回答1: You will need to adapt the Vaadin Grid styles as in the following snippet: /* wrap text in grid column headers */ [part~="header-cell"] { white-space: normal; } Include the CSS

Get List<items> from Vaadin Grid

时间秒杀一切 提交于 2021-01-03 03:21:15
问题 Problem: I have a Vaadin 8 Grid , and I can't find a way to extract the items inside of it. Description: Starting from a grid Grid<Pojo> myGrid = new Grid<>(); I've configured it so it can take data with lazy loading. myGrid.setDataProvider( (sortOrd, offset, limit) -> dao.getAllFiltered(offset, limit, filter), () -> dao.getCountAllFiltered(filter) ); At this point, I want to extraxt all the items from the grid (for putting that into an excel), something like List<Pojo> list = myGrid.getItems

Get List<items> from Vaadin Grid

人盡茶涼 提交于 2021-01-03 03:19:25
问题 Problem: I have a Vaadin 8 Grid , and I can't find a way to extract the items inside of it. Description: Starting from a grid Grid<Pojo> myGrid = new Grid<>(); I've configured it so it can take data with lazy loading. myGrid.setDataProvider( (sortOrd, offset, limit) -> dao.getAllFiltered(offset, limit, filter), () -> dao.getCountAllFiltered(filter) ); At this point, I want to extraxt all the items from the grid (for putting that into an excel), something like List<Pojo> list = myGrid.getItems

Get List<items> from Vaadin Grid

三世轮回 提交于 2021-01-03 03:17:19
问题 Problem: I have a Vaadin 8 Grid , and I can't find a way to extract the items inside of it. Description: Starting from a grid Grid<Pojo> myGrid = new Grid<>(); I've configured it so it can take data with lazy loading. myGrid.setDataProvider( (sortOrd, offset, limit) -> dao.getAllFiltered(offset, limit, filter), () -> dao.getCountAllFiltered(filter) ); At this point, I want to extraxt all the items from the grid (for putting that into an excel), something like List<Pojo> list = myGrid.getItems