vaadin

Vaadin table.select(itemId) is not working

断了今生、忘了曾经 提交于 2019-12-24 17:06:15
问题 I have a table bind to a SQLContainer and a insert button (that insert a row in the table) When the button is clicked it execute the below code of the listener: Object itemId = table.addItem(); container.getContainerProperty(itemId, "cedula").setValue(cedulaS); try { container.commit(); table.select(itemId); catch (UnsupportedOperationException e) { //bla } The row is properly inserted BUT I want that automatically the row be selected but the select method is not working any idea? EDIT: The

csrf token per request in vaadin

天大地大妈咪最大 提交于 2019-12-24 15:44:18
问题 I'm new to vaadin and I want to implement a csrf token protection , I found that vaadin already inject csrf token in requests but the problem is that the csrf token is the same in each request , is their any configuration in vaadin to generate new token in each request? or is their any way to force vaadin to regenerate a csrf token when new session is created? I used the following code to solve session fixation vulnerability but the problem is the csrf token remain the same of the previous

Table merge cells - Vaadin

谁说我不能喝 提交于 2019-12-24 14:55:28
问题 I'm Creating table with Vaadin. Some of the cells are repeating. So I want them to merge in one cell, as you can see on the image: The first image show how the table looks now, and the second is how I want to look with merged cells. I'm using this code: Table table = new Table(AppData.getMessage("menu.report2")); table.addContainerProperty(tableHeaders[0], String.class, null); table.addContainerProperty(tableHeaders[1], String.class, null); table.addContainerProperty(tableHeaders[2], String

Vaadin7 Container Updates from Server - To use server push or not

那年仲夏 提交于 2019-12-24 14:17:06
问题 I wanted to implement Vaadin Server push so that changes on the server DB are pushed to users. For example, if User A saves to the server DB, then User B should see the change automatically on his UI. However, the Vaadin book states that: The SQLContainer keeps continuously checking the amount of rows in the connected database table in order to detect external addition or removal of rows. By default, the table row count is assumed to remain valid for 10 seconds. This value can be altered from

neo4j partial dump with cypher in java

你。 提交于 2019-12-24 13:38:36
问题 Yesterday i asked a question but it was unclear, so i created a new one with really better explanations to find the answer i need :). So, in my Java Application, i need to do a neo4j copy System, here is an example: A <--- this is a project / \ <--- With relationships B C <--- and subnodes + Labels / \ / \ <--- with a depth unknown ......... I need to do a copy of this in my database, with another id, like this: A A1 / \ / \ B C B1 C1 / \ / \ / \ / \ ......... .......... In neo4j shell, i can

Vaadin DateField validation does not show validation errors

故事扮演 提交于 2019-12-24 12:18:13
问题 Hello I'm using Vaadin 8 and im trying to use Vaadins DateField for user input. private DateField date = new DateField("Date of Birth"); ... binder.forField(date).asRequired("Some Warning").withValidator(new DateValidator()).bind(Person::getDateOfBirth, Person::setDateOfBirth); The DateValidator checks if the Person is at least 18 years old. The Problem is that if I use the Datepicker, that is integrated in the DateField no validation error is shown to the user if the Person is younger than

vaadin 7.75 How to add combobox to a grid?

旧时模样 提交于 2019-12-24 11:47:53
问题 I'm on Vaadin 7.7 and I switch tables to the grid. Only I can not personalize my cells as I would like. Here I would like to add comboboxes on a column from an arraylist and retrieve the chosen value. Here's some of my code: Here I create my IndexedContainer IndexedContainer indexedContainer = new IndexedContainer(); indexedContainer.addContainerProperty("Type de véhicule",String.class,""); Here I add my items: indexedContainer.addItem(listValue); indexedContainer.getContainerProperty

Build fails after upgrading from Vaadin 7 8

江枫思渺然 提交于 2019-12-24 10:47:31
问题 I just upgraded from Vaadin 7 to 8. We were on 7.7.7 and now we are on 8.0.3. My IDE shows no compile time errors but when I run mvn package I see the following error.. [INFO] --- vaadin-maven-plugin:8.0.3:compile (default) @ eagleportal --- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 25.728 s [INFO] Finished at: 2017-03-22T18:19:55-06:00

Vaadin cannot establish Websocket connection on OpenShift

て烟熏妆下的殇ゞ 提交于 2019-12-24 07:25:17
问题 I'm using Vaadin 7.3 with Tomcat8 (built manually from sources on the server) on the OpenShift server. My other setup is Tomcat7 7.0.54 also on OpenShift. My problem appears on both those configurations. Here's what happens: while I'm opening my Vaadin application with the @Push support enabled, I get the following error: WebSocket connection to 'ws://t8-drewconnect.rhcloud.com/web/PUSH/?v-uiId=0&v-csrfToken=4097664e-4d3b-4dd6-9474-0a6441986e9a&X-Atmosphere-tracking-id=0&X-Atmosphere

How to get the time of Computer and not server Java vaadin

十年热恋 提交于 2019-12-24 07:08:42
问题 Hey how to get the time of the computer and not the server using vaadin because getDate return to me the time of the server but i want the client computer time ?? 回答1: Vaadin has a class called WebBrowser that provides useful information about the client (browser): You can access the current WebBrowser instance for example as follows: public class MyApplication extends Application { @Override public void init() { setMainWindow(new Window()); ApplicationContext context = this.getContext(); if