]> git.mxchange.org Git - pizzaservice-war.git/blobdiff - src/java/org/mxchange/pizzaapplication/beans/country/PizzaAdminCountryWebRequestBean.java
Rewrites:
[pizzaservice-war.git] / src / java / org / mxchange / pizzaapplication / beans / country / PizzaAdminCountryWebRequestBean.java
index 1fef7df6189bbb7246401234d1efc2eeb7cd3da8..10ce8b88f66f944104605578bc4da908b3fe9197 100644 (file)
@@ -36,7 +36,7 @@ import org.mxchange.jcountry.events.AdminEventCountryAdded;
 import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException;
 
 /**
- * An administrative country bean
+ * Administrative country bean
  * <p>
  * @author Roland Haeder<roland@mxchange.org>
  */
@@ -115,7 +115,7 @@ public class PizzaAdminCountryWebRequestBean implements PizzaAdminCountryWebRequ
        }
 
        @Override
-       public void addCountry () {
+       public String addCountry () {
                // Create new country object
                Country country = new CountryData();
 
@@ -147,8 +147,11 @@ public class PizzaAdminCountryWebRequestBean implements PizzaAdminCountryWebRequ
                // Fire event
                this.addedCountryEvent.fire(new AdminEventCountryAdded(updatedCountry));
 
-               // Clear bean
+               // Clear this bean
                this.clear();
+
+               // Redirect to list
+               return "admin_list_country"; //NOI18N
        }
 
        @Override
@@ -226,12 +229,12 @@ public class PizzaAdminCountryWebRequestBean implements PizzaAdminCountryWebRequ
         * Clears this bean
         */
        private void clear () {
-               // Clear all
+               // Clear all fields
                this.setCountryAbroadDialPrefix(null);
                this.setCountryCode(null);
                this.setCountryExternalDialPrefix(null);
                this.setCountryI18nKey(null);
-               this.setCountryIsLocalPrefixRequired(null);
+               this.setCountryIsLocalPrefixRequired(Boolean.FALSE);
                this.setCountryPhoneCode(null);
        }