The property id must not be already used in the form.
This field is added to the layout using the {@link #attachField(Object,Field)} method.
6263646566676869707172
* reference component. */ integerProperty = new ObjectProperty<Integer>(42); integerField = new TextField("Another Field", integerProperty); integerField.setId("_IF"); form.addField("text", integerField); /* * Action buttons. */ Button validate = new Button("Validate");
2122232425262728293031
PopupDateField datefield = new PopupDateField(); datefield.setResolution(PopupDateField.RESOLUTION_DAY); datefield.setDateFormat("dd/MM/yyyy"); form.addField("datefield", datefield); Button button = new Button("Validate"); button.addListener(new Button.ClickListener() { @Override
118119120121122123124125126127128
window.center(); final Form form = new Form(); form.setFooter(new VerticalLayout()); final InlineDateField dateField = new InlineDateField("Miesiąc"); dateField.setResolution(DateField.RESOLUTION_MONTH); form.addField("month", dateField); final TextField textField = new TextField("Wartość"); textField.setRequired(true); textField.setValue("100.99"); textField.addValidator(new DoubleValidator("Tylko wartości liczbowe")); form.addField("value", textField);
123124125126127128129130131132133
form.addField("month", dateField); final TextField textField = new TextField("Wartość"); textField.setRequired(true); textField.setValue("100.99"); textField.addValidator(new DoubleValidator("Tylko wartości liczbowe")); form.addField("value", textField); window.addComponent(form); Button button = new Button("Zapisz", form, "commit"); button.setIcon(new ThemeResource("../runo/icons/16/ok.png")); button.addListener(new ClickListener() {
3132333435363738394041
// t.setPropertyDataSource(p); // UNCOMMENT THIS LINE TO SEE BUG // HAPPENING // f.setPropertyDataSource(p); // f.setImmediate(true); t.setPropertyDataSource(f); form.addField("table", t); form.addField("name", f); addComponent(form); }
3233343536373839404142
// HAPPENING // f.setPropertyDataSource(p); // f.setImmediate(true); t.setPropertyDataSource(f); form.addField("table", t); form.addField("name", f); addComponent(form); } @Override