package com.vaadin.tests.fields; import com.vaadin.data.util.BeanItem; import com.vaadin.tests.components.TestBase; import com.vaadin.tests.util.Millionaire; import com.vaadin.ui.Form; public class FormOneToMany extends TestBase { @Override protected void setup() { final Form form = new Form(); addComponent(form); form.setItemDataSource(createMillionaireItem()); // TODO support adding, editing and removing secondary addresses } protected BeanItem createMillionaireItem() { Millionaire person = new Millionaire("First", "Last", "foo@vaadin.com", "02-111 2222", "Ruukinkatu 2-4", 20540, "Turku"); BeanItem item = new BeanItem(person); // add nested properties from address item.expandProperty("address"); // TODO for now, hide secondary residences item.removeItemProperty("secondaryResidences"); return item; } @Override protected String getDescription() { return "Form with an editable list of sub-objects."; } @Override protected Integer getTicketNumber() { return null; } } > The official jQuery user interface library: https://github.com/jquery/jquery-uiwww-data
aboutsummaryrefslogtreecommitdiffstats
blob: 2dc72082e91418cd14d5f3336d79229259a88da8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50