public Panel getMultiFieldValidatorPanel() {
VerticalPanel root = new VerticalPanel();
FormLayoutPanel formPanel = new FormLayoutPanel();
pass1.addFocusListener(new FocusListener() {
public void onFocus(Widget sender) {
// TODO Auto-generated method stub
}
public void onLostFocus(Widget sender) {
validator.validate("passwords");
}
});
pass2.addFocusListener(new FocusListener() {
public void onFocus(Widget sender) {
// TODO Auto-generated method stub
}
public void onLostFocus(Widget sender) {
validator.validate("passwords");
}
});
name1.addStyleName("greenBackground");
name2.addStyleName("greenBackground");
name3.addStyleName("greenBackground");
name4.addStyleName("greenBackground");
formPanel.add("Password 1", pass1, false)
.add("Password 2", pass2, false)
.newRow()
.add("Name 1", name1, false)
.add("Name 2", name2, false)
.add("Name 3", name3, false)