public FormProperties() {
// Setup demonstration form
form = new Form("form");
FieldSet fieldSet = new FieldSet("demo", "<b>Demonstration Form</b>");
form.add(fieldSet);
nameField = new TextField("name");
nameField.setRequired(true);
nameField.setFocus(true);
fieldSet.add(nameField);
emailField = new EmailField("email");
emailField.setRequired(true);
fieldSet.add(emailField);
investmentsField = new InvestmentSelect("investments");
fieldSet.add(investmentsField);
dateJoinedField = new DateField("dateJoined");
fieldSet.add(dateJoinedField);
form.add(new Submit("ok", " OK ", this, "onOkClick"));
Submit cancel = new PageSubmit("cancel", HomePage.class);
cancel.setCancelJavaScriptValidation(true);
form.add(cancel);
addControl(form);
// Setup control form
optionsForm = new Form("optionsForm");
optionsForm.setColumns(3);
optionsForm.setLabelAlign("right");
optionsForm.setListener(this, "onApplyChanges");
optionsForm.setLabelStyle("padding-left:2em;");