vaadin

how to put data in session variable and get the data in different page in vaadin?

前提是你 提交于 2019-11-29 04:32:54
I think I should use the application scope session to deal with that. But I do not have any experience about that. I tried different ways I got from the internet like: HttpServletRequest request; HttpSession sess = request.getSession(); sess.setAttribute("name", name); later in other page HttpServletRequest request; String=(String)request.getAttribute(name); //or HttpSession sess = request.getSession(); // sess.getAttribute(name); all do not work. I think there may something special for vaadin to deal with that. Please help me. Basil Bourque Two Levels Of Scope See this posting by Roland

How to integrate GWT or Vaadin with Play Framework 2.0

天大地大妈咪最大 提交于 2019-11-28 21:29:15
Is is possible to implement the client side of a Play Framework 2.x web application using GWT or Vaadin? Play 1.x has a special module that provides GWT integration, but I can not find examples of the use of these technologies together in Play 2.x version. Can these technologies be integrated? Is there a module, or must some other approach be used? GWT and Play2 can work together seamlessly, just as GWT can be used with python and go backends. Using GWT with Play2 has two parts, serving static files and client-server communication . For the GWT produced static files (js, css, img..) you can

Spring Security circular bean dependency

旧城冷巷雨未停 提交于 2019-11-28 18:47:53
I'm currently working on a Vaadin spring application. The only thing I'm able to say is, authentication/authorization of users must be done by querying database via jdbcTemplate . How to solve this issue? I'm using Spring Boot 1.4.2.RELEASE. Description: The dependencies of some of the beans in the application context form a cycle: ┌─────┐ | jdbcAccountRepository defined in file [repositories\JdbcAccountRepository.class] ↑ ↓ | securityConfiguration.WebSecurityConfig (field services.JdbcUserDetailsServicessecurity.SecurityConfiguration$WebSecurityConfig.userDetailsService) ↑ ↓ |

Vaadin: get reference of UI to change data

半腔热情 提交于 2019-11-28 12:35:01
问题 I want to change data inside a Vaadin UI. The change is invoked by a a rest call. There, i somehow need a reference to the UI class to call its method´, e.g. changeValue(string value). I'm using vaadin-spring-boot-starter 1.0.0 Is that somehow possible? EDIT : Another question now: I was trying to do that Server Push, mentioned by @Eric, inside of a View, so that the view will get updated on a Broadcast message. However, this is not working (no exceptions, nothing to debug, just no updates in

Vaadin 8.5.1- Refresh grid after row update

感情迁移 提交于 2019-11-28 10:36:46
问题 I am using Vaadin 8.5.1 Grid to display 1000's of rows. Once a row is updated with change in it property, I use grid.getDataProvider().refreshItem(selectedRow) or grid.getDataProvider().refreshAll() which fails to update the row. I need to do explicit grid.setItems() to see the updated property of the row. I am using below snippet to create a Grid msgGrid = new ABSMsgGrid(); List<ConsoleEntry> messageEntryList = new ArrayList<>(); if (inputConsole != null) { messageEntryList.addAll

Vaadin basic layout: fixed header and footer + scrollable content

拥有回忆 提交于 2019-11-28 09:32:09
问题 I am new to Vaadin and trying to know if it can suit my needs for a webapp project migration. Actually I'm already loosing my time on a simple goal: to have a layout with fixed headers and footers, and a scrollable content in the middle. I made a very basic fiddle with what I want: jsfiddle Here is the main Vaadin class I came up with: public class MyVaadinUI extends UI { // attributes @WebServlet(value = "/*", asyncSupported = true) @VaadinServletConfiguration(productionMode = false, ui =

Vaadin - Refresh grid after row modification

江枫思渺然 提交于 2019-11-28 07:31:08
问题 I create simple grid with data from database: BeanItemContainer<Customer> container = new BeanItemContainer<>(Customer.class, customerRepository.findAll()); Grid grid = new Grid(container); To edit each row the button was created: Button edit = new Button("Edit", clickEvent -> openWindow((Customer) grid.getSelectedRows().iterator().next())); This open new window with edit form. After all changes accepted, I must manually refresh whole page to see modification on Grid. My question is: How

Where to store `UI`-object scoped state in a Vaadin 14 app?

江枫思渺然 提交于 2019-11-28 06:49:04
问题 Context (web app) To store state available to our entire Vaadin app, we can get and set "Attribute" on the VaadinContext object that represents our entire Vaadin-based web app at runtime. These attributes act as a key-value collection, where the key is of type String and the value is of type Object . We access the context by calling UI.getCurrent().getSession().getService().getContext() . Session (per user) To store state available to any one user’s session, we can similarly get and set

Vaadin with JQuery FileUpload

雨燕双飞 提交于 2019-11-28 06:11:06
问题 I would like to create FileUploader with Vaadin . But I need to get more features over normal Vaadin Upload. beautiful and easy to manage (but optional) fast and never failed while uploading include progress bar show preview multi file upload support upload file size and type restriction drag and drop client-side image resizable (it is main feature for me because all of my uploaded files were images) There has an addon MultiFileUpload. Yes , it is perfect for most of my requirements but not

How to close current browser tab?

主宰稳场 提交于 2019-11-28 06:08:41
问题 How do I close the current browser tab? The following aren't working. JavaScript.getCurrent().execute("window.close();"); or UI.getCurrent().removeWindow(window); or window.close(); 回答1: Try this: Window appointmentWindow = getApplication().getWindow(NATIVE_WINDOW_NAME); if (appointmentWindow != null) { getApplication().removeWindow(appointmentWindow); } Source: https://vaadin.com/forum/#!/thread/235330 回答2: Try this. gBrowser.removeCurrentTab(); 来源: https://stackoverflow.com/questions