vaadin8

How to navigate through Vaadin grid and select an item using keyboard?

自古美人都是妖i 提交于 2021-02-19 04:26:25
问题 I'd like to know if it's possible to navigate through Vaadin grid or treegrid and select an item using only keyboard arrow keys? From what i've seen while testing the components, the default behavior seems to be either to move only to one specific cell in grid or to a specific row in treegrid. Selection can be achieved if the user presses spacebar. I've tried to add a shortcutListener to grid but it doesn't seem to work with arrow keys. And the grid scrollbar doesn't move with the selected

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

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

Get List<items> from Vaadin Grid

青春壹個敷衍的年華 提交于 2021-01-03 03:15:01
问题 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

How to change JSESSIONID after login in Vaadin8?

不羁岁月 提交于 2020-08-10 19:12:33
问题 I'm trying to implement session reinitialization for Vaadin for security reasons (Session_fixation) but failing to do so. I am using Vaadin 8.9.4 with @Push and WildFly 8.1.0.Final. Also using the Vaadin heartbeat and @PreserveOnRefresh annotation. I have tried using the VaadinService.reinitializeSession but with no luck. App just hangs, refresh will throw me back to login screen (with new JSESSSIONID though). Here's an example what I have tried: VaadinService.reinitializeSession

Copy text to clipboard in vaadin 8

余生颓废 提交于 2020-03-22 09:18:56
问题 I want to ask how to correctly copy some text to clipboard in vaadin 8 java web application. I have found solution that works in Chrome and IE, but does not work in Firefox. The Firefox is always saying error " document.execCommand(‘cut’/‘copy’) was denied because it was not called from inside a short running user-generated event handler. " in console. The only way how to get Firefox to copy text to clipboard is by some user-triggered event handler (click or focus events). But I have failed

Copy text to clipboard in vaadin 8

跟風遠走 提交于 2020-03-22 09:16:24
问题 I want to ask how to correctly copy some text to clipboard in vaadin 8 java web application. I have found solution that works in Chrome and IE, but does not work in Firefox. The Firefox is always saying error " document.execCommand(‘cut’/‘copy’) was denied because it was not called from inside a short running user-generated event handler. " in console. The only way how to get Firefox to copy text to clipboard is by some user-triggered event handler (click or focus events). But I have failed

How to enter timestamp in Vaadin 8

血红的双手。 提交于 2020-02-25 03:03:11
问题 I am trying to enter timestamp using DateTimeField but in my entity i am having java.sql.timestamp . Converting datetimefield to timestamp is giving error ConversionClass package com.vaadin.convertor; import java.sql.Timestamp; import java.time.LocalDateTime; import com.vaadin.data.Converter; import com.vaadin.data.Result; import com.vaadin.data.ValueContext; @SuppressWarnings("serial") public class StringTimestampConvertor implements Converter<LocalDateTime, Timestamp> { @SuppressWarnings(