From: Roland Häder Date: Wed, 11 May 2016 14:07:42 +0000 (+0200) Subject: Fixed country controller: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=606d133096c282c026b605d0422f09dc2e7dc116;p=jjobs-war.git Fixed country controller: - renamed controller name to not have confusion to - moved hasCountries/allCountries to session-scoped bean to have full caching Signed-off-by: Roland Häder Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/jjobs/beans/country/JobsCountryWebApplicationBean.java b/src/java/org/mxchange/jjobs/beans/country/JobsCountryWebApplicationBean.java index d52d2685..51c68b09 100644 --- a/src/java/org/mxchange/jjobs/beans/country/JobsCountryWebApplicationBean.java +++ b/src/java/org/mxchange/jjobs/beans/country/JobsCountryWebApplicationBean.java @@ -99,6 +99,11 @@ public class JobsCountryWebApplicationBean implements JobsCountryWebApplicationC return Collections.unmodifiableList(this.countryList); } + @Override + public boolean hasCountries () { + return (!this.countryList.isEmpty()); + } + /** * Post-initialization of this class */ diff --git a/src/java/org/mxchange/jjobs/beans/country/JobsCountryWebApplicationController.java b/src/java/org/mxchange/jjobs/beans/country/JobsCountryWebApplicationController.java index 226fcc45..1f661321 100644 --- a/src/java/org/mxchange/jjobs/beans/country/JobsCountryWebApplicationController.java +++ b/src/java/org/mxchange/jjobs/beans/country/JobsCountryWebApplicationController.java @@ -35,6 +35,13 @@ public interface JobsCountryWebApplicationController extends Serializable { */ List allCountries (); + /** + * Checks whether countries has been registered + *

+ * @return Whether countries has been registered + */ + boolean hasCountries (); + /** * Observing method when the event is fired that an administrator added a * new country diff --git a/web/admin/country/admin_country_list.xhtml b/web/admin/country/admin_country_list.xhtml index 63cda07c..2d172240 100644 --- a/web/admin/country/admin_country_list.xhtml +++ b/web/admin/country/admin_country_list.xhtml @@ -16,7 +16,7 @@ - + #{msg.ADMIN_LIST_COUNTRY_DATA_COUNTRY_ID}