vaadin

How can one create webservices in Vaadin 12?

烈酒焚心 提交于 2020-01-15 09:29:28
问题 I am considering using Vaadin 12 for my front-end development (we're mainly pure Java engineers and I'd like to keep the code in Java for the most part). However, we may need to also support webservices. If we didn't use Vaadin, we'd just use Jersey & DropWizard, and creating webservices is straightforward. But in Vaadin 12 , can I create webservices with minimal additional code/hacks? (I saw examples of how to do so in Vaadin 8, but Vaadin 10 & 12 is substantively different from what I read.

Where to put Flyway migrations in a Vaadin project (Java Servlet web app)?

笑着哭i 提交于 2020-01-14 06:12:09
问题 Where does one put their Flyway migration files in a Vaadin 7 project created with the multi-module Maven archetype? I will activate the migrations through the Java API in Flyway (not the command-line). Might the solution for Vaadin work in any Java Servlet based web app project running in a web container such as Tomcat or Jetty? 回答1: Update As of 2018-06, the Vaadin 8 archetype named vaadin-archetype-application-multimodule no longer provides an existing folders for Web Pages , META-INF ,

Generating PDF with iText and batik

倖福魔咒の 提交于 2020-01-14 02:30:14
问题 I'm trying to export text and SVG graphs to a PDF. I found out that iText and batik can do this. So I tried doing that, but everytime I put in a graph, it would become extraordinary small. I thought it might be something with my code, so I figured I would try an examplecode from Vaadin. public class PdfExportDemo { private String fontDirectory = null; private final String baseFont = "Arial"; private PdfWriter writer; private Document document; private Font captionFont; private Font normalFont

Where should I place my Vaadin 10+ static files?

旧城冷巷雨未停 提交于 2020-01-11 19:55:14
问题 In Vaadin 10-14, where should I place my static files, such as CSS, JavaScript, and Polymer templates? How about static files such as images? Also, how do I import these files in Vaadin? Is there a difference between Vaadin 14 with npm and Vaadin 10-13 with bower? 回答1: All paths are relative to the project root, e.g. where the pom.xml file is located in a Maven project. JavaScript imported using @JsModule uses strict mode. Among other things, this means that global variables must be defined

NotSerializableException on serialization of objects currently shown by Vaadin

僤鯓⒐⒋嵵緔 提交于 2020-01-11 14:16:46
问题 I get a NotSerializableException when I want to serialize an Object that is currently shown by Vaadin. The structure is like this: Vaadin UI <--- serialize / deserialize --- > Hibernate/JPA Postgres Database Vaadin shows objects that are requested from the Database via IPC, but when I manipulate the object and want to save it again by serializing it and sending it over to the controller I get the following Exception: java.io.NotSerializableException: org.springframework.boot.context.embedded

Vaadin web.xml setup

老子叫甜甜 提交于 2020-01-07 06:57:13
问题 I have this web.xml : <?xml version="1.0" encoding="UTF-8"?><web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>TestVaadin</display-name> <context-param> <description> Vaadin production mode</description> <param-name>productionMode</param-name> <param-value>false</param-value> </context-param>

How to upload an image using ByteArrayOutputStream in Vaadin?

眉间皱痕 提交于 2020-01-07 05:58:06
问题 I want to receive an uploaded image as a byte array (so that it can be inserted into a sql database). I also want to show the uploaded image as a preview. I have tried the following code but im not receiving the bytes of the full image. (if i print the byte array it prints only a few characters) final Embedded preview = new Embedded("Uploaded Image"); preview.setVisible(false); final Upload upload = new Upload(); upload.setCaption("Image"); // Create upload stream final ByteArrayOutputStream

Vaadin - Unable to center components - design issue

左心房为你撑大大i 提交于 2020-01-07 05:12:26
问题 I'm not familiar with css, and unfortunately i dont have much time to investigate this so I've choosen build-in Vaadin ValoTheme . I have a verticallayout with two objects - label and panel, both components should be centered. This is what i'm trying to archieve: Unfortunately, after enumorous attempts to make simlar, i got this My code: public class SplashScreen extends VerticalLayout implements View { private static final int PANEL_WIDTH = 320; private static final int PANEL_HEIGHT = 140;

Google Wallet Integration through custom widget in Vaadin6

情到浓时终转凉″ 提交于 2020-01-06 15:32:23
问题 I need to integrate Google wallet into my Vaadin 6 application, downloaded wallet api/demo from here. First I was trying to run this given sample into vaadin but after a long effort I am stuck now. Tried lots of ways/examples , studied lot about widgets but only this example was found to be simple and working. I added my lines of code, the process going smooth upto the purchase() call but when it calls wallet API function buy() the browser's page get cleared and nothing happened as if program

Google Wallet Integration through custom widget in Vaadin6

核能气质少年 提交于 2020-01-06 15:32:13
问题 I need to integrate Google wallet into my Vaadin 6 application, downloaded wallet api/demo from here. First I was trying to run this given sample into vaadin but after a long effort I am stuck now. Tried lots of ways/examples , studied lot about widgets but only this example was found to be simple and working. I added my lines of code, the process going smooth upto the purchase() call but when it calls wallet API function buy() the browser's page get cleared and nothing happened as if program