Entradas

Mostrando entradas de abril, 2023

Spring Boot (5) Bootstrap 5 multilevel dropdown menu

Imagen
 0. Introduction This post is based on  Frontend Paathshala bootstrap-menu.com ByteGrad These components are used  2 classes for defining menus (including the configuration file for reading the YAML file) A YAML file for storing the menu definition A controller of the URL used by the menu A ThymeLeaf file and 2 fragments CSS file 1. The Menu classes (and the configuration class) The menu class has the component of a menu, indicating the name, the href and so on package ximo . menus ; import java . util . ArrayList ; import java . util . List ; import lombok . AllArgsConstructor ; import lombok . Getter ; import lombok . NoArgsConstructor ; import lombok . Setter ; @Getter @Setter @AllArgsConstructor @NoArgsConstructor public class Menu { private String id ; private String name ; private List < String > idFills ; private String href = "#" ; private List < Menu > fills = new ArrayList < Menu > ( ) ;

Spring Boot (4) A dynamic form that calls a batch process and displays information of the process

0. Introduction These elements are needed: A generic field definition An anchor element that points to the URL passing the generic field definition A controller of this URL A Thymeleaf template that displays the fields and calls the process A WebSocket communication 1. The generic field definition (java class) Defines a field (value, label, component type..) package ximo . sockets . model ; import lombok . AllArgsConstructor ; import lombok . Getter ; import lombok . NoArgsConstructor ; import lombok . Setter ; @Getter @Setter @NoArgsConstructor @AllArgsConstructor public class FieldEdu { private String name ; private String label = "LABEL" ; private String component = "INPUT" ; //"SELECT INPUT RADIO CHECK" //In case the component is of tyoe "select" private String optionValues = "" ; //"1,2,3,4" private String optionText = "" ; //"Valencia,Castella,Angl