vaadin

vaadin4spring security sample: failed to load widgetset

一个人想着一个人 提交于 2019-12-11 11:47:30
问题 I am desperately trying to build a little Vaadin project with login secured pages/views. I have found vaadin4spring and thought I could start based on the security sample. However, after importing the project and running it, I am receiving the message (without any changes at the project): Failed to load the widgetset: ./VAADIN/widgetsets/org.vaadin.spring.samples.security.Widgetset/org.vaadin.spring.samples.security.Widgetset.nocache.js?1424243461387 I have also tried to compile the widgetset

Open Browser Popup in Liferay via Vaadin

匆匆过客 提交于 2019-12-11 11:05:47
问题 using Vaadin 7.1 and Liferay 6.1 I try to open a new UI (in the same session) in a new browser window using com.vaadin.server.BrowserWindowOpener: Button button = new Button("button"); BrowserWindowOpener windowOpener = new BrowserWindowOpener(OverviewWindow.class); windowOpener.extend(button); Where OverviewWindow extends UI is a trivial custom UI. In standalone use (i.e. without Liferay) this works fine, but in Liferay the popup opens and displays "Request was not handled by any registered

Set GridLayout row height in Vaadin

我与影子孤独终老i 提交于 2019-12-11 10:27:47
问题 Very straight forward question, if you have a GridLayout defined in Vaadin, how can you set the height of all / individual rows? E.g: mainLayout = new GridLayout(2, 7); mainLayout.setMargin(true); mainLayout.setWidth("100%"); mainLayout.setHeight("100%"); // Set row[s] height? Thanks in advance! 回答1: I would rekommend you to read the following chapter in the book of vaadin. It will explain how you set fullsize on grids and individual rows and how individual rows and columns can have different

How to download a file with Vaadin 10?

拈花ヽ惹草 提交于 2019-12-11 09:29:29
问题 I want to let user to download a file from server. I looked up for the solution and when trying to make an example - ended up with this: @Route("test-download") public class Download extends VerticalLayout { public Download() { Anchor downloadLink = new Anchor(createResource(), "Download"); downloadLink.getElement().setAttribute("download", true); add(downloadLink); } private AbstractStreamResource createResource() { return new StreamResource("/home/johny/my/important-file.log", this:

How can You refresh a vaadin grid after data change

好久不见. 提交于 2019-12-11 08:35:12
问题 How can You refresh a grid, when some new row was added to its datasoruce container or one of its rows has been edited? I have tried the hacks written about here (http://www.helpsforcoder.com/code/31861375-vaadin-refresh-grid-after-row-modification.html ) and here (deleted link to malicious advertisement) but with no positive result. I add / edit the row in a separate subwindow that 'pop-ups' over the view, where the grid, that should update its contents, is placed. 回答1: grid.getDataProvider(

Select-all shortcut (Ctrl-A) in Vaadin Table?

北城余情 提交于 2019-12-11 07:54:25
问题 I have the following snippet in my UI Builder code: table.addShortcutListener(new ShortcutListener("Select all", null, KeyCode.A, ModifierKey.CTRL) { @Override public void handleAction(Object sender, Object target) { AbstractSelect t = (AbstractSelect) target; if (t.isMultiSelect()) { t.setValue(t.getItemIds()); } } }); return table; This allows to press Ctrl + A to select all items in a table. This usually works the first time I load a view until I make one of the tables invisible (

Vaadin-8 ComboBox click has no effect

夙愿已清 提交于 2019-12-11 07:29:37
问题 I have a ComboBox in my Vaadin 8 code. allAtts here is a Set of Attendant -s, and the field theAtt in there is of type String : private ComboBox<Attendant> theCB = new ComboBox<Attendant>(null,allAtts); theCB.setEmptySelectionAllowed(false); Binder<SearchArgs> binder = new Binder<SearchArgs>(SearchArgs.class); binder.setBean(sas); binder.forField(theCB).bind("theAtt"); .. VerticalLayout vl = new VerticalLayout(theCB, rb, deleteBtn); What's more - this exact flow of theCB is a copy-paste from

Vaadin Container.Filter using variable number of criterias

寵の児 提交于 2019-12-11 07:23:55
问题 Just implemented the new Container.Filter using this code: Filter f = new Or(new SimpleStringFilter(Columns.SEARCH.id(), "rpm-diastolic", true, false), new Or(new SimpleStringFilter(Columns.SEARCH.id(), "rpm-systolic", true, false)), new Or(new SimpleStringFilter(Columns.SEARCH.id(), "rpm-weight", true, false))) ; container.addContainerFilter(f); and works fine. Now I would like to use the following in order to build as many criterias I would need by building dynamically the filter: List

Getting the String out of a Gatling expression

◇◆丶佛笑我妖孽 提交于 2019-12-11 07:09:01
问题 I want to write a function to format Vaadin messages. These messages have the format 108|0ff1255e-e2be-4e7b-ac5c-1ff2709ce886[["0_11_12_13_login_username","v","v",["text",["s","Agent00232"]]]] The first number is the length then there some kind of session id (later called vaadin_security_key) followed by the payload. (In this example I set the value "Agent00232" to the textfield with the connector id "0_11_12_13_login_username") I wrote a function like this: def sendMessage(name: String,

Mixing Java and Kotlin with Maven, can't find symbol

自古美人都是妖i 提交于 2019-12-11 07:04:59
问题 I'm trying to add some Kotlin classes into my existing Java project under Vaadin Framework (v 8.4.5). I've fully read the tutorial on how to mixing java and Kotlin, and I've successfully created a Kotlin class inside my existing Java Project. The new Kotlin class is inside my project (ofc I've cutted away all code for privacy) package it.projectName.utils import it.projectName.otherClasses class SecurityUtils (user: User) { //various val and var, and of course the isCrypted calculated val