*/
package org.mxchange.pizzaapplication.beans.checkout;
-import java.text.MessageFormat;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
-import org.mxchange.jcoreee.beans.BaseFrameworkBean;
import org.mxchange.jshopcore.model.basket.AddableBasketItem;
import org.mxchange.jshopcore.model.customer.Customer;
import org.mxchange.jshopcore.wrapper.CheckoutWrapper;
*/
@Named ("checkoutController")
@SessionScoped
-public class CheckoutWebBean extends BaseFrameworkBean implements CheckoutWebController {
+public class CheckoutWebBean implements CheckoutWebController {
/**
* Serial number
@Override
public String doCheckout () {
// Trace message
- this.getLogger().logTrace("doCheckout: CALLED!");
+ //this.getLogger().logTrace("doCheckout: CALLED!");
// Are the beans set?
if (null == this.basketController) {
// Are at least the required fields set?
if (!this.customerController.isRequiredPersonalDataSet()) {
// Trace message
- this.getLogger().logTrace("doCheckout: Not all required fields are set, returning checkout2 ... - EXIT!");
+ //this.getLogger().logTrace("doCheckout: Not all required fields are set, returning checkout2 ... - EXIT!");
// Not set, should not happen
return "checkout2"; //NOI18N
} else if (this.basketController.isEmpty()) {
// Trace message
- this.getLogger().logTrace("doCheckout: basket is empty, returning empty_basket ... - EXIT!");
+ //this.getLogger().logTrace("doCheckout: basket is empty, returning empty_basket ... - EXIT!");
// Nothing to order
return "empty_basket"; //NOI18N
this.setCustomer(this.customerController.createCustomerInstance());
// Debug message
- this.getLogger().logDebug(MessageFormat.format("doCheckout: customer={0}", this.getCustomer()));
+ //this.getLogger().logDebug(MessageFormat.format("doCheckout: customer={0}", this.getCustomer()));
// Get ordered list
List<AddableBasketItem> list = this.basketController.allItems();
// Debug message
- this.getLogger().logTrace(MessageFormat.format("doCheckout: list={0}", list));
+ //this.getLogger().logTrace(MessageFormat.format("doCheckout: list={0}", list));
// Construct container
WrapableCheckout wrapper = new CheckoutWrapper();
@PostConstruct
public void init () {
- // Call super init for getting resource bundle
- super.genericInit();
-
try {
// Get initial context
Context context = new InitialContext();