vaadin

Infinite loop in java.util.HashMap

送分小仙女□ 提交于 2019-11-28 00:58:17
I have some Vaadin code blocking very often here, and I have no idea what the problem can be: Thread 7892: (state = IN_JAVA) - java.util.HashMap.getEntry(java.lang.Object) @bci=61, line=349 (Compiled frame; information may be imprecise) - java.util.HashMap.containsKey(java.lang.Object) @bci=2, line=335 (Compiled frame) - java.util.HashSet.contains(java.lang.Object) @bci=5, line=184 (Compiled frame) - com.vaadin.ui.Table.unregisterPropertiesAndComponents(java.util.HashSet, java.util.HashSet) @bci=85, line=1693 (Compiled frame) - com.vaadin.ui.Table.refreshRenderedCells() @bci=992, line=1641

Generate an HTML page, and open in a new window, from a Vaadin 8 app

你离开我真会死。 提交于 2019-11-28 00:23:06
From my Vaadin 8 web app, I want the user to be able to open a report in another window, by clicking a button. The contents are to be generated by the Vaadin app using plain HTML5 rather than using Vaadin widgets. The Vaadin 8 manual has a page Handling Browser Windows . Its shows the use of a BrowserWindowOpener object to open a new window. But that window contains a Vaadin UI subclass, whereas I want to generate my own HTML content. Bonus points for passing information such as a database identifier value. Here is an entire example app, built in Vaadin 8.5.1. We present a UUID as text in a

How to access `ServletContext` from within a Vaadin 7 app?

纵然是瞬间 提交于 2019-11-27 23:07:35
How do I access the current ServletContext from within my Vaadin 7 app? I want to use the ServletContext object’s setAttribute , getAttribute , removeAttribute , and getAttributeNames methods to manage some global state for my Vaadin app. Also, if using those methods for that purpose is inappropriate for Vaadin apps, please explain. Basil Bourque tl;dr For both Vaadin 7, 8 and 10: VaadinServlet.getCurrent().getServletContext() VaadinServlet The VaadinServlet class inherits a getServletContext method. To get the VaadinServlet object, call the static class method getCurrent . From most anywhere

Is it possible to use jQuery inside of Vaadin framework?

送分小仙女□ 提交于 2019-11-27 22:55:49
As Vaadin is a Java web application framework, so is it possible to insert the jQuery javascript snippet in the Vaadin Java code? Yes it is. Create your own ApplicationServlet extending class like this: public class MyApplicationServlet extends ApplicationServlet { @Override protected void writeAjaxPageHtmlVaadinScripts(Window window, String themeName, Application application, BufferedWriter page, String appUrl, String themeUri, String appId, HttpServletRequest request) throws ServletException, IOException { page.write("<script type=\"text/javascript\">\n"); page.write("//<![CDATA[\n"); page

Vaadin - Responsive Columns

情到浓时终转凉″ 提交于 2019-11-27 18:49:42
问题 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? 回答1: You need to look into using a different Layout type. Vaadin offers you a CssLayout and CustomLayout as well as the

How to integrate GWT or Vaadin with Play Framework 2.0

此生再无相见时 提交于 2019-11-27 13:54:18
问题 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? 回答1: 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

Spring Security circular bean dependency

拟墨画扇 提交于 2019-11-27 11:47:43
问题 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

Displaying Same Data Aross Multiple Clients Using Push in Vaadin 7 app

こ雲淡風輕ζ 提交于 2019-11-27 08:47:41
I want to share the same set of data to multiple clients. I need to use Push to automatically update their view on screen. I have read the Question and Answer, Minimal example of Push in Vaadin 7 app (“@Push”) . Now I need a more robust realistic example. For one thing, I know having a never-ending Thread is not a good idea in a Servlet environment. And I don't want each user having their own Thread, each hitting the database on their own. Seems more logical to have one thread alone checking for fresh data in the database. When found, that thread should publish the fresh data to all the users’

New Vaadin 14 app fails to run, error “Failed to determine 'node' tool.” Missing Node.js and npm tools

流过昼夜 提交于 2019-11-27 04:46:21
问题 I used the Get Started page to create a new Vaadin 14 app, after choosing the Plain Java Servlet option. The web page successfully downloaded a .zip file which I unzipped, and opened with IntelliJ Ultimate Edition version 2019.2. I waited a few minutes while Maven did its thing, downloading and reconfiguring the project. Eventually I went to the Maven panel within IntelliJ, and ran the Lifecycle items clean and install . I received the following error message on the console. [ERROR] Failed to

Minimal example of Push in Vaadin 7 app (“@Push”)

偶尔善良 提交于 2019-11-27 04:32:08
I want to see the most minimal example of using the new Push technology in Vaadin 7, such as the new @Push annotation. I am having problems getting server-push to work in my app. I would like to try a simple example app before trying to fix my own app. Basil Bourque Simplification Of Example In The Book Of Vaadin The Book Of Vaadin includes a chapter on Push, including an example using Vaadin Charts . Below is my code. While based on that Vaadin Charts example mentioned above, I simplified it by replacing the use of a Chart object with a simple Label object. The Label updates every second or