vaadin

Dynamically changing font, font-size, font-color, and so on in Vaadin Flow web apps

倾然丶 夕夏残阳落幕 提交于 2019-12-02 09:42:18
In Vaadin Flow (versions 10 and later), is there some way to dynamically change the font, font size, font color and such of the widgets in a Vaadin layout? I do know the basics of CSS , but don’t know much about SASS or other supersets of CSS though I am willing to learn. And I do not know what supersets of CSS are being used by Vaadin Flow. I know I can dynamically assign or remove CSS style names to a widget at runtime. But that means the CSS style must already be defined. ➥Is there some way to assign arbitrary font styling at runtime? The short answer is yes. And this is one of the major

How to set cell background color in grid/table in view in Vaadin?

怎甘沉沦 提交于 2019-12-02 09:01:20
问题 I am using Vaadin and I would like to set backgroung color to specific cell in my grid/table or if there is no possible to set background color to specific cell I would like to at least set a font color to specific cell in grid/table. The code TableView where I have got a grid/table is below: package com.trading.scraper; import com.vaadin.navigator.View; import com.vaadin.ui.CustomComponent; import com.vaadin.ui.Grid; import com.vaadin.ui.VerticalLayout; import java.util.Arrays; import java

Using Vaadin on NetBeans WITHOUT Maven

情到浓时终转凉″ 提交于 2019-12-02 08:15:53
问题 I'm starting with Vaadin and I'd like to know if it's possible work with this framework in NetBeans without using maven. The reason is the project using maven takes ages downloading dependencies and never reaches to run because of a timeout connection problem. I've downloaded the All-in-one file and tried following these README.txt file instructions: Copy all vaadin-* files except vaadin-client and vaadin-client-compiler to WEB-INF/lib in your project Copy lib/*.jar to WEB-INF/lib in your

Vaadin : Widget set is not getting loaded.

前提是你 提交于 2019-12-02 07:28:15
I was able to integrate a Vaadin module into our Spring based application. After integration I wanted to run a demo of gantt-charts which is an add-on for Vaadin and found it on github here . Inside the folder, there is a demo project. All is fine, except I am having a problem with widgetsets. Screenshot of the problem : Also I get a non-serializable error : Nov 18, 2015 3:16:48 PM org.apache.catalina.session.StandardManager startInternal SEVERE: Exception loading sessions from persistent storage java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.journaldev

Adding columns to grid using Vaadin 8.0.7

好久不见. 提交于 2019-12-02 06:05:54
I want add column to grid, when i click to button ("backBtn"). Then i get the value from the textfield ("filterText"), and that will be the name of the new column. Who can help me? The code is from tutorial, but i need add the new feature here. Thanks ! You can find my code in attachment. Grid is in class "MyUI" This is clas Customer package my.vaadin.app; import java.io.Serializable; import java.time.LocalDate; import java.util.Date; /** * A entity object, like in any other Java application. In a typical real world * application this could for example be a JPA entity. */ @SuppressWarnings(

Vaadin 7 don't refresh UI after execution background thread (only if it takes more than 5 minutes)

試著忘記壹切 提交于 2019-12-02 05:33:12
问题 I'm using Vaadin 7. In my application there's a table list and user could choice one or more items to elaborate. If execute button is clicked, UI component are disabled and two Threads start: 1st Thread does heavy computation 2nd Thread updating progress indicator on UI (with lock() and unlock() method) At the end 1st Thread: item is deleted from DB, all component removed and re-added (enabled). In this way refreshing table data is assured. It works well, but when a long task is processed UI

Vaadin ServletException: Failed to load application class

心已入冬 提交于 2019-12-02 05:24:46
I have a vaadin and servlet error when i try to load the servlet in the browser by localhost/testVaadin/ I want to execute this sample to see how vaadin works, because I have to implemnt an BPMN with activity explorer, which is using vaadin as a UI framework. I attached the code, and web.xml plus the thrown exception. package com.example.testvaadin; import com.vaadin.Application; import com.vaadin.data.Property; import com.vaadin.data.Property.ValueChangeEvent; import com.vaadin.data.util.IndexedContainer; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin

Get current VaadinContext and current VaadinSession (both places to store state as “attribute” key-value pairs) in Vaadin Flow

ⅰ亾dé卋堺 提交于 2019-12-02 05:01:38
问题 In using Vaadin Flow, version 14, I know we can store state as key-value pairs kept as "attributes" via getAttribute / setAttribute / removeAttribute methods found on: VaadinSession (per-user scope) VaadinContext (web-app scope) How does one access the current object for those classes? 回答1: VaadinSession.getCurrent() For that per-user scope , the VaadinSesion class provides a static class method getCurrent to access the current instance. VaadinSession session = VaadinSession.getCurrent() ; //

Want to have a layout which arrange in a tabular form

不问归期 提交于 2019-12-02 04:07:40
I am very new to Vaadin. My requirement is like in my page I need to have 4 input component per row. There would be 4 rows like this. I need a layout which will allow me to define number of columns and keep align it. There should not be any border like we have in table. Please suggest me any suitable layout and how can I customize that. Thanks You are probably looking for a GridLayout , it provides enough flexibility to size your grid 'cells', maintain consistency and set expand ratios for row and columns separately. The other option for you is to use a CustomComponent and in case you are

How to validate fields in vaadin made form

喜夏-厌秋 提交于 2019-12-02 01:32:16
问题 I am making a Java project with vaadin. Right now I have a user registration form looking like that: public class RegistrationComponent extends CustomComponent implements View { public static final String VIEW_NAME = "Registration"; public RegistrationComponent(){ Panel panel = new Panel("Registration Form"); panel.setSizeUndefined(); FormLayout content = new FormLayout(); CheckBox checkBox1, checkBox2, checkBox3; checkBox1 = new CheckBox("Check Box 1"); checkBox2 = new CheckBox("Check Box 2"