From ad6769d3de1297e7f0c585aacb2ec678ccd9266e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 24 Aug 2016 10:52:00 +0200 Subject: [PATCH] Please cherry-pick: - got rid of redundant hasFoos() as #{ no someController.allFoos().isEmpty()} works fine - renamed controller method allMobileProvider() -> allMobileProviders() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- ...bookAdminMobileProviderWebRequestBean.java | 2 +- ...dressbookMobileProviderWebRequestBean.java | 11 +-- ...ookMobileProviderWebRequestController.java | 9 +-- .../admin/mobile/admin_form_mobile_data.tpl | 67 +++++++++++++++++++ .../generic/mobile_selection_box.tpl | 2 +- 5 files changed, 73 insertions(+), 18 deletions(-) create mode 100644 web/WEB-INF/templates/admin/mobile/admin_form_mobile_data.tpl diff --git a/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java index d81b5a1e..44de6278 100644 --- a/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java @@ -189,7 +189,7 @@ public class AddressbookAdminMobileProviderWebRequestBean extends BaseAddressboo boolean isFound = false; // Get list of all providers - List providers = this.mobileController.allMobileProvider(); + List providers = this.mobileController.allMobileProviders(); // Get iterator from it Iterator iterator = providers.iterator(); diff --git a/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookMobileProviderWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookMobileProviderWebRequestBean.java index 2d3f7d23..0d214d79 100644 --- a/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookMobileProviderWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookMobileProviderWebRequestBean.java @@ -17,7 +17,6 @@ package org.mxchange.addressbook.beans.mobileprovider; import java.text.MessageFormat; -import java.util.Collections; import java.util.List; import javax.annotation.PostConstruct; import javax.enterprise.context.SessionScoped; @@ -95,13 +94,9 @@ public class AddressbookMobileProviderWebRequestBean extends BaseAddressbookCont } @Override - public List allMobileProvider () { - return Collections.unmodifiableList(this.mobileProviders); - } - - @Override - public boolean hasMobileProvider () { - return (!this.mobileProviders.isEmpty()); + @SuppressWarnings ("ReturnOfCollectionOrArrayField") + public List allMobileProviders () { + return this.mobileProviders; } /** diff --git a/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookMobileProviderWebRequestController.java b/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookMobileProviderWebRequestController.java index edf1854c..8fef39db 100644 --- a/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookMobileProviderWebRequestController.java +++ b/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookMobileProviderWebRequestController.java @@ -33,14 +33,7 @@ public interface AddressbookMobileProviderWebRequestController extends Serializa *

* @return A list of all mobile providers */ - List allMobileProvider (); - - /** - * Checks whether mobile providers are registered - *

- * @return Whether mobile providers are registered - */ - boolean hasMobileProvider (); + List allMobileProviders (); /** * Observes events being fired after the administrator has added a new diff --git a/web/WEB-INF/templates/admin/mobile/admin_form_mobile_data.tpl b/web/WEB-INF/templates/admin/mobile/admin_form_mobile_data.tpl new file mode 100644 index 00000000..742cc4a2 --- /dev/null +++ b/web/WEB-INF/templates/admin/mobile/admin_form_mobile_data.tpl @@ -0,0 +1,67 @@ + + + + + +

+
+ + + + +
+
+ +
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+ + + + + +
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+ + + +
+ +
+ +
+ +
+
+
+
+ diff --git a/web/WEB-INF/templates/generic/mobile_selection_box.tpl b/web/WEB-INF/templates/generic/mobile_selection_box.tpl index fd7e654a..65aef5bb 100644 --- a/web/WEB-INF/templates/generic/mobile_selection_box.tpl +++ b/web/WEB-INF/templates/generic/mobile_selection_box.tpl @@ -9,7 +9,7 @@ - + -- 2.39.5