vaadin

404 for js files when using spring boot with vaadin

喜夏-厌秋 提交于 2019-12-01 04:43:07
问题 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() //

How to get all sessions in Vaadin

不问归期 提交于 2019-12-01 03:21:55
I want to know How many users are connected to my application in real time. I got the idea to loop on number of session that are open but I can't find how to do that. If you have another way to do it your suggestions are welcome. Best solution i found so far is to count the sessions when they are created and destroyed. public class VaadinSessionListener{ private static volatile int activeSessions = 0; public static class VaadinSessionInitListener implements SessionInitListener{ @Override public void sessionInit(SessionInitEvent event) throws ServiceException { incSessionCounter(); } } public

Failed to load Widgetsets in maven project in eclipse

房东的猫 提交于 2019-12-01 00:57:44
I have created a vaadin web application using maven in eclipse . In particular I have used the archetype vaadin-archetype-touchkit as described in the book of vaadin (20.3.4) . Without making any change on the default generated code I have run it with maven with goals clean package . Then I compiled the Widgetset . When I try to run it on Tomcat 7, I receive the strange message from the webpage: Failed to load the WidgetSet: <WidgetSet Path>.DefaultWidgetSet.nocache.js On the console I see also the error messages: INFO: Requested resource [/VAADIN/themes/reindeer/styles.css] not found from

Vaadin 8 : reload grid with data from server every 1min

删除回忆录丶 提交于 2019-12-01 00:04:59
I am trying to have a auto refresh feature for the grid which basically, updates the grid with latest data from the server every 'n' seconds. I was able to implement the PollListner whenever the user enables Auto-Refresh. UI ui= TestUI.getCurrent(); Boolean value = isRefreshChkBox.getValue(); PollListener listener = e -> { explorer.reloadUI(); }; if (value) { String refreshRateValue = refreshRateTxtField.getValue(); int refreshRate = Integer.valueOf(refreshRateValue); int millis = (int) TimeUnit.SECONDS.toMillis(refreshRate); absUI.setPollInterval(millis); absUI.addPollListener(listener); }

Vaadin JPAContainer JDBC Connection Usage

[亡魂溺海] 提交于 2019-12-01 00:01:22
Once one JPAContainer is created like JPAContainer users = JPAContainerFactory.make(User.class, "persistenceUnitName"); Now I suppose that the "users" container will use one EntityManager which in turn uses one JDBC connection from the connection pool. That resource utilization (jdbc Connection attached to EntityManager attached to JPAContainer) happens during the lifetime of the httprequest or the usage of the entityManager/connection has another lifespan ? Can you please help me understand the gap between one JPAContainer instance and when and how jdbc connections are used through the

How to detect when Vaadin FileDownloader succeeds or fails

倾然丶 夕夏残阳落幕 提交于 2019-11-30 22:51:08
I have Vaadin 7 code to give the user an option to download a file: Button btnDownloadResults = new Button("Download Results", FontAwesome.CLOUD_DOWNLOAD); resource = new StreamResource(new MyStreamResource(), suggestedSaveAsFilename); new FileDownloader(resource).extend(btnDownloadResults); I would like to trigger code when the download has succeeded, or even if the download manages to start. Uses for this include closing a window, starting a progress spinner, or incrementing a download count. Unlike the Vaadin Upload component, the FileDownloader does not have any listeners for finding out

Creating multirow table headers

纵饮孤独 提交于 2019-11-30 20:43:18
I have a table where my column headers are set with the following instruction : table.setColumnHeader I wonder how can I create multilevel table headers like on this page ? As of Vaadin 6.7.3, this is currently not possible using the stock Vaadin table component. There is a Trac issue raised for changing this for Vaadin 7. See https://vaadin.com/forum/-/message_boards/view_message/900369 for more details. Depending on your requirements, you could hide the table component's header and try to simulate the header (by using a HorizontalLayout, generating your own headers and listening to column

Failed to load Widgetsets in maven project in eclipse

陌路散爱 提交于 2019-11-30 20:40:38
问题 I have created a vaadin web application using maven in eclipse . In particular I have used the archetype vaadin-archetype-touchkit as described in the book of vaadin (20.3.4). Without making any change on the default generated code I have run it with maven with goals clean package . Then I compiled the Widgetset . When I try to run it on Tomcat 7, I receive the strange message from the webpage: Failed to load the WidgetSet: <WidgetSet Path>.DefaultWidgetSet.nocache.js On the console I see

How can I make a VerticalLayout scrollable using vaadin?

穿精又带淫゛_ 提交于 2019-11-30 19:32:57
I have a Components which exists as a common layout for all my pages. The layout of this component is as follows (made using paint so please sorry :p): Right arrows mean that this layout is a HorizontalLayout and down arrows VerticalLayout. I'm really interested in making bodyContent layout SCROLLABLE. Within this layout I usually introduce lots of UI components (more layouts, text fields, forms, grids...) and sometimes components aren't shown due to the lack of vertical space and the absence of vertical scroll. So is there any way to make bodyContent scrollable (using SCSS/CSS or any other

Unterstanding how Vaadin uses GWT

◇◆丶佛笑我妖孽 提交于 2019-11-30 19:02:40
After playing around with Vaadin for about a week I'm curious about how Vaadin uses GWT. GWT compiles Javacode to Javascript. This has to be done everytime when you are redeploying. Since Vaadin has to be understood as a server-centric framework, eliminating your flexibility on writing Code that is executed on Clientside and moving everything to the server (which sounds worse than it actually is), the GWT Compiler only runs once a time. For example this happens when you are importing a plugin from the vaadin website. But it can't be that easy right? If it only would compile the code of the