vaadin

Should I use Vaadin Framework [closed]

余生颓废 提交于 2019-11-29 19:03:10
I just tried to play with Vaadin Framework and it seems to me very easy to use. Plus what I like about his framework is that it is built on top of Google Web Toolkit (GWT) . What do you think, should I continue using this framework or it's better to stick with GWT? Jens Jansson Hey. As a disclaimer, I work for the company developing Vaadin. Vaadin uses GWT in a way that it has a set of components precompiled in GWT. You can, of course, additionally make your own components if you so want to. However, the set of components is quite complete, and can often be customized for your own need. This

Vaadin: get reference of UI to change data

家住魔仙堡 提交于 2019-11-29 18:05:53
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 the view). This is what i do in my View: @UIScope @SpringView(name = LoadWebsiteView.VIEW_NAME) @Push

Vaadin “A connector with id xy is already registered”

 ̄綄美尐妖づ 提交于 2019-11-29 17:50:42
问题 Somewhere in my Vaadin application, I'm getting this exception as soon as I connect using a second browser Caused by: java.lang.RuntimeException: A connector with id 22 is already registered! at com.vaadin.ui.ConnectorTracker.registerConnector(ConnectorTracker.java:133) It happens always in the same place but I don't know why exactly as the reason for this must be somewhere else. I think I might be stealing UI components from the other session - which is not my intention. Currently, I don't

Add javascript/Jquery & client side code in Vaadin 7

怎甘沉沦 提交于 2019-11-29 17:17:30
问题 I have 3 questions: Each and every action in Vaadin makes a call to the server. is there a way to avoid calls to server for every actions? like having a code at client side for particular actions that is used many times? Like in CSValidation add-on. I want to know how to add Javascript/JQuery in Vaadin 7. It seems easy in Vaadin 6. But, I couldn't get it working in Vaadin 7. I hope they would have made it more easy now. Can anyone show me some examples regarding this. If it is JQuery, It will

Vaadin: Update UI after data returned

送分小仙女□ 提交于 2019-11-29 16:55:25
@SpringUI public class VaadinUI extends UI { ... String sql = "SELECT * FROM table1"; button.addClickListener(e -> layout.addComponent(new Label(service.evalSql(sql)))); ... Currently, when button is pressed, the page waits for evalSql() to get a result back from the database before adding a new Label. How can I change this so, when button is pressed, a new Label is immediately added, set to an initial placeholder string ("Fetching result..") but updated to the result string after the database returns something? You need to use @Push in your UI and update the content of the Label when query

Update Grid with a fresh set of data, in Vaadin 7.4 app

霸气de小男生 提交于 2019-11-29 15:17:38
In the new Vaadin 7.4 release , the new Grid widget debuted as an alternative to the venerable Table . After getting a Grid displayed, I later want to replace the entire set of data with fresh data. Rather than update the individual rows, I want to simply replace them. I happen to be using a BeanItemContainer for easy read-only display of some objects with JavaBeans-style getter methods. I considered two approaches: Two step process of replacing bean items. (1) First remove all BeanItem objects with Container::removeAllItems method. (2) Then add replacement BeanItem objects with the

Vaadin - Refresh grid after row modification

两盒软妹~` 提交于 2019-11-29 13:51:27
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 refresh only Grid after modification of any row entry? And how save those modifications to database (maybe

Vaadin with JQuery FileUpload

左心房为你撑大大i 提交于 2019-11-29 12:41:16
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 for client-size image resizing . So I decided to use JQuery FileUpload because it is support for

How to close current browser tab?

安稳与你 提交于 2019-11-29 12:26:20
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(); Try this: Window appointmentWindow = getApplication().getWindow(NATIVE_WINDOW_NAME); if (appointmentWindow != null) { getApplication().removeWindow(appointmentWindow); } Source: https://vaadin.com/forum/#!/thread/235330 Iren Patel Try this. gBrowser.removeCurrentTab(); 来源: https://stackoverflow.com/questions/17759411/how-to-close-current-browser-tab

Vaadin - Responsive Columns

こ雲淡風輕ζ 提交于 2019-11-29 04:54:16
I'm new to using Vaadin and have been trying to work out how I can make 2 Components be side by side when at full screen, but then stack on top of each other when the screen is mobile. My current understanding is that a HorizontalLayout puts things side by side. And a VerticalLayout puts things on top of one another. So how do I go about using the functionality from both? You need to look into using a different Layout type. Vaadin offers you a CssLayout and CustomLayout as well as the standard Vertical and Horizontal. My personal favourite at the moment is using a CssLayout and then using a