import org.mxchange.addressbook.model.addressbook.Addressbook;
import org.mxchange.addressbook.model.addressbook.AddressbookSessionBeanRemote;
import org.mxchange.addressbook.model.addressbook.UserAddressbook;
+import org.mxchange.addressbook.model.addressbook.entry.AddressbookEntry;
import org.mxchange.addressbook.model.addressbook.status.AddressbokStatus;
/**
return Collections.unmodifiableList(this.addressbookList);
}
+ @Override
+ public List<AddressbookEntry> allEntries (final Addressbook addressbook) {
+ // Ask the bean
+ return this.addressbookBean.allEntries(addressbook);
+ }
+
+ @Override
+ public int allEntriesSize (final Addressbook addressbook) {
+ // Ask the bean
+ return this.allEntries(addressbook).size();
+ }
+
@Override
public String getAddressbookName () {
return this.addressbookName;
import java.io.Serializable;
import java.util.List;
import org.mxchange.addressbook.model.addressbook.Addressbook;
+import org.mxchange.addressbook.model.addressbook.entry.AddressbookEntry;
/**
* An interface for user beans
* @return A list of all address books by this user
*/
public List<Addressbook> allAddressbooks ();
+
+ /**
+ * Returns a list of all address book entries for given address book
+ * <p>
+ * @param addressbook Address book instance
+ * <p>
+ * @return List of all entries
+ */
+ public List<AddressbookEntry> allEntries (final Addressbook addressbook);
+
+ /**
+ * Size of all entries in given address book
+ * <p>
+ * @param addressbook Address book instance
+ * <p>
+ * @return Size of the entries in address book
+ */
+ public int allEntriesSize (final Addressbook addressbook);
}
</h:link>
</h:column>
+ <h:column>
+ <f:facet name="header">#{msg.ADDRESSBOOK_TOTAL_ENTRIES}</f:facet>
+
+ <h:link outcome="login_show_addressbook_entries" title="#{msg.LINK_LOGIN_SHOW_ADDRESS_BOOK_ENTRIES_TITLE}">
+ <f:param name="addressbook_id" value="#{addressbook.addressbookId}" />
+ <h:outputText id="addressbookEntries" value="#{addressbookController.allEntriesSize(addressbook)}" title="#{msg.ADDRESSBOOK_NAME_TITLE}" />
+ </h:link>
+ </h:column>
+
<h:column>
<f:facet name="header">#{msg.ADDRESSBOOK_CREATED}</f:facet>