vaadin

Vaadin LoginForm - signaling when user passed or failed authentication

会有一股神秘感。 提交于 2020-04-30 07:17:09
问题 I understand that in using the Login component of Vaadin 14, I must call addLoginListener to register a listener of my own that implements ComponentEventListener<AbstractLogin.LoginEvent> . In my implementing code, I can call the LoginEvent::getUsername and LoginEvent::getPassword methods to obtain the text values entered by the user. My listener code then determines if these credentials are correct. ➥ By what mechanism does my listener code communicate back to my LoginForm the results of the

Vaadin 14 - grid disappearing when using nested layout

社会主义新天地 提交于 2020-04-16 05:47:12
问题 After implementing nested layouts i faced the problem with rendering component containing grid. The analysis shows that is present in html but it has display-block attributes and the grid is never visible. I read the similar question (Vaadin 14 - Grid not Displaying/Populating When Used in Nested Layout) but the suggestions listed there brought me no result. Here comes my code: MainLayout.kt: @Theme(value = Material::class, variant = Material.DARK) class MainLayout : Composite<Div>(),

how to handle SSO redirect in Vaadin 14

夙愿已清 提交于 2020-04-16 05:45:48
问题 We have a Vaadin 14 (Flow) application which is fronted by an Apache reverse proxy that integrates with Gluu for authentication. When the session is not valid anymore, either because of session timeout or a logout in another browser tab/window, the Apache server will send a redirect to the Gluu server to let the user log in again. However when this happens for an internal Vaadin XHR call (Ajax request), Vaadin does not seem to handle this response very well, and shows an "Invalid JSON

how to export to csv/excel using vaadin grids?

泪湿孤枕 提交于 2020-04-11 06:45:34
问题 In Vaadin 14+, I'm creating grids and would like the users to have a stable/easy way to export the grid's contents to csv or, preferablly, Excel. To do so, I was surprised that Vaadin does not appear to provide this functionality, and so one has to use 3rd party developer plugins (such as https://vaadin.com/directory/component/exporter/overview). However, these plugins have numerous bugs (eg can't export grids with date values correctly to Excel etc.). Is there a recommended approach in

2020年九大Java开发框架都有什么?

早过忘川 提交于 2020-04-10 09:41:22
2020年九大java开发框架,小编主要介绍Spring框架、Hibernate框架、Struts框架、Play框架、GoogleWebToolkit框架、Grails框架、Blade框架、JavaServerFaces框架、Vaadin框架九大框架,希望您可以多java框架有更多的认识。 一、Spring框架   Spring框架框架排名首位,具有开发复杂Web应用程序的出色能力,这些应用程序因性能突出而广受赞誉。使Java开发人员能够轻松地创建企业级应用程序。Web应用程序开发人员可以证明Spring框架的能力。是Spring成为Java开发人员最爱的原因。 在开发人员的选择中,SpringMVC和SpringBoot远远领先于其他Java技术。对于开发人员来说,这里的一大优势是他们可以不受其他模块约束而专注于一个模块,因为Spring利用了控制反转(IoC)。其他优点是一个全面的配置模型,支持传统数据库和现代数据库(如NoSQL),并通过支持面向方面编程来支持内聚开发。提供一些模块如SpringMVC、SpringCore、SpringBoot、SpringTransaction等。 二、Hibernate框架   作为一个对象关系映射(ORM)数据库,改变了我们以前查看数据库的方式。尽管不是一个全栈框架,但可以极其轻松地为多个数据库转换数据。支持多个数据库的能力使很容易扩展

Vaadin 14 - How to make sure of session related objects get cleaned up after SessionDestroy

余生长醉 提交于 2020-03-23 08:04:34
问题 Here is my MainView Class in a Vaadin 14.1.18 SpringBoot application. @Route public class MainView extends VerticalLayout implements SessionDestroyListener{ Logger logger = LoggerFactory.getLogger(MainView.class); public MainView() { // To make sure of doing some Houskeeping after Session Timeout VaadinService.getCurrent().addSessionDestroyListener(this); String sessionId = VaadinSession.getCurrent().getSession().getId(); Zombie zombie = new Zombie(sessionId); zombie.start(); add(new Span(

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

Vaadin 14 - Grid not Displaying/Populating When Used in Nested Layout

大城市里の小女人 提交于 2020-03-05 04:04:43
问题 I am attempting to build a Vaadin/Spring app. I am using Spring Security and have based the security portions of the app around the samples and information in this tutorial. My main/home view is a very simple one with a Vaadin Grid: @SpringComponent @UIScope @Route(value = "", layout = MainLayout.class) public class MainView extends HorizontalLayout { private ItemService itemService; private Grid<ItemDTO> itemGrid; @Autowired public MainView(ItemService itemService) { this.itemService =

Simple example of filtering items in a grid in Vaadin Flow 14

自闭症网瘾萝莉.ら 提交于 2020-03-02 07:11:29
问题 I want to suppress the display of some items in a Grid widget in Vaadin Flow 14. For example, if the user enters a year in a IntegerField widget, I want the grid to show only items with an associated date before that year. Items with a date on or after that date should disappear. If the user changes the year number, the filtering should be re-applied with fewer or more items displayed appropriately in the grid. I have seen filters on Grid discussed but cannot wrap my head around the various