vaadin

How to detect when Vaadin FileDownloader succeeds or fails

梦想与她 提交于 2019-11-30 17:40:39
问题 I have Vaadin 7 code to give the user an option to download a file: Button btnDownloadResults = new Button("Download Results", FontAwesome.CLOUD_DOWNLOAD); resource = new StreamResource(new MyStreamResource(), suggestedSaveAsFilename); new FileDownloader(resource).extend(btnDownloadResults); I would like to trigger code when the download has succeeded, or even if the download manages to start. Uses for this include closing a window, starting a progress spinner, or incrementing a download

Vaadin “A connector with id xy is already registered”

大兔子大兔子 提交于 2019-11-30 13:00:57
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 see any static instances of UI components I might be using in multiple sessions. How can I debug this?

Add javascript/Jquery & client side code in Vaadin 7

拜拜、爱过 提交于 2019-11-30 11:49:07
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 help me a lot. And also will Javascript.getCurrent().execute(""); 'execute the javascript' or 'add

Vaadin open link in new tab

梦想与她 提交于 2019-11-30 11:33:37
I have the following piece of code that I wrote using Vaadin. The code opens the page www.google.com when the user clicks the button. My question is is there any way for me to specify that the page is to be opened in a new tab? Thanks. button.addClickListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { getUI().getPage().setLocation("http://www.google.com"); } }); getUI().getPage().open("http://www.google.com", "_blank"); The _blank window name is important here. Beware that you may also have browsers that will might open the resource in a new window instead. There

Vaadin 7: Usage of UI vs. Navigator+Views

人走茶凉 提交于 2019-11-30 10:29:52
问题 In Vaadin 7, a web application can have multiple entry points; the UIs. Each UI can only have a single Navigator containing Views. We are working on an application which requires multi-level navigation, and for some screens we don't know if we should have a single UI with a navigator or multiple UIs with a shared menu component. What are the advantages and inconveniences of UI and Navigator? Are there any guidelines about this choice? 回答1: I recommend using one UI with Navigator as in my

Vaadin Grid vs Table

回眸只為那壹抹淺笑 提交于 2019-11-30 07:51:45
问题 What is the difference between the Grid and Table components in Vaadin 7? Which should I use, and when? 回答1: Grid is a new more powerful component which is supposed to be the successor of Table (see The Table is dead, long live the Grid). So there should not be any need to favor Table over Grid. Here is a first in the series of articles by Vaadin aboout migrating from Table to Grid: https://vaadin.com/blog/-/blogs/mission-rip-table-migrate-to-grid-basic 回答2: Summary Grid → New & Amazing Table

Creating multirow table headers

萝らか妹 提交于 2019-11-30 04:59:57
问题 I have a table where my column headers are set with the following instruction : table.setColumnHeader I wonder how can I create multilevel table headers like on this page? 回答1: As of Vaadin 6.7.3, this is currently not possible using the stock Vaadin table component. There is a Trac issue raised for changing this for Vaadin 7. See https://vaadin.com/forum/-/message_boards/view_message/900369 for more details. Depending on your requirements, you could hide the table component's header and try

How can I make a VerticalLayout scrollable using vaadin?

强颜欢笑 提交于 2019-11-30 04:22:08
问题 I have a Components which exists as a common layout for all my pages. The layout of this component is as follows (made using paint so please sorry :p): Right arrows mean that this layout is a HorizontalLayout and down arrows VerticalLayout. I'm really interested in making bodyContent layout SCROLLABLE. Within this layout I usually introduce lots of UI components (more layouts, text fields, forms, grids...) and sometimes components aren't shown due to the lack of vertical space and the absence

Unterstanding how Vaadin uses GWT

て烟熏妆下的殇ゞ 提交于 2019-11-30 03:15:18
问题 After playing around with Vaadin for about a week I'm curious about how Vaadin uses GWT. GWT compiles Javacode to Javascript. This has to be done everytime when you are redeploying. Since Vaadin has to be understood as a server-centric framework, eliminating your flexibility on writing Code that is executed on Clientside and moving everything to the server (which sounds worse than it actually is), the GWT Compiler only runs once a time. For example this happens when you are importing a plugin

How can I compile only necessary widgets in Vaadin 7 with Maven?

情到浓时终转凉″ 提交于 2019-11-29 22:36:08
I am new to the Vaadin framework which I looks very interesting, using eclipse and maven to develop and build my application I find pretty annoying that every time I do a mvn clean install it will take so long time to build the app, I found that this is because it compiles the whole set of widgets. Even if I am only using a Button in my layout it will take so much on building the app. I have researched for some time in the Internet and 2 books but cannot find enough information about how to make it to only compile components that I am using and not the whole set. I created the project by using