From: Roland Haeder Date: Mon, 12 Oct 2015 17:03:18 +0000 (+0200) Subject: Added showing of address book entries and size X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5e66e7b80ef4ab5f20cbdf2f0930465de699c667;p=jfinancials-war.git Added showing of address book entries and size --- diff --git a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java index 237876dd..bf5e802e 100644 --- a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java +++ b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java @@ -34,6 +34,7 @@ import org.mxchange.addressbook.exceptions.AddressbookNameAlreadyUsedException; 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; /** @@ -134,6 +135,18 @@ public class AddressbookWebBean implements AddressbookWebController { return Collections.unmodifiableList(this.addressbookList); } + @Override + public List 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; diff --git a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java index 6a60b22a..998938a5 100644 --- a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java +++ b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebController.java @@ -19,6 +19,7 @@ package org.mxchange.addressbook.beans.addressbook; 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 @@ -70,4 +71,22 @@ public interface AddressbookWebController extends Serializable { * @return A list of all address books by this user */ public List allAddressbooks (); + + /** + * Returns a list of all address book entries for given address book + *

+ * @param addressbook Address book instance + *

+ * @return List of all entries + */ + public List allEntries (final Addressbook addressbook); + + /** + * Size of all entries in given address book + *

+ * @param addressbook Address book instance + *

+ * @return Size of the entries in address book + */ + public int allEntriesSize (final Addressbook addressbook); } diff --git a/web/login/login_own_addressbooks.xhtml b/web/login/login_own_addressbooks.xhtml index 7938ed5d..25b34ae0 100644 --- a/web/login/login_own_addressbooks.xhtml +++ b/web/login/login_own_addressbooks.xhtml @@ -35,6 +35,15 @@ + + #{msg.ADDRESSBOOK_TOTAL_ENTRIES} + + + + + + + #{msg.ADDRESSBOOK_CREATED}