vaadin

How can I see details to grid in Vaadin flow?

穿精又带淫゛_ 提交于 2020-01-06 08:00:29
问题 In my Vaadin flow project, I have a grid and I set some items but it shows like grid data items I want a decent format that a user can see specific details not like. Any idea or is there any component in vaadin to make this pretty? 回答1: There are two options to do that: provide a better ValueProvider than the .toString() , that is used in your property right now. E.g. grid.addColumn(person -> Integer.toString(person.getYearOfBirth())) .setHeader("Year of birth"); TemplateRenderer : You can

Uploading contents of a text file to a string in memory using the “Upload” widget in Vaadin 14

与世无争的帅哥 提交于 2020-01-06 02:46:05
问题 I know Vaadin 14 offers the Upload component for the user to either pick a file(s) to upload or to drag-and-drop file(s). But I am not sure how to use it. I want the contents of a plain text file on the web browser’s machine to load into memory as a String or CharSequence on the server machine. While the description page for that component has some examples, I could use a complete yet minimal example of loading plain text. 回答1: Here is an example view in Vaadin 14.1.0.alpha3. I am not an

Error when creating a new Vaadin project in eclipse

不打扰是莪最后的温柔 提交于 2020-01-06 01:25:34
问题 When creating a new Vaadin 7 project in eclipse I'm getting this error: Failed while installing Dynamic Web Module 3.1 (see screenshot). Anyone knows why? The sources are not begin populated. I'm using Vaadin 7.3.6, Tomcat 8, Eclipse Luna Service Release 1 (4.4.1). Thanks for your help! This is the error in the log !ENTRY org.eclipse.jst.j2ee 4 0 2014-12-15 20:41:55.090 !MESSAGE No IModelProvider exists for project P/test of version: Dynamic Web Module 3.1 !STACK 0 java.lang

After importing a Maven project into IntelliJ 2019.3, the bundled classes are not on class path

自作多情 提交于 2020-01-05 08:29:08
问题 After importing a newly created Vaadin 14.0.x project, and using the Import Project feature to create a Maven-driven project in IntelliJ 2019.3 EAP, I get a message saying "Cannot resolving symbol". The error message offers me a button to "Add library … to classpath". But the necessary libraries are already loaded by Maven as dependencies. So this makes no sense. I retried the import 3 times. On each effort I opened another project to run the File > Invalidate Caches / Restart menu item. This

Does highcharts (or vaadin) have built-in abilities to use an algorithm like Ramer–Douglas–Peucker?

早过忘川 提交于 2020-01-05 06:56:20
问题 Using Vaadin's charts (which ultimately uses HighCharts), I'm trying to plot a line graph with over 10,000 points. It actually works reasonably quickly (a couple seconds to plot). However, I wonder if it can be much faster, as I came accross a similar problem when using JavaFx charts and discovered that people have implemented a solution using the "Ramer–Douglas–Peucker algorithm" to reduce the number of datapoints in such a manner that it's basically noticeable to the human eye when its

Close the browser window in Vaadin

痞子三分冷 提交于 2020-01-05 06:46:24
问题 I have google'd quite a lot but was not able to find a solution for this problem. I have a Vaadin application that runs in a browser window. I have a logout button on it, clicking on it must invalidate the session and close the browser window. I was able to get this code to invalidate the session and close the application. However, I am looking to close the browser window also, which is where I am not having any success WebApplicationContext webCtx = (WebApplicationContext) appRef

Close the browser window in Vaadin

穿精又带淫゛_ 提交于 2020-01-05 06:46:09
问题 I have google'd quite a lot but was not able to find a solution for this problem. I have a Vaadin application that runs in a browser window. I have a logout button on it, clicking on it must invalidate the session and close the browser window. I was able to get this code to invalidate the session and close the application. However, I am looking to close the browser window also, which is where I am not having any success WebApplicationContext webCtx = (WebApplicationContext) appRef

How to create a Complex Table in Vaadin 7 (Complex header is not required)

女生的网名这么多〃 提交于 2020-01-05 05:27:08
问题 I am trying to create a table similar to the below figure in Vaadin 7. Figure: http://i.stack.imgur.com/dvkO1.png I was thinking of these 3 possibilities. Still I don't have a clarity on what I should go ahead with implementation. 1) Using Column Generator. I referred https://vaadin.com/book/vaadin7/-/page/components.table.html 2) Having a table inside a table item. But I am finding difficulty in creating that also. I am unhappy about the look and feel. 3) Searching for if there is anyway we

How to use PollListener in vaadin?

為{幸葍}努か 提交于 2020-01-05 05:09:48
问题 I'm trying to use PollListener in vaadin with following code: @VaadinUI @PreserveOnRefresh public class ApplicationUI extends UI { @Override protected void init(VaadinRequest request) { setPollInterval(1000); access(new Runnable() { @Override public void run() { System.out.println("TEST POLL: " + counter++); //is only printed a single time } }); } } The output "TEST POLL 0" is printed a single time when I open my application. But that's it. What might I have missed? 回答1: You don't have to do

How to set multiple levels in a tree grid with Vaadin 8.1?

泄露秘密 提交于 2020-01-05 04:43:06
问题 I need to display three levels in a vaadin tree grid. I use the 'setItems' method to set values to the tree grid as per the vaadin documentation. How can I set a third nested level to the grid. TreeGrid<Project> treeGrid = new TreeGrid<>(); treeGrid.setItems(getProjects(), Project::getSubProjects); treeGrid.addColumn(Project::getName).setCaption("Name"); treeGrid.addColumn(Project::getStatus).setCaption("Status"); I've followed the code snippet in the vaadin 8.1 documentation https://vaadin