import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
-import javax.faces.view.facelets.FaceletException;
+import javax.faces.FacesException;
import javax.inject.Inject;
import javax.inject.Named;
import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
// Is the receipt already there?
if (this.receiptListController.isReceiptAdded(receipt)) {
// Receipt has already been added
- throw new FaceletException(MessageFormat.format("Receipt for receiptBranchOffice={0},receiptIssued={1},receiptNumber={2} has already been added.", this.getReceiptBranchOffice().getBranchId(), this.getReceiptIssued().toString(), this.getReceiptNumber())); //NOI18N
+ throw new FacesException(MessageFormat.format("Receipt for receiptBranchOffice={0},receiptIssued={1},receiptNumber={2} has already been added.", this.getReceiptBranchOffice().getBranchId(), this.getReceiptIssued().toString(), this.getReceiptNumber())); //NOI18N
}
// Init variable
updatedReceipt = this.receiptBean.addReceipt(receipt);
} catch (final ReceiptAlreadyAddedException ex) {
// Throw it again
- throw new FaceletException(ex);
+ throw new FacesException(ex);
}
// Fire event with updated instance
import javax.ejb.EJB;
import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
+import javax.faces.FacesException;
import javax.faces.application.FacesMessage;
import javax.faces.view.ViewScoped;
-import javax.faces.view.facelets.FaceletException;
import javax.inject.Inject;
import javax.inject.Named;
import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
// Is the receipt already there?
if (this.receiptListController.isReceiptAdded(receipt)) {
// Receipt has already been added
- throw new FaceletException(MessageFormat.format(
+ throw new FacesException(MessageFormat.format(
"Receipt for receiptBranchOffice={0},receiptIssued={1},receiptNumber={2} has already been added.", //NOI18N
this.getReceiptBranchOffice().getBranchId(),
this.getReceiptIssued().toString(),
updatedReceipt = this.adminReceiptBean.addReceipt(receipt);
} catch (final ReceiptAlreadyAddedException ex) {
// Throw it again
- throw new FaceletException(ex);
+ throw new FacesException(ex);
}
// Fire event with updated instance
updatedReceipt = this.adminReceiptBean.updateReceipt(this.getCurrentReceipt());
} catch (final ReceiptNotFoundException ex) {
// Throw as cause
- throw new FaceletException(ex);
+ throw new FacesException(ex);
}
// Fire event
import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
-import javax.faces.view.facelets.FaceletException;
+import javax.faces.FacesException;
import javax.inject.Inject;
import javax.inject.Named;
import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
// Is the receipt already there?
if (this.receiptItemListController.isReceiptItemAdded(receiptItem)) {
// Receipt has already been added
- throw new FaceletException(MessageFormat.format("Receipt for itemReceipt.receiptId={0},itemProduct.productId={1},itemProductQuantity={2} has already been added.", receiptItem.getItemReceipt().getReceiptId(), receiptItem.getItemProduct().getProductId(), receiptItem.getItemProductQuantity())); //NOI18N
+ throw new FacesException(MessageFormat.format("Receipt for itemReceipt.receiptId={0},itemProduct.productId={1},itemProductQuantity={2} has already been added.", receiptItem.getItemReceipt().getReceiptId(), receiptItem.getItemProduct().getProductId(), receiptItem.getItemProductQuantity())); //NOI18N
}
// Init variable
updatedReceiptItem = this.adminReceiptItemBean.addReceiptItem(receiptItem);
} catch (final ReceiptItemAlreadyAddedException ex) {
// Throw it again
- throw new FaceletException(ex);
+ throw new FacesException(ex);
}
// Fire event with updated instance
import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
-import javax.faces.view.facelets.FaceletException;
+import javax.faces.FacesException;
import javax.inject.Inject;
import javax.inject.Named;
import org.mxchange.jfinancials.beans.BaseFinancialsBean;
// Is the receipt already there?
if (this.receiptItemListController.isReceiptItemAdded(receiptItem)) {
// Receipt has already been added
- throw new FaceletException(MessageFormat.format("Receipt for itemReceipt.receiptId={0},itemProduct.productId={1},itemProductQuantity={2} has already been added.", receiptItem.getItemReceipt().getReceiptId(), receiptItem.getItemProduct().getProductId(), receiptItem.getItemProductQuantity())); //NOI18N
+ throw new FacesException(MessageFormat.format("Receipt for itemReceipt.receiptId={0},itemProduct.productId={1},itemProductQuantity={2} has already been added.", receiptItem.getItemReceipt().getReceiptId(), receiptItem.getItemProduct().getProductId(), receiptItem.getItemProductQuantity())); //NOI18N
}
// Init variable
updatedReceiptItem = this.receiptItemBean.addReceiptItem(receiptItem);
} catch (final ReceiptItemAlreadyAddedException ex) {
// Throw it again
- throw new FaceletException(ex);
+ throw new FacesException(ex);
}
// Fire event with updated instance
<ui:composition
template="/WEB-INF/templates/admin/admin_base.tpl"
xmlns="http://www.w3.org/1999/xhtml"
- xmlns:core="http://mxchange.org/jsf/core/widgets"
- xmlns:pl="http://mxchange.org/jsf/jfinancials/links"
- xmlns:links="http://mxchange.org/jsf/core/links"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"