Example #1
0
  // Controller methods.
  //
  // In a big project, consider using separate controller/presenter
  // for improved testability. MVP is a popular pattern for large
  // Vaadin applications.
  private void listPayees() {
    // filtered by authorized user from Bluemix SSO
    try {
      Subject s = WSSubject.getCallerSubject();

      if (s != null) {
        Set<Principal> principals = s.getPrincipals();
        if (principals != null && principals.size() > 0) {
          authname = principals.iterator().next().getName();
        }
      }

    } catch (Exception exc) {
      authname = "bad stuff";
    }
    tservice.updateTransactions(authname);
    payeeTable.setBeans(new ArrayList<>(service.findByName(authname)));
  }
Example #2
0
 private void listPayees(String filterString) {
   payeeTable.setBeans(new ArrayList<>(service.findByName(filterString)));
 }