return isRequired;
}
+ @Override
+ public boolean isRequiredPersonalDataSet () {
+ return ((this.getPersonalTitle() != null) &&
+ (this.getFirstName() != null) &&
+ (this.getFamilyName() != null) &&
+ (this.getStreet() != null) &&
+ (this.getHouseNumber() != null) &&
+ (this.getZipCode() != null) &&
+ (this.getCity() != null) &&
+ (this.getEmailAddress() != null));
+ }
+
@Override
public void validateContactData () {
if (this.getPersonalTitle() == null) {
/**
* Checks whether the given contact is found
* <p>
- * @param contact Contact inastance
- *
- * @return Wether contact has been found
+ * @param contact Contact instance
+ * <p>
+ * @return Whether contact has been found
*/
private boolean isSameContactFound (final Contact contact) {
// Default is not found
@Deprecated
boolean isPersonalTitleRequired ();
+ /**
+ * Checks whether all required personal data is set
+ * <p>
+ * @return Whether the required personal data is set
+ */
+ boolean isRequiredPersonalDataSet ();
+
}
import javax.annotation.PostConstruct;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Event;
+import javax.enterprise.event.Observes;
import javax.enterprise.inject.Any;
import javax.faces.view.facelets.FaceletException;
import javax.inject.Inject;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jcontacts.contact.title.PersonalTitle;
import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException;
import org.mxchange.jcustomercore.events.customer.added.AdminAddedCustomerEvent;
import org.mxchange.jcustomercore.events.customer.added.ObservableAdminAddedCustomerEvent;
+import org.mxchange.jcustomercore.events.customer.created.ObservableCreatedCustomerEvent;
import org.mxchange.jcustomercore.exceptions.CustomerAlreadyRegisteredException;
import org.mxchange.jcustomercore.model.customer.Customer;
import org.mxchange.jcustomercore.model.customer.status.CustomerAccountStatus;
@Inject
private PizzaWebRequestHelperController beanHelper;
+ /**
+ * Contact instance
+ */
+ private Contact contact;
+
/**
* An event being fired when an administrator has added a new customer
*/
* Default constructor
*/
public PizzaAdminCustomerWebRequestBean () {
- // Try it
- try {
- // Get initial context
- Context context = new InitialContext();
-
- // Try to lookup
- this.adminCustomerBean = (PizzaAdminCustomerSessionBeanRemote) context.lookup("java:global/pizzaservice-ejb/admincustomer!org.mxchange.pizzaapplication.model.customer.PizzaAdminCustomerSessionBeanRemote"); //NOI18N
- } catch (final NamingException e) {
- // Throw again
- throw new FaceletException(e);
- }
}
- @Override
+ /**
+ * Adds customer to database if not already added. This method should return
+ * a redirect outcome on success.
+ * <p>
+ * @return Redirect outcome
+ */
public String addCustomer () {
// Are at least some fields added?
- if ((this.beanHelper.getContact() == null) && (!this.isCustomerDataSet())) {
+ if ((this.getContact() == null) && (!this.isCustomerDataSet())) {
// Not all customer data is set
throw new FaceletException("Please provide minimum personal data: gender, first_name, family_name"); //NOI18N
}
// Init contact
- Contact contact;
+ Contact customerContact;
// Is the contact set in helper?
- if (this.beanHelper.getContact() instanceof Contact) {
+ if (this.getContact() instanceof Contact) {
// Get from helper
- contact = this.beanHelper.getContact();
+ customerContact = this.getContact();
} else {
// Get new contact instance
- contact = this.adminContactController.createContactInstance();
+ customerContact = this.adminContactController.createContactInstance();
}
// Ask the EJB for a free customer number
String customerNumber = this.adminCustomerBean.createCustomerNumber();
// Create new customer instance
- Customer customer = new PizzaCustomer(CustomerAccountStatus.CONFIRMED, contact, customerNumber);
+ Customer customer = new PizzaCustomer(CustomerAccountStatus.CONFIRMED, customerContact, customerNumber);
// Init instance
Customer updatedCustomer;
try {
// Add/link customer and return updated
- if (this.beanHelper.getContact() instanceof Contact) {
+ if (this.getContact() instanceof Contact) {
// Link customer
updatedCustomer = this.adminCustomerBean.linkCustomer(customer);
// Remove contact instance
- this.beanHelper.setContact(null);
+ this.setContact(null);
} else {
// Add new customer instance
updatedCustomer = this.adminCustomerBean.addCustomer(customer);
return "admin_list_customer"; //NOI18N
}
- @Override
- public void copyCustomerToController (final Customer customer) {
- // Parameters must be valid
- if (null == customer) {
+ /**
+ * Observes an even when a customer has been created
+ * <p>
+ * @param event Event being fired
+ */
+ public void afterCustomerCreatedEvent (final @Observes ObservableCreatedCustomerEvent event) {
+ // The event instance must be valid
+ if (null == event) {
+ // Throw NPE again
+ throw new NullPointerException("event is null"); //NOI18N
+ } else if (event.getCreatedCustomer() == null) {
// Throw NPE
- throw new NullPointerException("customer is null"); //NOI18N
- } else if (customer.getCustomerId() == null) {
+ throw new NullPointerException("event.createdCustomer is null"); //NOI18N
+ } else if (event.getCreatedCustomer().getCustomerId() == null) {
// Throw again ...
- throw new NullPointerException("customer.customerId is null"); //NOI18N
- } else if (customer.getCustomerId() < 1) {
+ throw new NullPointerException("event.createdCustomer.customerId is null"); //NOI18N
+ } else if (event.getCreatedCustomer().getCustomerId() < 1) {
// Invalid id number
- throw new IllegalArgumentException(MessageFormat.format("customer.customerId={0} is not valid", customer.getCustomerId())); //NOI18N
- } else if (customer.getCustomerContact() == null) {
+ throw new IllegalArgumentException(MessageFormat.format("event.createdCustomer.customerId={0} is not valid", event.getCreatedCustomer().getCustomerId())); //NOI18N
+ } else if (event.getCreatedCustomer().getCustomerContact() == null) {
// Throw NPE again
- throw new NullPointerException("customer.customerContact is null"); //NOI18N
- } else if (customer.getCustomerContact().getContactId() == null) {
+ throw new NullPointerException("event.createdCustomer.customerContact is null"); //NOI18N
+ } else if (event.getCreatedCustomer().getCustomerContact().getContactId() == null) {
// .. and again
- throw new NullPointerException("customer.customerContact.contactId is null"); //NOI18N
- } else if (customer.getCustomerContact().getContactId() < 1) {
+ throw new NullPointerException("event.createdCustomer.customerContact.contactId is null"); //NOI18N
+ } else if (event.getCreatedCustomer().getCustomerContact().getContactId() < 1) {
// Invalid id
- throw new IllegalArgumentException(MessageFormat.format("customer.customerContact.contactId={0} is not valid", customer.getCustomerContact().getContactId())); //NOI18N
+ throw new IllegalArgumentException(MessageFormat.format("event.createdCustomer.customerContact.contactId={0} is not valid", event.getCreatedCustomer().getCustomerContact().getContactId())); //NOI18N
}
// @TODO Set all data
}
+ /**
+ * Getter for contact instance
+ * <p>
+ * @return Contact instance
+ */
+ public Contact getContact () {
+ return this.contact;
+ }
+
+ /**
+ * Setter for contact instance
+ * <p>
+ * @param contact Contact instance
+ */
+ public void setContact (final Contact contact) {
+ this.contact = contact;
+ }
+
/**
* Post-initialization of this class
*/
@PostConstruct
public void init () {
+ // Try it
+ try {
+ // Get initial context
+ Context context = new InitialContext();
+
+ // Try to lookup
+ this.adminCustomerBean = (PizzaAdminCustomerSessionBeanRemote) context.lookup("java:global/pizzaservice-ejb/admincustomer!org.mxchange.pizzaapplication.model.customer.PizzaAdminCustomerSessionBeanRemote"); //NOI18N
+ } catch (final NamingException e) {
+ // Throw again
+ throw new FaceletException(e);
+ }
}
/**
*/
private boolean isCustomerDataSet () {
// Check all
- return ((this.adminContactController.getPersonalTitle() instanceof PersonalTitle) &&
- (this.adminContactController.getFirstName() != null) &&
- (!this.adminContactController.getFirstName().isEmpty()) &&
- (this.adminContactController.getFamilyName() != null) &&
- (!this.adminContactController.getFamilyName().isEmpty()));
+ return this.adminContactController.isRequiredPersonalDataSet();
}
}
package org.mxchange.pizzaapplication.beans.customer;
import java.io.Serializable;
-import javax.ejb.Local;
-import org.mxchange.jcustomercore.model.customer.Customer;
/**
* An interface for user beans
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
-@Local
public interface PizzaAdminCustomerWebRequestController extends Serializable {
- /**
- * Copies given customer to this controller
- * <p>
- * @param customer Customer instance to copy
- */
- void copyCustomerToController (final Customer customer);
-
- /**
- * Adds customer to database if not already added. This method should return
- * a redirect outcome on success.
- * <p>
- * @return Redirect outcome
- */
- String addCustomer ();
-
}
<param-value>true</param-value>
</context-param>
<context-param>
- <description>Wether the personal title is required for using the general contact controller.</description>
+ <description>Whether the personal title is required for using the general contact controller.</description>
<param-name>is_feature_general_personal_title_enabled</param-name>
<param-value>true</param-value>
</context-param>
</div>
<div class="table_right_medium">
- <h:selectOneMenu class="select" id="customerContact" value="#{beanHelper.contact}" converter="ContactConverter">
+ <h:selectOneMenu class="select" id="customerContact" value="#{adminCustomerController.contact}" converter="ContactConverter">
<f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems value="#{customerController.selectableContacts()}" var="contact" itemValue="#{contact}" itemLabel="#{contact.contactId}: #{msg[contact.contactGender.messageKey]} #{contact.contactFirstName} #{contact.contactFamilyName}" />
</h:selectOneMenu>
<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
- lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
- xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:f="http://xmlns.jcp.org/jsf/core"
- >
+<ui:composition template="/WEB-INF/templates/guest/guest_base.tpl"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+ xmlns:h="http://xmlns.jcp.org/jsf/html"
+ xmlns:f="http://xmlns.jcp.org/jsf/core">
+ <ui:define name="guest_title">
+ <h:outputText value="#{msg.PAGE_TITLE_INDEX_SHOW_BASKET}" />
+ </ui:define>
- <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
- <ui:define name="guest_title">
- <h:outputText value="#{msg.PAGE_TITLE_INDEX_SHOW_BASKET}" />
- </ui:define>
+ <ui:define name="content_header">
+ <h:outputText value="#{msg.CONTENT_TITLE_INDEX_SHOW_BASKET}" />
+ </ui:define>
- <ui:define name="content_header">
- <h:outputText value="#{msg.CONTENT_TITLE_INDEX_SHOW_BASKET}" />
- </ui:define>
+ <ui:define name="content">
+ <h:dataTable id="table_show_basket" var="item" value="#{basketController.allItems()}" styleClass="table" summary="#{msg.TABLE_SUMMARY_SHOW_BASKET}" rendered="#{basketController.hasItems()}">
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.GUEST_ITEM_TITLE}" />
+ </f:facet>
- <ui:define name="content">
- <h:dataTable id="table_show_basket" var="item" value="#{basketController.allItems()}" styleClass="table" summary="#{msg.TABLE_SUMMARY_SHOW_BASKET}" rendered="#{basketController.hasItems()}">
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{msg.GUEST_ITEM_TITLE}" />
- </f:facet>
+ <ui:fragment rendered="#{item.isProductType()}">
+ <h:outputText value="#{item.itemProduct.productTitle}" />
+ </ui:fragment>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.SINGLE_PRODUCT_PRICE}" />
+ </f:facet>
+
+ <div class="item_price">
<ui:fragment rendered="#{item.isProductType()}">
- <h:outputText value="#{item.itemProduct.productTitle}" />
+ <h:outputText styleClass="price" value="#{item.itemProduct.productPrice}">
+ <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
+ </h:outputText>
</ui:fragment>
- </h:column>
-
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{msg.SINGLE_PRODUCT_PRICE}" />
- </f:facet>
+ </div>
+ </h:column>
- <div class="item_price">
- <ui:fragment rendered="#{item.isProductType()}">
- <h:outputText styleClass="price" value="#{item.itemProduct.productPrice}">
- <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
- </h:outputText>
- </ui:fragment>
- </div>
- </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.CHANGE_ITEM_AMOUNT}" />
+ </f:facet>
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{msg.CHANGE_ITEM_AMOUNT}" />
- </f:facet>
+ <h:form id="form_add_item">
+ <h:commandButton class="submit" id="add" value="#{msg.BUTTON_CHANGE_ITEM_AMOUNT}" action="#{basketController.doChangeItem(item)}" title="#{msg.BUTTON_TITLE_CHANGE_ITEM_AMOUNT}" />
- <h:form id="form_add_item">
- <h:commandButton class="submit" id="add" value="#{msg.BUTTON_CHANGE_ITEM_AMOUNT}" action="#{basketController.doChangeItem(item)}" title="#{msg.BUTTON_TITLE_CHANGE_ITEM_AMOUNT}" />
+ <h:inputText class="input" id="amount" size="3" maxlength="20" value="#{item.orderedAmount}" title="#{msg.INPUT_TITLE_ENTER_ITEM_AMOUNT}">
+ <!--
+ If the customer wants to order more, he need to call in.
+ //-->
+ <f:validator for="amount" validatorId="ItemAmountValidator" />
+ </h:inputText>
+ </h:form>
+ </h:column>
- <h:inputText class="input" id="amount" size="3" maxlength="20" value="#{item.orderedAmount}" title="#{msg.INPUT_TITLE_ENTER_ITEM_AMOUNT}">
- <!--
- If the customer wants to order more, he need to call in.
- //-->
- <f:validator for="amount" validatorId="ItemAmountValidator" />
- </h:inputText>
- </h:form>
- </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.TOTAL_ITEM_PRICE}" />
+ </f:facet>
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{msg.TOTAL_ITEM_PRICE}" />
- </f:facet>
-
- <div class="item_total_price">
- <h:outputText styleClass="price" id="item_price" value="#{basketController.calculateItemPrice(item)}" rendered="#{item.isProductType()}">
- <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
- </h:outputText>
- </div>
- </h:column>
- </h:dataTable>
+ <div class="item_total_price">
+ <h:outputText styleClass="price" id="item_price" value="#{basketController.calculateItemPrice(item)}" rendered="#{item.isProductType()}">
+ <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
+ </h:outputText>
+ </div>
+ </h:column>
+ </h:dataTable>
- <ui:include src="/WEB-INF/templates/basket/total_sum.tpl" />
+ <ui:include src="/WEB-INF/templates/basket/total_sum.tpl" />
- <div class="continue_checkout">
- <h:link class="checkout_link" id="checkout" value="#{msg.LINK_CONTINUE_TO_CHECKOUT}" outcome="checkout" />
- </div>
- </ui:define>
- </ui:composition>
-</html>
+ <div class="continue_checkout">
+ <h:link class="checkout_link" id="checkout" value="#{msg.LINK_CONTINUE_TO_CHECKOUT}" outcome="checkout" />
+ </div>
+ </ui:define>
+</ui:composition>
<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
- lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
- xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:f="http://xmlns.jcp.org/jsf/core"
- >
+<ui:composition template="/WEB-INF/templates/guest/guest_base.tpl"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+ xmlns:h="http://xmlns.jcp.org/jsf/html"
+ xmlns:f="http://xmlns.jcp.org/jsf/core">
+ <ui:define name="guest_title">
+ <h:outputText value="#{msg.PAGE_TITLE_USER_CHECKOUT}" />
+ </ui:define>
- <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
- <ui:define name="guest_title">
- <h:outputText value="#{msg.PAGE_TITLE_USER_CHECKOUT}" />
- </ui:define>
+ <ui:define name="content_header">
+ <h:outputText value="#{msg.CONTENT_TITLE_USER_CHECKOUT}" />
+ </ui:define>
- <ui:define name="content_header">
- <h:outputText value="#{msg.CONTENT_TITLE_USER_CHECKOUT}" />
- </ui:define>
+ <ui:define name="content">
+ <div class="basket_content">
+ <ui:include src="/WEB-INF/templates/basket/full_basket.tpl" />
- <ui:define name="content">
- <div class="basket_content">
- <ui:include src="/WEB-INF/templates/basket/full_basket.tpl" />
+ <ui:include src="/WEB-INF/templates/basket/total_sum.tpl" />
+ </div>
- <ui:include src="/WEB-INF/templates/basket/total_sum.tpl" />
+ <div class="checkout_outer">
+ <div class="checkout_title">
+ <h:outputText value="#{msg.CONTENT_TITLE_USER_CHECKOUT}" />
</div>
- <div class="checkout_outer">
- <div class="checkout_title">
- <h:outputText value="#{msg.CONTENT_TITLE_USER_CHECKOUT}" />
- </div>
+ <div class="checkout_options">
+ <ul>
+ <li>
+ <div class="checkout_option_title">
+ <h:outputText value="#{msg.CUSTOMER_CHECKOUT_OPTION1_TITLE}" />
+ </div>
- <div class="checkout_options">
- <ul>
- <li>
- <div class="checkout_option_title">
- <h:outputText value="#{msg.CUSTOMER_CHECKOUT_OPTION1_TITLE}" />
- </div>
+ <div class="checkout_option_content">
+ <h:link class="checkout_option_link" id="checkout_option_login" outcome="user_login" value="#{msg.LINK_CHECKOUT_OPTION_LOGIN}">
+ <f:param name="redirect" value="login_checkout" />
+ </h:link>
+ </div>
+ </li>
- <div class="checkout_option_content">
- <h:link class="checkout_option_link" id="checkout_option_login" outcome="user_login" value="#{msg.LINK_CHECKOUT_OPTION_LOGIN}">
- <f:param name="redirect" value="login_checkout" />
- </h:link>
- </div>
- </li>
+ <li>
+ <div class="checkout_option_title">
+ <h:outputText value="#{msg.CUSTOMER_CHECKOUT_OPTION2_TITLE}" />
+ </div>
- <li>
- <div class="checkout_option_title">
- <h:outputText value="#{msg.CUSTOMER_CHECKOUT_OPTION2_TITLE}" />
- </div>
+ <div class="checkout_option_content">
+ <h:link class="checkout_option_link" id="checkout_option_register" outcome="user_register" value="#{msg.LINK_CHECKOUT_OPTION_REGISTRATION}">
+ <f:param name="redirect" value="login_checkout" />
+ </h:link>
+ </div>
+ </li>
- <div class="checkout_option_content">
- <h:link class="checkout_option_link" id="checkout_option_register" outcome="user_register" value="#{msg.LINK_CHECKOUT_OPTION_REGISTRATION}">
- <f:param name="redirect" value="login_checkout" />
- </h:link>
- </div>
- </li>
+ <li>
+ <div class="checkout_option_title">
+ <h:outputText value="#{msg.CUSTOMER_CHECKOUT_OPTION3_TITLE}" />
+ </div>
- <li>
- <div class="checkout_option_title">
- <h:outputText value="#{msg.CUSTOMER_CHECKOUT_OPTION3_TITLE}" />
- </div>
-
- <div class="checkout_option_content">
- <h:link class="checkout_option_link" id="checkout_option_guest" outcome="checkout2" value="#{msg.LINK_CHECKOUT_OPTION_GUEST}" />
- </div>
- </li>
- </ul>
- </div>
+ <div class="checkout_option_content">
+ <h:link class="checkout_option_link" id="checkout_option_guest" outcome="checkout2" value="#{msg.LINK_CHECKOUT_OPTION_GUEST}" />
+ </div>
+ </li>
+ </ul>
</div>
- </ui:define>
- </ui:composition>
-</html>
+ </div>
+ </ui:define>
+</ui:composition>
<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
- lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
- xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:f="http://xmlns.jcp.org/jsf/core"
- >
-
- <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
- <ui:define name="guest_title">
- <h:outputText value="#{msg.PAGE_TITLE_INDEX_CHECKOUT2}" />
- </ui:define>
-
- <ui:define name="content_header">
- <h:outputText value="#{msg.CONTENT_TITLE_INDEX_CHECKOUT2}" />
- </ui:define>
-
- <ui:define name="content">
- <div class="basket_content">
- <ui:include src="/WEB-INF/templates/basket/full_basket.tpl" />
-
- <ui:include src="/WEB-INF/templates/basket/total_sum.tpl" />
+<ui:composition template="/WEB-INF/templates/guest/guest_base.tpl"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+ xmlns:h="http://xmlns.jcp.org/jsf/html"
+ xmlns:f="http://xmlns.jcp.org/jsf/core">
+ <ui:define name="guest_title">
+ <h:outputText value="#{msg.PAGE_TITLE_INDEX_CHECKOUT2}" />
+ </ui:define>
+
+ <ui:define name="content_header">
+ <h:outputText value="#{msg.CONTENT_TITLE_INDEX_CHECKOUT2}" />
+ </ui:define>
+
+ <ui:define name="content">
+ <div class="basket_content">
+ <ui:include src="/WEB-INF/templates/basket/full_basket.tpl" />
+
+ <ui:include src="/WEB-INF/templates/basket/total_sum.tpl" />
+ </div>
+
+ <div class="checkout_outer">
+ <div class="checkout_title">
+ <h:outputText value="#{msg.GUEST_CHECKOUT_WITHOUT_REGISTRATION_TITLE}" />
</div>
- <div class="checkout_outer">
- <div class="checkout_title">
- <h:outputText value="#{msg.GUEST_CHECKOUT_WITHOUT_REGISTRATION_TITLE}" />
- </div>
-
- <div class="registration_form">
- <h:form id="checkout_form">
- <div class="table">
- <div class="table_header">
- <h:outputText value="#{msg.GUEST_PAYMENT_WITHOUT_REGISTRATION_TITLE}" />
- </div>
+ <div class="registration_form">
+ <h:form id="checkout_form">
+ <div class="table">
+ <div class="table_header">
+ <h:outputText value="#{msg.GUEST_PAYMENT_WITHOUT_REGISTRATION_TITLE}" />
+ </div>
- <ui:include src="/WEB-INF/templates/generic/form_personal_data.tpl" />
+ <ui:include src="/WEB-INF/templates/generic/form_personal_data.tpl" />
- <div class="para">
- <!-- @TODO Move this to i18n bundle //-->
- Derzeit ist nur eine Bezahlung gegen Rechnung möglich.
- </div>
+ <div class="para">
+ <!-- @TODO Move this to i18n bundle //-->
+ Derzeit ist nur eine Bezahlung gegen Rechnung möglich.
+ </div>
- <ui:include src="/WEB-INF/templates/guest/guest_privacy_terms.tpl" />
+ <ui:include src="/WEB-INF/templates/guest/guest_privacy_terms.tpl" />
- <div class="table_footer">
- <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
- <h:commandButton class="submit" type="submit" id="checkout" value="#{msg.BUTTON_COMPLETE_ORDER}" action="#{checkoutController.doCheckout()}" />
- </div>
+ <div class="table_footer">
+ <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+ <h:commandButton class="submit" type="submit" id="checkout" value="#{msg.BUTTON_COMPLETE_ORDER}" action="#{checkoutController.doCheckout()}" />
</div>
- </h:form>
- </div>
+ </div>
+ </h:form>
</div>
- </ui:define>
- </ui:composition>
-</html>
+ </div>
+ </ui:define>
+</ui:composition>
<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
- lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
- xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:f="http://xmlns.jcp.org/jsf/core"
- >
+<ui:composition template="/WEB-INF/templates/guest/guest_base.tpl"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+ xmlns:h="http://xmlns.jcp.org/jsf/html"
+ xmlns:f="http://xmlns.jcp.org/jsf/core">
+ <ui:define name="guest_title">
+ <h:outputText value="#{msg.PAGE_TITLE_USER_CHECKOUT_DONE}" />
+ </ui:define>
- <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
- <ui:define name="guest_title">
- <h:outputText value="#{msg.PAGE_TITLE_USER_CHECKOUT_DONE}" />
- </ui:define>
+ <ui:define name="content_header">
+ <h:outputText value="#{msg.CONTENT_TITLE_USER_CHECKOUT_DONE}" />
+ </ui:define>
- <ui:define name="content_header">
- <h:outputText value="#{msg.CONTENT_TITLE_USER_CHECKOUT_DONE}" />
- </ui:define>
-
- <ui:define name="content">
- <!-- @TODO Move this to i18n bundle //-->
- Rechnung abrufen:
- <h:link class="receipt_link" id="receipt" outcome="pdf" value="#{msg.LINK_OPEN_RECEIPT}" target="_blank">
- <f:param name="customer" value="#{beanHelper.customer.customerId}" />
- <f:param name="key" value="#{receiptController.fetchAccessKey()}" />
- </h:link>
- </ui:define>
- </ui:composition>
-</html>
+ <ui:define name="content">
+ <!-- @TODO Move this to i18n bundle //-->
+ Rechnung abrufen:
+ <h:link class="receipt_link" id="receipt" outcome="pdf" value="#{msg.LINK_OPEN_RECEIPT}" target="_blank">
+ <f:param name="customer" value="#{beanHelper.customer.customerId}" />
+ <f:param name="key" value="#{receiptController.fetchAccessKey()}" />
+ </h:link>
+ </ui:define>
+</ui:composition>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
- lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
- xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:f="http://xmlns.jcp.org/jsf/core"
- >
-
- <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
- <ui:define name="guest_title">
- <h:outputText value="#{msg.PAGE_TITLE_USER_EMPTY_BASKET}" />
- </ui:define>
-
- <ui:define name="content_header">
- <h:outputText value="#{msg.CONTENT_TITLE_USER_EMPTY_BASKET}" />
- </ui:define>
-
- <ui:define name="content">
- <!-- @TODO resend_link.xhtml is here! //-->
- <h:form id="form_resend_link" rendered="#{featureController.isFeatureEnabled('user_resend_confirmation_link')}">
- <div class="table">
- <div class="table_header">
- <h:outputText value="#{msg.GUEST_RESEND_LINK_TITLE}" />
- </div>
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition template="/WEB-INF/templates/guest/guest_base.tpl"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+ xmlns:h="http://xmlns.jcp.org/jsf/html"
+ xmlns:f="http://xmlns.jcp.org/jsf/core">
+ <ui:define name="guest_title">
+ <h:outputText value="#{msg.PAGE_TITLE_USER_EMPTY_BASKET}" />
+ </ui:define>
+
+ <ui:define name="content_header">
+ <h:outputText value="#{msg.CONTENT_TITLE_USER_EMPTY_BASKET}" />
+ </ui:define>
+
+ <ui:define name="content">
+ <!-- @TODO resend_link.xhtml is here! //-->
+ <h:form id="form_resend_link" rendered="#{featureController.isFeatureEnabled('user_resend_confirmation_link')}">
+ <div class="table">
+ <div class="table_header">
+ <h:outputText value="#{msg.GUEST_RESEND_LINK_TITLE}" />
+ </div>
+
+ <fieldset id="email_address_notice">
+ <legend title="#{msg.RESEND_CONFIRMATION_LINK_LEGEND_TITLE}">
+ <h:outputText value="#{msg.RESEND_CONFIRMATION_LINK_LEGEND}" />
+ </legend>
- <fieldset id="email_address_notice">
- <legend title="#{msg.RESEND_CONFIRMATION_LINK_LEGEND_TITLE}">
- <h:outputText value="#{msg.RESEND_CONFIRMATION_LINK_LEGEND}" />
- </legend>
-
- <div class="table_row">
- <div class="table_left">
- <h:outputLabel for="resendEmailAddress" value="#{msg.GUEST_RESEND_LINK_ENTER_EMAIL_ADDRESS}" />
- </div>
-
- <div class="table_right">
- <h:inputText styleClass="input" id="resendEmailAddress" size="20" maxlength="255" value="#{userResendConfirmationController.emailAddress}" required="true" requiredMessage="#{msg.EMAIL_ADDRESS_NOT_ENTERED}">
- <f:validator validatorId="EmailAddressValidator" />
- </h:inputText>
- </div>
+ <div class="table_row">
+ <div class="table_left">
+ <h:outputLabel for="resendEmailAddress" value="#{msg.GUEST_RESEND_LINK_ENTER_EMAIL_ADDRESS}" />
</div>
- </fieldset>
- <div>
- <h:message for="resendEmailAddress" errorClass="errors" warnClass="warnings" fatalClass="errors" />
+ <div class="table_right">
+ <h:inputText styleClass="input" id="resendEmailAddress" size="20" maxlength="255" value="#{userResendConfirmationController.emailAddress}" required="true" requiredMessage="#{msg.EMAIL_ADDRESS_NOT_ENTERED}">
+ <f:validator validatorId="EmailAddressValidator" />
+ </h:inputText>
+ </div>
</div>
+ </fieldset>
- <div class="table_row">
- <h:outputText value="#{msg.GUEST_RESEND_CONFIRMATION_LINK_NOTICE}" />
- </div>
+ <div>
+ <h:message for="resendEmailAddress" errorClass="errors" warnClass="warnings" fatalClass="errors" />
+ </div>
- <div class="table_footer">
- <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
- <h:commandButton styleClass="submit" type="submit" id="resend_link" value="#{msg.BUTTON_RESEND_CONFIRMATION_LINK}" action="#{userResendConfirmationController.doResendLink()}" />
- </div>
+ <div class="table_row">
+ <h:outputText value="#{msg.GUEST_RESEND_CONFIRMATION_LINK_NOTICE}" />
+ </div>
+
+ <div class="table_footer">
+ <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+ <h:commandButton styleClass="submit" type="submit" id="resend_link" value="#{msg.BUTTON_RESEND_CONFIRMATION_LINK}" action="#{userResendConfirmationController.doResendLink()}" />
</div>
- </h:form>
+ </div>
+ </h:form>
- <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_RESEND_LINK_DEACTIVATED}" rendered="#{not featureController.isFeatureEnabled('user_resend_confirmation_link')}" />
- </ui:define>
- </ui:composition>
-</html>
+ <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_RESEND_LINK_DEACTIVATED}" rendered="#{not featureController.isFeatureEnabled('user_resend_confirmation_link')}" />
+ </ui:define>
+</ui:composition>