Vaadin is a popular Java framework for building Web Applications, so it is logical to have the ability to add SVG to the Vaadin Web App. Method 1: Using Vaadin’s built-in SVG support Vaadin provides a built-in way to display SVGs using the SVG class. Here’s an example: import com.vaadin.flow.component.html.Div; import com.vaadin.flow.server.VaadinRequest; public class MyUI…
Category: Vaadin
How to integrate Velocity Views in Vaadin Web App
To integrate Velocity templates into a Vaadin Web application, you’ll need to follow these steps to combine the two frameworks. This can be particularly useful if you want to use Velocity for templating certain parts of the application, like emails, custom HTML content, or other non-Vaadin UI areas. Steps to Integrate Velocity with Vaadin Add…
2024 Firebase Push Notifications in Vaadin Web [Fail⚠️] App [Mobile✅]
Most recently I’ve tried to Integrate Firebase Push Notifications into a Vaadin Web App and I ended up – getting it – working – on Mobile. Here’s an overview of the steps I’ve done. Using Vaadin’s built-in support for @Push Notifications Vaadin provides ability to “Push” content onto the browser from your server. If you…
Drag & Drop – Vaadin Snippets
To create a list of components in a Vaadin web app that have Drag & Drop functionality, you’ll need to integrate several items that will improve User Experience. Drag & Drop Requirements And Events To have this funcionality at all – you neet to instruct the browser What Elements are draggable What other Elements are…
CI/CD for App Distribution – Spring Boot – Vaadin App
Here are the steps I’ve executed on a remote personal machine to set up CI/CD for my App Distribution – Spring Boot – Vaadin App. On Remote Personal Machine 1) define remote git repositorycd git/mkdir my_appcd my_app/git init –barepwd //outputs the current directory Git Hook cd hooksedit post-updatecurl to Jenkins with custom tokenmake post-update executable…
Vaadin Self-Changing – App Version Component
Here you have – the source code of Java Vaadin App Version Component with a main method that executes Self-Changing functionality. package com.programtom.my_app.views;import com.vaadin.flow.component.html.Div;import java.io.File;import java.io.IOException;import java.nio.charset.StandardCharsets;import java.nio.file.Files;import java.text.DateFormat;import java.text.SimpleDateFormat;import java.util.Date;import java.util.List;import java.util.stream.Collectors;public class AppVersionComponent extends Div { static final String version = “2”; static final String date = “2024-06-23 19:46:59”; static final DateFormat df…
Building UI with Vaadin Kotlin Bootstrap CSS
Building UI with Kotlin target – Vaadin Framework with styles from Bootstrap CSS – feels very much like Flutter/Jetpack Compose, Swift UI. Show me the code Here is the code so far: A Base Class @StyleSheet(“https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css”)open class BootstrapRootDiv : Div() {} A Concrete UI Div( Main( Form( Div( Image(), ), H1(“My App”), Div().apply { className…
Apps with Graph Data Structure
Apps with Graph Data Structure are far too often in broad application types than you think. Long time ago – when I was University – it was marked as good idea – to mix expertise from different humanatory nishes and “connect the dots”. There are tons of applications that use graphs. Navigation between nodes (bonus…
Platform & Library Dependencies – Developer Hell for Integration and Testing
Integrating with Platform and Library Dependencies is a Developer Hell for Coding, Integration and Testing. You must overcome million obsticles , dive deep into technical details to come up with solutions or at least workarounds. Long time ago – in a galaxy far, far away – I’ve integrated into Liferay Portlet, Struts 2 Framework, Google…
How to Read a File lazyly Line by Line with Java
In Java, you can use the Files.lines() method along with the Stream API to read a file lazily line by line. This approach is efficient for large files, as it reads and processes the file on demand rather than loading the entire file into memory. Here’s an example: import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import…