vaadin-flow

Vaadin Flow 18/19 without Spring Boot?

空扰寡人 提交于 2021-02-19 05:38:14
问题 The https://start.vaadin.com page creates a new Vaadin Flow project for versions 18 or 19 (pre-release). But the resulting project requires Spring Boot. I do not want Spring. I do not want Spring Boot. Both solve problems I do not have. Both add complications I do not want. Is there a way to work with Vaadin 18 or 19 without Spring, with just plain Servlet technology? Is there any Maven archetype available for Vaadin 18 or 19 but free of Spring & Spring Boot? Formerly, we had the Maven

Vaadin Flow Grid. How get the data/rows from grid

孤者浪人 提交于 2021-02-08 10:12:53
问题 i use Grid with DataProvider and lazy loading to load the data into the grid. How can i get the data from grid after the data was loaded? I mean, i need get a data from grid that already have a data. i need something like grid.get.... thx. 回答1: I would use grid.getDataCommunicator().fetchFromProvider(..) which returns stream of items method for this, see API spec here: https://demo.vaadin.com/javadoc/com.vaadin/vaadin-core/10.0.2/com/vaadin/flow/data/provider/DataCommunicator.html

How to create a “spectrum” chart using Vaadin 14+

若如初见. 提交于 2021-01-29 05:05:10
问题 Is there a way in Vaadin 14 (or higher) to create what's called a "spectra" chart? Essentially, it's 99% identical to a "scatter" chart, except that a line is drawn from the point all the way down to the x-axis (please see figures 1 and 2 below which more or looks like a correct spectra chart.). I created a "hack" to achieve these quasi spectrum charts in Vaadin using "line charts" and by adding two "fake" points of intensity 0 to the left and to the right of my immediate point (as shown in

Download with file name defaulting to date-time of user event in Vaadin Flow app

孤街醉人 提交于 2021-01-29 03:00:39
问题 In my Vaadin Flow web app (version 14 or later), I want to present to my user a link that will download a data file to them. The default name of the file to be downloaded should be determined at the moment the user initiates the download. I am aware of the Anchor widget in Vaadin Flow. With an Anchor , the default name for the downloaded file will be the resource name given in the URL of the link. Unfortunately, that is determined when the page loads rather than later when the user clicks the

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

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

Dynamically-created content for download without writing a file on server-side in Vaadin Flow web app

两盒软妹~` 提交于 2020-05-23 10:21:05
问题 In my Vaadin Flow web app (version 14 or later), I want to present to my user a link to download a data file. The contents of this download may be quite large. So I do not want to materialize the entirety of the content in memory all at once. I want to produce chunks of content in series, feeding the download one chunk at a time, so as to minimize my use of memory. Imagine, for example, a large number of rows from a database, where we feed one row at a time to the download. I am aware of the