vaadin

Problems with using shortcuts in Vaadin

江枫思渺然 提交于 2019-12-04 17:00:48
I have some problems with shortcuts in Table. I have to customize some keys: delete - for removing the rows and enter to make table editable/uneditable, up/down arrows to switch mode of table from editable to uneditable. I put my Table inside transparent Panel and use Action.Handler to catch keyboard events. But when I'm writing inside TextField, TextArea, Combobox I wanted to propagate events to this component (handling delete key disable using it for deleting text in TextField and up/down keys doesn't allow open Combobox with keyboard). I saw target parameter in handleAction() method, but I

get Liferay user information with Vaadin

我们两清 提交于 2019-12-04 16:54:52
I need to check in my portlet wich language does an user have selected as his "main" language, to do that, I have to get the UserID (name) first . i have been looking for it for two days (Liferay forums , vaadin forums , stackoverflow etc.) but nothing found that would work so far. I have found an nice example but it doesnt seem to work (It always returns "null"). package com.example.translation_portlet; import javax.portlet.PortletRequest; import javax.portlet.PortletResponse; import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception

External project dependency in Vaadin

你离开我真会死。 提交于 2019-12-04 16:43:33
I have a Vaadin project and an external Java project. I would like call code in the external project from Vaadin. I have both project imported in Eclipse and the Vaadin project references the external one in Eclipse Java Build Path . Eclipse reports no error but when I deploy the Vaadin application to Tomcat (using Project > Run As > Run on Server ), I get the following error: HTTP Status 500 - java.lang.NoClassDefFoundError: com/example/MyClass Note that the Vaadin project is based on Ivy, not Maven. I've tried searching around for Vaadin external project dependencies with no success. I'll be

How to disable spring-security login screen?

与世无争的帅哥 提交于 2019-12-04 15:29:56
问题 I'm using spring-boot-starter-security dependency, to make use of several classes that come with spring-security . But as I want to integrate it in an existing vaadin application, I only want to make use of the classes, and not of the default login/auth screen of spring. How can I disable this screen? I cannot make any configurations by extending WebSecurityConfigurerAdapter as my main entry class already extends SpringBootServletInitializer . Also, vaadin applications basically run on the

Where is the css style sheet for Vaadin?

一笑奈何 提交于 2019-12-04 15:12:59
I do not seem to have a Vaadin .css in my web-inf directory. Where ias it? The default stylesheets are all packaged inside the Vaadin JAR, and are served from there. If you need a custom theme, then you need to create the folder and theme file yourseld inside the WebContent/VAADIN/themes folder. ( Edit: corrected the path, it shouldn't be WEB-INF/VAADIN. WebContent/VAADIN/themes is the correct place for custom themes) 来源: https://stackoverflow.com/questions/5594747/where-is-the-css-style-sheet-for-vaadin

How to perform an Load Test/Performance Test with Vaadin 10 (is it possible with Jmeter?)

筅森魡賤 提交于 2019-12-04 14:01:45
I Work on an Vaadin 10 Project and we want to perform an Load Test on our Website befor we used Vaadin 10 we could do that with Jmeter but with Vaadin 10 it seems that it doesnt work with Jmeter We Tryed using Jmeter 5.1.1 and recorded the testcase the first problem was the csrf Toaken and the push id, both could get extracted with an regular expression extractor and we put them in the Body Data {"csrfToken":"${csrf}","rpc": [{"type":"mSync","node":5,"feature":1,"property":"invalid","value":true}]," syncId":0,"clientId":0} as far as i could see at least that worked but the only result we get

How can I use CSS for Vaadin components?

孤者浪人 提交于 2019-12-04 11:41:41
I seem to be seeing examples, where people answer to questions how to get some specific behavior from components by adding CSS code, however nobody seems to explain how to use that CSS code to connect it to Java components... .v-table-body{ overflow: hidden !important; } How do I use for instance this code on my table that I create? Table table = new Table(caption); table.addContainerProperty("Visit ID", Long.class, null); You can create you own custom theme. See https://vaadin.com/book/-/page/themes.creating.html how to do that. In this theme you have a css style sheet where you can put your

Java EE 7 CDI - Injection doesn't work, sending NullPointerException

醉酒当歌 提交于 2019-12-04 09:31:39
I have a problem with my injection, it's the first time I try it. I'm working with Wildfly and Java EE 7. I've got a NullPointerException when trying to access Authenticator instance in LoginController . I use maven, my beans.xml is found under src/main/webapp/META-INF but I'v tried to put it in src/main/webapp/WEB-INF/classes without success. Here is my code : The class to inject : @Stateless public class Authenticator { @Inject HashGenerator hashGenerator; @Inject UserPersistance userPersistance; public boolean authenticate(final String username, final String password) { User user =

How to display checkboxes instead of boolean in vaadin grid?

余生长醉 提交于 2019-12-04 08:48:02
I'm trying to display my boolean values as a checkbox in a vaadin grid. I can't use the multi selection mode because i need two columns with checkboxes. The columns of the Checkboxes shell have a Caption but the Checkboxes itself shell be without a caption. Does anyone have an idea ? You have to add generated columns for your checkboxes GeneratedPropertyContainer gpcontainer = new GeneratedPropertyContainer(container); gpcontainer.addGeneratedProperty("columnName", new PropertyValueGenerator<CheckBox>() { @Override public CheckBox getValue(Item item, Object itemId, Object propertyId) { // set

How to migrate from traditional java web application (with web.xml) to spring boot?

ε祈祈猫儿з 提交于 2019-12-04 08:41:18
问题 I wanna switch my projects to spring-based product. My first step is to transform my java web application from a generated WAR file, to a standalone executable jar, powered by spring boot. Let's take a open source web application example from github.: Vaadin-Spring Web Application The web.xml file can be found here. The root-context file can be found here. I hope that there are some guides for me to perform the transformation. I have also submit an issue in the spring-boot project. 回答1: This