Iterator<Tenant> tenants = this.tenantProvider.getTenants();
int count = 0;
while (tenants.hasNext()) {
count++;
Tenant tenant = tenants.next();
if (count == 1) {
pw.printf("<p class='statline ui-state-highlight'>Registered Tenants</p>");
}
pw.println("<div class='ui-widget-header ui-corner-top buttonGroup'>");
pw.printf("<span style='float: left; margin-left: 1em'>Tenant : %s </span>", escape(tenant.getName()));
this.printForm(pw, tenant, "Remove", "remove");
pw.println("</div>");
pw.println("<table class='nicetable'><tbody>");
pw.printf("<tr><td style='width: 30%%;'>Identifier</td><td>%s</td></tr>", escape(tenant.getId()));
pw.printf("<tr><td style='width: 30%%;'>Name</td><td>%s</td></tr>", escape(tenant.getName()));
pw.printf("<tr><td style='width: 30%%;'>Description</td><td>%s</td></tr>", escape(tenant.getDescription()));
pw.println("</tbody></table>");
}
// no existing tenants
if (count == 0) {
pw.printf("<p class='statline ui-state-highlight'>There are not registered tenants</p>");