import java.text.MessageFormat;
import java.util.Date;
import java.util.Iterator;
-import java.util.List;
import javax.annotation.PostConstruct;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Event;
import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
+import org.mxchange.pizzaapplication.beans.BasePizzaController;
import org.mxchange.pizzaapplication.beans.helper.PizzaAdminWebRequestController;
/**
*/
@Named ("adminContactController")
@RequestScoped
-public class PizzaAdminContactWebRequestBean implements PizzaAdminContactWebRequestController {
+public class PizzaAdminContactWebRequestBean extends BasePizzaController implements PizzaAdminContactWebRequestController {
/**
* Serial number
* Default constructor
*/
public PizzaAdminContactWebRequestBean () {
- // Set gender to UNKNOWN
- this.gender = Gender.UNKNOWN;
-
// Try it
try {
// Get initial context
Context context = new InitialContext();
// Try to lookup
- this.contactBean = (ContactSessionBeanRemote) context.lookup("java:global/PizzaService-ejb/contact!org.mxchange.jcontacts.contact.ContactSessionBeanRemote"); //NOI18N
+ this.contactBean = (ContactSessionBeanRemote) context.lookup("java:global/pizzaservice-ejb/contact!org.mxchange.jcontacts.contact.ContactSessionBeanRemote"); //NOI18N
} catch (final NamingException e) {
// Throw again
throw new FaceletException(e);
return "admin_list_contact"; //NOI18N
}
- @Override
- public List<Contact> allContacts () {
- return this.contactController.allContacts();
- }
-
@Override
public void copyContactToController (final Contact contact) {
// Log message
this.zipCode = zipCode;
}
- @Override
- public boolean hasContacts () {
- return (!this.allContacts().isEmpty());
- }
-
/**
* Post-initialization of this class
*/
boolean IsFound = false;
// Get iterator
- Iterator<Contact> iterator = this.allContacts().iterator();
+ Iterator<Contact> iterator = this.contactController.allContacts().iterator();
// Loop through all
while (iterator.hasNext()) {