X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fde%2Fjuplo%2Fdemo%2FForm.java;h=b6e933bb6ad36a4e427fbf7aeb5e70b5f892684e;hb=bc4a7fe4decdbbb69186ef203593346816de7e2f;hp=5bd5388a0f5616f0384ee1b2f23b9f23eebc38d2;hpb=ca1ddb54ae8bf1908726a1e8ace2dbfb87266bee;p=demos%2Fspring-boot diff --git a/src/main/java/de/juplo/demo/Form.java b/src/main/java/de/juplo/demo/Form.java index 5bd5388..b6e933b 100644 --- a/src/main/java/de/juplo/demo/Form.java +++ b/src/main/java/de/juplo/demo/Form.java @@ -1,15 +1,29 @@ package de.juplo.demo; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.stream.Collectors; +import java.util.stream.Stream; import lombok.Data; /** - * Simple form with a single checkbox + * Simple form to demonstrate the behavior of checkboxes * @author Kai Moritz */ @Data public class Form +{ + Boolean option; + Inner inner = new Inner(); + Map map = + new LinkedHashMap<>( + Stream.of( "foo", "bar" ).collect(Collectors.toMap(a -> a, a -> false))); +} + +@Data +class Inner { Boolean option; }