vaadin

Using Vaadin 7.4.9 - How to delete data from the grid

∥☆過路亽.° 提交于 2019-12-01 13:41:08
I need to delete data from the grid (container) and then i need refresh the rows. How I can do it? Grid grid = new Grid(); IndexedContainer container = new IndexedContainer(); grid.setContainerDataSource(container); container.addContainerProperty("firstNumber", Integer.class, 0); container.addContainerProperty("secondNumber", Integer.class, 0); container.addItem(1); Item item = container.getItem(1); int firstNumber = item.getItemProperty("firstNumber").setValue("1"); item = container.getItem(1); int secondNumber = item.getItemProperty("secondNumber").setValue("2"); Now I try to change cell

Using Vaadin 7.4.9 - How to delete data from the grid

浪尽此生 提交于 2019-12-01 11:35:17
问题 I need to delete data from the grid (container) and then i need refresh the rows. How I can do it? Grid grid = new Grid(); IndexedContainer container = new IndexedContainer(); grid.setContainerDataSource(container); container.addContainerProperty("firstNumber", Integer.class, 0); container.addContainerProperty("secondNumber", Integer.class, 0); container.addItem(1); Item item = container.getItem(1); int firstNumber = item.getItemProperty("firstNumber").setValue("1"); item = container.getItem

How to serve static resources from a Vaadin/Spring application?

核能气质少年 提交于 2019-12-01 09:18:30
I have Vaadin web application with spring security integration for authentication. The configuration of the Vaadin servlet is pretty simple: <servlet> <servlet-name>Vaadin Application Servlet</servlet-name> <servlet-class>com.example.SpringApplicationServlet</servlet-class> <init-param> <param-name>applicationBean</param-name> <param-value>mainApplication</param-value> </init-param> <init-param> <param-name>widgetset</param-name> <param-value>com.example.widgetset.CustomWidgetSet</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>Vaadin Application Servlet</servlet-name>

How to serve static resources from a Vaadin/Spring application?

一个人想着一个人 提交于 2019-12-01 07:24:27
问题 I have Vaadin web application with spring security integration for authentication. The configuration of the Vaadin servlet is pretty simple: <servlet> <servlet-name>Vaadin Application Servlet</servlet-name> <servlet-class>com.example.SpringApplicationServlet</servlet-class> <init-param> <param-name>applicationBean</param-name> <param-value>mainApplication</param-value> </init-param> <init-param> <param-name>widgetset</param-name> <param-value>com.example.widgetset.CustomWidgetSet</param-value

404 for js files when using spring boot with vaadin

我的梦境 提交于 2019-12-01 06:57:39
I have a problem when using spring security in a vaadin project with spring-boot. So I'am using a PdfViewer Addon to display PDF Files. But I'm getting the following error message: error:"Not Found" message:"No message available" path:"/APP/PUBLISHED/pdf.worker.js" status:404 and my spring security configuration looks like this: @Override protected void configure(HttpSecurity http) throws Exception { http .headers() .defaultsDisabled() .frameOptions().sameOrigin().and() .csrf().disable() // Use Vaadin's CSRF protection .authorizeRequests().antMatchers("/").permitAll() .antMatchers("

Is Vaadin Elements meant to be used with the Vaadin Framework?

*爱你&永不变心* 提交于 2019-12-01 06:14:39
Vaadin seems to be pushing in 2 directions: Vaadin Framework (Java - Server-side) Vaadin Elements (Javascript - Client-side) Are they meant to be used together now.. or in the future? Or just 2 separate, unrelated product offerings? For example , is the Vaadin Grid Element (not to be confused with Vaadin 7's Java Grid ), meant to be used in 'Java-land'? I found this Server-side Elements post , which talks about creating/manipulating Javascript Web Components from the Server-side. Is this what we are meant to use? Or is there something else coming to simplify component usage in Java? ..I feel I

HttpServletRequest getLocale returns OS locale not browser locale

守給你的承諾、 提交于 2019-12-01 06:06:50
问题 I am using vaadin framework and in my application I have: @Override public void onRequestStart(HttpServletRequest request, HttpServletResponse response) { currentIP = request.getRemoteAddr(); setLocale(request.getLocale()); handle.set(this); this.request = request; this.response = response; } however, request.getLocale() returns en_US , which is my OS locale. However, in Firefox addon for switching locales (https://addons.mozilla.org/cs/firefox/addon/quick-locale-switcher/?src=userprofile), I

Vaadin @Javascript : clear cache for updated JS file

萝らか妹 提交于 2019-12-01 05:41:30
I have a @JavaScript annotation in my application to load a .js file from the classpath. Now I've made an update to the file and redeployed (locally), but I always get the old version back. I've tried reloading everything (ctrl+R, ctrl+F5) but that doesn't work and also I wouldn't want the users to have to do that. A trick I used in the past (without Vaadin) was to append a request parameter with the version (e.g. ?version=1) and update that so that the URL changes. But apparently that isn't allowed for the @JavaScript annotation (Vaadin doesn't even try to load the file). David Blaney I have

Implement a column renderer for Vaadin 8 Grid

社会主义新天地 提交于 2019-12-01 05:40:22
问题 The Vaadin Framework guide has a page describing how to use Column Renderers in a Vaadin Grid. And this page describes implementing renderers, but all too briefly. I want to implement a InstantRenderer to complement the partial set of java.time renderers added in Vaadin 8.1. Renderers were added for LocalDate & LocalDateTime but not for Instant , OffsetDateTime , and ZonedDateTime . For my Instant renderer I am currently simply applying the current default time zone ( ZoneId ) to get a

Is Vaadin Elements meant to be used with the Vaadin Framework?

前提是你 提交于 2019-12-01 05:14:38
问题 Vaadin seems to be pushing in 2 directions: Vaadin Framework (Java - Server-side) Vaadin Elements (Javascript - Client-side) Are they meant to be used together now.. or in the future? Or just 2 separate, unrelated product offerings? For example , is the Vaadin Grid Element (not to be confused with Vaadin 7's Java Grid), meant to be used in 'Java-land'? I found this Server-side Elements post, which talks about creating/manipulating Javascript Web Components from the Server-side. Is this what