vaadin

Enabling EJB Injection into Vaadin 7 UI via Usage of Vaadin-CDI-Integration Addon

本小妞迷上赌 提交于 2019-12-20 04:18:05
问题 I wasn't able to successfully integrate the official Vaadin-CDI-Integration-Addon, since after finishing the official integration instructions, the following Exception was thrown in case I reloaded the already published URL localhost:8080/App/?restartApplication . javax.servlet.ServletException: com.vaadin.server.ServiceException: java.lang.IllegalStateException: UI id has already been defined The following little workaround is a tested, working solution, which completes the official

Setting up selenium grid to use Microsoft edge

纵然是瞬间 提交于 2019-12-20 04:12:06
问题 Environment: win10 (build 10240) Vaadin Testbench 4.1 Selenium 2.53 Drivers for Firefox, Chrome, IE11 and Edge for build 10240 Node and hub start java -jar c:\users\powder\vaadin-testbench-standalone-4.1.0.jar -role hub start java -jar c:\users\powder\vaadin-testbench-standalone-4.1.0.jar -role node -Dwebdriver.edge.driver=c:\users\powder\MicrosoftWebDriver.exe Usage in java code DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setBrowserName(DesiredCapabilities.edge

Vaadin 7 fire custom events between components

泄露秘密 提交于 2019-12-20 02:34:24
问题 I want to create custom events and fire them in some part of the view such that some other part of the view is updated/removed/refreshed. I have tried by extending the Component.Event and Component.Listener but it doesn't work. I think that events and listeners mustbe limited to the same component instance. Can this be done with Vaadin 7? Basically I want to decouple my views and provide easy communication between components. I'm also using Spring with Vaadin. If you have better ideas beside

MenuBar widget in Vaadin Flow (Vaadin 10) missing?

故事扮演 提交于 2019-12-20 01:43:22
问题 Vaadin Framework (Vaadin 8) offers a MenuBar widget, as discussed in the manual, and shown in the Sampler. When I switch the manual to "Vaadin 10" mode, I cannot find the MenuBar widget. I know Vaadin 10 (Vaadin Flow) is a major re-write of Vaadin, is the widget changed in name or not yet available? 回答1: Possibly in Vaadin 14 Update: A MenuBar widget is planned for development by Vaadin Ltd, scheduled for Vaadin 14 release. See the manual. On GitHub, see Issue # 4694 MenuBar component. No

Vaadin : How to change favicon?

匆匆过客 提交于 2019-12-19 14:05:22
问题 How can I change favicon of my pages in Vaadin ? I would like to change favicon of my pages but I have no idea where is the place to change it ? Has somebody experience on it ? 回答1: First, create a theme directory: /WebContent/VAADIN/themes/mynewtheme Then, put your custom favicon.ico in this directory. You also need to set theme property in your application : public class MyNewApplication extends Application { @Override public void init() { ... ... setTheme("mynewtheme"); } } 回答2: Here is a

Vaadin : How to change favicon?

家住魔仙堡 提交于 2019-12-19 14:05:13
问题 How can I change favicon of my pages in Vaadin ? I would like to change favicon of my pages but I have no idea where is the place to change it ? Has somebody experience on it ? 回答1: First, create a theme directory: /WebContent/VAADIN/themes/mynewtheme Then, put your custom favicon.ico in this directory. You also need to set theme property in your application : public class MyNewApplication extends Application { @Override public void init() { ... ... setTheme("mynewtheme"); } } 回答2: Here is a

.js and .css files are loading as text/html in my JSP page.

和自甴很熟 提交于 2019-12-19 09:08:08
问题 When I load my jsp page, the attached css and js files are rendered as text/html format. I noticed it from chrome browser where I could see this error message "Resource interpreted as Script but transferred with MIME type text/html" I have specified the mime type in web.xml as follows, <mime-mapping> <extension>js</extension> <mime-type>application/javascript</mime-type> </mime-mapping> <mime-mapping> <extension>css</extension> <mime-type>text/css</mime-type> </mime-mapping> <mime-mapping>

Vaadin @Javascript : clear cache for updated JS file

时光怂恿深爱的人放手 提交于 2019-12-19 07:10:12
问题 I have a @JavaScript annotation in my application to load a .js file from the classpath. Now I've made an update to the file and redeployed (locally), but I always get the old version back. I've tried reloading everything (ctrl+R, ctrl+F5) but that doesn't work and also I wouldn't want the users to have to do that. A trick I used in the past (without Vaadin) was to append a request parameter with the version (e.g. ?version=1) and update that so that the URL changes. But apparently that isn't

How to add scrollbar to Vaadin layout

∥☆過路亽.° 提交于 2019-12-19 05:07:00
问题 I have found many questions where people are asking how to hide scrollbars in Vaadin layouts, but my problem is that Vaadin don't show me any scrollbars. For example I can have this code: HorizontalLayout layout = new HorizontalLayout(); layout.setSizeUndefined(); // I also tried setSizeFull() for(Integer i = 1; i <= 15; i++) { layout.addComponent(new Button("Test button #" + i.toString()); } But when I run this code, buttons on the page are simply cut off when the browser window is too small

Vaadin JPAContainer JDBC Connection Usage

女生的网名这么多〃 提交于 2019-12-19 04:07:15
问题 Once one JPAContainer is created like JPAContainer users = JPAContainerFactory.make(User.class, "persistenceUnitName"); Now I suppose that the "users" container will use one EntityManager which in turn uses one JDBC connection from the connection pool. That resource utilization (jdbc Connection attached to EntityManager attached to JPAContainer) happens during the lifetime of the httprequest or the usage of the entityManager/connection has another lifespan ? Can you please help me understand