private void reportError(String message, Employee employee) {
    StringBuilder sb =
        new StringBuilder(message)
            .append(Messages.getString("EmployeeController.5"))
            .append(employee);
    final String error = sb.toString();

    UiUtils.showMessage(error);
    log.error(error);
  }
  public void onClick$btnUpdateEmployee(ForwardEvent fe) {
    if (lstEmployee.getSelectedItem() != null) {

      Employee employee = (Employee) (lstEmployee.getSelectedItem().getValue());

      employee.setFirstName(txtFirstName.getText());
      employee.setLastName(txtLastName.getText());
      employee.setAge(Integer.parseInt(intAge.getText()));
    } else {
      UiUtils.showMessage(Messages.getString("EmployeeController.2"));
    }
  }
  public void onClick$btnDeleteEmployee(ForwardEvent fe) {

    if (lstEmployee.getSelectedItem() != null) {
      Employee employee = (Employee) (lstEmployee.getSelectedItem().getValue());

      if (!_model.remove(employee)) {
        reportError(Messages.getString("EmployeeController.3"), employee);
      }

    } else {
      UiUtils.showMessage(Messages.getString("EmployeeController.4"));
    }
  }