import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException;
/**
- * An administrative country bean
+ * Administrative country bean
* <p>
* @author Roland Haeder<roland@mxchange.org>
*/
}
@Override
- public void addCountry () {
+ public String addCountry () {
// Create new country object
Country country = new CountryData();
// Fire event
this.addedCountryEvent.fire(new AdminEventCountryAdded(updatedCountry));
- // Clear bean
+ // Clear this bean
this.clear();
+
+ // Redirect to list
+ return "admin_list_country"; //NOI18N
}
@Override
* 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);
}