public void init () {
}
+ /**
+ * Clears this bean
+ */
+ private void clear () {
+ // Clear all data
+ // - personal data
+ this.setGender(Gender.UNKNOWN);
+ this.setFirstName(null);
+ this.setFamilyName(null);
+ this.setStreet(null);
+ this.setHouseNumber(null);
+ this.setZipCode(null);
+ this.setCity(null);
+ this.setCountry(null);
+
+ // - contact data
+ this.setEmailAddress(null);
+ this.setPhoneCountry(null);
+ this.setPhoneAreaCode(null);
+ this.setPhoneNumber(null);
+ this.setCellphoneCarrier(null);
+ this.setCellphoneNumber(null);
+ this.setFaxCountry(null);
+ this.setFaxAreaCode(null);
+ this.setFaxNumber(null);
+
+ // - other data
+ this.setBirthday(null);
+ this.setComment(null);
+ }
+
/**
* Updates all data in contact instance.
* <p>
// Debug message
//* NOISY-DEBUG: */ System.out.println(MessageFormat.format("ContactWebBean:afterRegistration: registeredContact={0}", registeredContact)); //NOI18N
-
// Copy all data from registered->user
this.copyContact(registeredContact);
return this.contactList;
}
- /**
- * Clears this bean
- */
- @Override
- public void clear () {
- // Clear all data
- // - personal data
- this.setGender(Gender.UNKNOWN);
- this.setFirstName(null);
- this.setFamilyName(null);
- this.setStreet(null);
- this.setHouseNumber(null);
- this.setZipCode(null);
- this.setCity(null);
- this.setCountry(null);
-
- // - contact data
- this.setEmailAddress(null);
- this.setEmailAddressRepeat(null);
- this.setPhoneAreaCode(null);
- this.setCellphoneCarrier(null);
- this.setFaxAreaCode(null);
-
- // - other data
- this.setBirthday(null);
- this.setComment(null);
- }
-
@Override
public Contact createContactInstance () {
// Required personal data must be set
this.emailAddressList.add(contact.getContactEmailAddress());
}
+ /**
+ * Clears this bean
+ */
+ private void clear () {
+ // Clear all data
+ // - personal data
+ this.setGender(Gender.UNKNOWN);
+ this.setFirstName(null);
+ this.setFamilyName(null);
+ this.setStreet(null);
+ this.setHouseNumber(null);
+ this.setZipCode(null);
+ this.setCity(null);
+ this.setCountry(null);
+
+ // - contact data
+ this.setEmailAddress(null);
+ this.setEmailAddressRepeat(null);
+ this.setPhoneCountry(null);
+ this.setPhoneAreaCode(null);
+ this.setPhoneNumber(null);
+ this.setCellphoneCarrier(null);
+ this.setCellphoneNumber(null);
+ this.setFaxCountry(null);
+ this.setFaxAreaCode(null);
+ this.setFaxNumber(null);
+
+ // - other data
+ this.setBirthday(null);
+ this.setComment(null);
+ }
+
/**
* Copies given contact into the controller
* <p>
*/
Contact lookupContactById (final Long contactId) throws ContactNotFoundException;
- /**
- * Clears this controller
- */
- void clear ();
-
/**
* Event observer for new user registrations
* <p>
// Fire event
this.addedCountryEvent.fire(new AdminEventCountryAdded(updatedCountry));
+ // Clear this bean
+ this.clear();
+
// Redirect to list
return "admin_list_country"; //NOI18N
}
return (!this.allCountries().isEmpty());
}
+ /**
+ * Clears this bean
+ */
+ private void clear () {
+ // Clear all fields
+ this.setCountryAbroadDialPrefix(null);
+ this.setCountryCode(null);
+ this.setCountryExternalDialPrefix(null);
+ this.setCountryI18nKey(null);
+ this.setCountryIsLocalPrefixRequired(Boolean.FALSE);
+ this.setCountryPhoneCode(null);
+ }
+
/**
* Checks if given country is already added by iterating over the whole list
* and try to find it.
*/
package org.mxchange.pizzaapplication.beans.login;
+import de.chotime.jratecalc.beans.user.RateCalcUserWebSessionController;
import java.util.Objects;
import javax.enterprise.context.SessionScoped;
import javax.enterprise.event.Event;
@Override
public boolean isUserLoggedIn () {
- // Trace message
- // NOISY: System.out.println(MessageFormat.format("PizzaUserLoginWebSessionBean:isUserLoggedIn: this.loggedInUser={0},this.templateType={1} - CALLED!", this.getLoggedInUser(), this.getTemplateType()));
-
// Compare instance
this.userLoggedIn = ((this.getLoggedInUser() instanceof User) && (Objects.equals(this.getLoggedInUser().getUserAccountStatus(), UserAccountStatus.CONFIRMED)));
- // Trace message
- // NOISY: System.out.println(MessageFormat.format("PizzaUserLoginWebSessionBean:isUserLoggedIn: this.userLoggedIn={0} - EXIT!", this.userLoggedIn));
-
// Return it
return this.userLoggedIn;
}
+
}
* Clears this bean
*/
private void clear () {
- // Set all vaues to null
+ // Clear all fields
this.setProviderCountry(null);
this.setProviderDialPrefix(null);
this.setProviderMailPattern(null);
this.landLine = landLine;
}
+ /**
+ * Clears this bean
+ */
+ private void clear () {
+ // Clear all fields
+ this.setCellPhone(null);
+ this.setContact(null);
+ this.setFax(null);
+ this.setLandLine(null);
+ }
+
}
// Fire event
this.addedUserEvent.fire(new AdminUserAddedEvent(updatedUser));
+ // Clear this bean
+ this.clear();
+
// Return to user list (for now)
return "admin_list_user"; //NOI18N
}
public void init () {
}
+ /**
+ * Clears this bean
+ */
+ private void clear () {
+ // Clear all fields
+ this.setUserName(null);
+ this.setUserPassword(null);
+ this.setUserPasswordRepeat(null);
+ }
+
/**
* Checks if same password is entered and that they are not empty.
* <p>