BrightSide Workbench Full Report + Source Code
org.turro.contacts.zul.contact.AccountInput Class Reference
Inheritance diagram for org.turro.contacts.zul.contact.AccountInput:
Collaboration diagram for org.turro.contacts.zul.contact.AccountInput:

Public Member Functions

 AccountInput (final Contact contact) throws WrongValueException
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 38 of file AccountInput.java.

Constructor & Destructor Documentation

◆ AccountInput()

org.turro.contacts.zul.contact.AccountInput.AccountInput ( final Contact  contact) throws WrongValueException

Definition at line 42 of file AccountInput.java.

42  {
43  super(contact.getEmailAccount());
44  this.contact = contact;
45  setCols(30);
46  Constraint ctt = new Constraint() {
47  @Override
48  public void validate(Component comp, Object value) throws WrongValueException {
49  if(!isReadonly() && !Strings.isEmpty((String) value)) {
50  if(exists((String) value)) {
51  setText("");
52  throw new WrongValueException(AccountInput.this, I_.get("Login already exists"));
53  }
54  }
55  }
56  };
57  setConstraint(ctt);
58  addEventListener(Events.ON_CHANGE, new EventListener<Event>() {
59  @Override
60  public void onEvent(Event event) throws Exception {
61  contact.setEmailAccount(getValue());
62  }
63  });
64  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: