vaadin

How to add css to Vaadin / Maven project?

二次信任 提交于 2019-12-06 03:32:04
问题 There exists a question at SO about how to add css to Vaadin project. The tip there was to add css at /WEB-INF/VAADIN/themes/ location. My problem is that Vaadin projects normally have WEB-INF folder under WebContent and now on Maven the similar folder is under webapp . This seems to be causing that my css changes do not take effect. Also, is it necessary to have the custom css in same sub-structure as the original css? I want to modify table css and don't know if the css needs to be in a

How to disable browser caching in Vaadin

余生长醉 提交于 2019-12-06 02:59:54
问题 My question is short (and hopefully simple to solve!): How can I completely disable browser-caching in my webservice realized with vaadin ? I want to completely disable caching since I'm getting problems when I try to do some PDF streaming and displaying them in my browers. I have read about a solution for my problem for example here: Using <meta> tags to turn off caching in all browsers? They talk about adding some headers to the web application that disable browser caching. But how do I add

Scoped Spring events possible?

筅森魡賤 提交于 2019-12-06 02:45:54
问题 The Spring event mechanism supports publishing application events and listening to these events within Spring components via the @EventListener annotation. However, I cannot find anything about sending events within a specific scope in the documentation. My specific need for Vaadin is: in context of a user interaction, send an event (e.g. logged-in event) this event should only be consumed by beans in same @UIScope , i.e. other user UIs shouldn't be effected Is that possible? NOTE: This is

Right-align column contents in Vaadin Grid?

时间秒杀一切 提交于 2019-12-06 02:36:21
In the new Vaadin Grid widget (alternative to venerable Table ), how does one right-align numbers or other content in a column? Morfic The simplest way I can think of is to define your own CSS classes and style generator, pretty much similar to what I'd had done when working with tables. @Theme("mytheme") @Widgetset("com.matritza.MyAppWidgetset") public class MyUI extends UI { @WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true) @VaadinServletConfiguration(ui = MyUI.class, productionMode = false) public static class MyUIServlet extends VaadinServlet { // meh, default

Replacement for `AbsoluteLayout` from Vaadin 8 Framework in Vaadin 10 Flow?

泪湿孤枕 提交于 2019-12-06 02:01:33
问题 The AbsoluteLayout in Vaadin 8 (Framework) enables pixel-position-oriented placement of widgets within a layout. While not my first layout of choice, the AbsoluteLayout is suited to porting code from other UI-building platforms that use pixel-position-oriented layout. Example code from the manual: // A 400x250 pixels size layout AbsoluteLayout layout = new AbsoluteLayout(); layout.setWidth("400px"); layout.setHeight("250px"); // A component with coordinates for its top-left corner TextField

save file on server, java web application [duplicate]

◇◆丶佛笑我妖孽 提交于 2019-12-06 01:50:35
问题 This question already has answers here : Recommended way to save uploaded files in a servlet application (2 answers) Closed 4 years ago . from my web application (vaadin) I generate XML files and want to store these files on the server. I did: context.getHttpSession().getServletContext().getRealPath("/"); I run the web app on tomcat and managed to save the file to the app folder under .metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/my_app_folder/ on the same level with META-INF

Vaadin 10 grid style individual row based on contents

主宰稳场 提交于 2019-12-06 01:20:05
I am using a Vaadin grid to display incoming information and update it in realtime. I have been able to style all of the rows by accessing the DOM like so: <dom-module id="my-grid" theme-for="vaadin-grid"> <template> <style> [part="row"] { height: 27px; font-size: 14px; max-height: 27px; } </style> </template> </dom-module> What I am trying to do is set specific styling to certain rows based on the contents of the data of the row. Basically I have a column of booleans and if it's true, I want the row to have a green background, and if it's false I want that row to have a red background. Now

How to @Inject object from different project module included as jar

主宰稳场 提交于 2019-12-05 22:57:18
问题 I am using Vaadin-CDI in multi-module maven project with one module desired for common classes such interfaces, abstract classes and others. My problem is, that I am not able to @Inject class anotated @UIScoped as usual, which is placed in core module into another. I am still getting UnsatisfiedResolutionException SEVERE: CDI Beans module deployment failed javax.enterprise.inject.UnsatisfiedResolutionException: Api type [com.web.core.TestClass] is not found with the qualifiers Qualifiers: [

How to play video in vaadin?

一曲冷凌霜 提交于 2019-12-05 21:41:50
I used both video component Video video = new Video(); and embedded Embedded embed = new Embedded("my video", new ExternalResource("yyy/xxx.mp4")); embed.setMimeType("application/x-shockwave-flash"); This plays quite well in iphone which uses safari browser, but in my pc am using mozilla firefox browser its not playing. It shows an like error in mime type. Can you check this code from vaadin sampler : Embedded e = new Embedded(null, new ExternalResource( "http://www.youtube.com/v/meXvxkn1Y_8&hl=en_US&fs=1&")); e.setAlternateText("Vaadin Eclipse Quickstart video"); e.setMimeType("application/x

Vaadin AbstractJavaScriptComponent: prevent browser javascript caching [duplicate]

瘦欲@ 提交于 2019-12-05 21:26:22
This question already has an answer here: Vaadin @Javascript : clear cache for updated JS file 4 answers I have a custom javascript component in my vaadin application which extends AbstractJavaScriptComponent . @JavaScript({"javaScriptConnector.js", "MyComp.js", "MyCompHtml.js"}) public class MyComp extends AbstractJavaScriptComponent { ..... ..... } Whenever I do a change to MyComp.js , I need to clear my browser cache to see the change. This is ok when I develop the app, but I cannot ask my users to clear cache once the app goes live. Is there a way to prevent browser caching of MyComp.js ?