|
15 | 15 | */ |
16 | 16 | package com.vaadin.flow.component.checkbox.tests; |
17 | 17 |
|
18 | | -import java.util.Set; |
19 | | - |
20 | 18 | import com.vaadin.flow.component.checkbox.Checkbox; |
21 | 19 | import com.vaadin.flow.component.checkbox.CheckboxGroup; |
22 | 20 | import com.vaadin.flow.component.html.Div; |
23 | 21 | import com.vaadin.flow.component.html.NativeButton; |
24 | 22 | import com.vaadin.flow.component.html.Span; |
25 | | -import com.vaadin.flow.data.binder.Binder; |
26 | 23 | import com.vaadin.flow.router.Route; |
27 | 24 |
|
28 | 25 | @Route("vaadin-checkbox/helper") |
29 | 26 | public class HelperPage extends Div { |
30 | 27 |
|
31 | 28 | public HelperPage() { |
32 | | - CheckboxGroup<String> checkboxGroup = new CheckboxGroup<>(); |
33 | | - Span span = new Span("Helper text"); |
34 | | - checkboxGroup.setHelperComponent(span); |
35 | | - |
36 | | - checkboxGroup.setItems("foo", "bar", "baz"); |
37 | | - Binder<Bean> binder = new Binder<>(); |
38 | | - binder.bind(checkboxGroup, bean -> bean.choices, |
39 | | - (bean, value) -> bean.choices = value); |
40 | | - binder.setBean(new Bean()); |
41 | | - |
42 | 29 | CheckboxGroup<String> groupWithHelperGenerator = new CheckboxGroup<>(); |
43 | 30 | groupWithHelperGenerator.setItems("A", "B", "C"); |
44 | 31 | groupWithHelperGenerator |
@@ -71,12 +58,8 @@ public HelperPage() { |
71 | 58 | e -> helperComponentCheckbox.setHelperComponent(null)); |
72 | 59 | emptyHelperComponent.setId("empty-helper-component"); |
73 | 60 |
|
74 | | - add(checkboxGroup, groupWithHelperGenerator, clearItemHelperGenerator, |
| 61 | + add(groupWithHelperGenerator, clearItemHelperGenerator, |
75 | 62 | helperTextCheckbox, helperComponentCheckbox, emptyHelperText, |
76 | 63 | emptyHelperComponent); |
77 | 64 | } |
78 | | - |
79 | | - public static class Bean { |
80 | | - private Set<String> choices; |
81 | | - } |
82 | 65 | } |
0 commit comments