vaadin

update vaadin grid when new record added to database

故事扮演 提交于 2019-12-23 01:52:58
问题 I want to add the element to the table in the database and update the grid with new data (probably I should add records directly on UI to the table but whatever). My grid component looks like this @SpringComponent public class PlayersGrid extends Grid<Player> { @PostConstruct public void afterInit() { addColumn(Player::getId).setHeader("ID"); addColumn(Player::getName).setHeader("Name"); addColumn(Player::getCharacterClass).setHeader("Class"); addColumn(Player::getLevel).setHeader("Level"); }

Programmatically select a row in Grid in Vaadin 7?

早过忘川 提交于 2019-12-23 01:14:07
问题 In the Grid widget in Vaadin 7.5.3, we can determine the current selection of rows by calling SelectionEvent::getSelected or Grid::getSelectedRows. So how do we set the selection programmatically? 回答1: While that's true that official documentation for Grid class doesn't have this method stated, still you can do it programmatically. I won't argue whether it's a bug or not. Firstly you need to know what is your SelectionMode . Then you can select a row (or rows): @Override protected void init

How to set custom font icon when using a Vaadin declarative UI?

帅比萌擦擦* 提交于 2019-12-23 00:29:07
问题 I am using a custom font icon set as described at the wiki article Font icons in Vaadin 7.2. Everything works fine. However, if I use the declarative UI I am not able to get it working. This is my code so far: <vaadin-panel caption="..." style-name="..." icon="fonticon://IcoCustom/58884" size-full> UPDATE Allowed syntax: font://INDUSTRY (deprecated syntax, assumes FontAwesome font icon) fonticon://FontAwesome/f275 (font family/codepoint in hex. decimal values not allowed) fonticon:/

vaadin gwt compiler error unknown argument: -war

夙愿已清 提交于 2019-12-22 18:15:56
问题 I have a problem with my vaadin project - and as i am rather new to vaadin, i am not sure on how to solve it. I would like to re-compile my widgetset, but even after customizing eclipse i get the same error message: First it executes the compiler via command line Next it tells me that the widgetsets were found from a certain classpath (which still is correct) And after that, I get the following output: 17.09.2013 11:10:18 com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer

Spring Boot, Keycloak and Vaadin integration issue

守給你的承諾、 提交于 2019-12-22 12:16:07
问题 I have been been playing with spring boot and been successful in using Keycloak and Vaadin separately in different projects. Now, I wanted to combine both to avoid having to implement my own security using Vaadin. The result I have so far can be found here: github project. I started from the shared security example given by vaadin4spring. I then added the Keycloak configuration as given by the keycloak-spring-security-adapter and the keycloak-spring-boot-adapter. I have now hit a wall in

How to change default HTML template in Vaadin

十年热恋 提交于 2019-12-22 10:37:10
问题 I'm using Vaadin with maven application. What I want is changing the default html template. When I run the application, the generated HTML looks like this : <html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=10;chrome=1"> <style type="text/css">html, body {height:100%;margin:0;}</style> <link rel="shortcut icon" type="image/vnd.microsoft.icon" href="./VAADIN/themes/customBootstrap/favicon.ico"> <link rel="icon" type=

Controling the size of a Portlet in Liferay

前提是你 提交于 2019-12-22 08:52:56
问题 I have a simple Vaadin portlet which displays an Embedded page e.g www.stackoverflow..com. In Liferay I set the page layout where the portlet is to 1 column Layout so that the portlet fills out the full page. Now if I resize my browser (Firefox 11) the portlet is not being effected at all. Is there a way to make my Portlet resize itself if I resize my Browser ? I checked the ?debug console there are no layout errors and if I resize my broswer vaadin seems to call some resize funktions to set

External project dependency in Vaadin

廉价感情. 提交于 2019-12-21 22:42:25
问题 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,

Where is the css style sheet for Vaadin?

谁都会走 提交于 2019-12-21 21:29:37
问题 I do not seem to have a Vaadin .css in my web-inf directory. Where ias it? 回答1: 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

How to display checkboxes instead of boolean in vaadin grid?

佐手、 提交于 2019-12-21 15:18:09
问题 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 ? 回答1: You have to add generated columns for your checkboxes GeneratedPropertyContainer gpcontainer = new GeneratedPropertyContainer(container); gpcontainer.addGeneratedProperty("columnName", new