package org.mxchange.pizzaapplication.beans.controller;
import java.rmi.RemoteException;
+import java.sql.SQLException;
import java.util.Deque;
+import java.util.Queue;
import javax.annotation.PostConstruct;
import javax.enterprise.context.SessionScoped;
import javax.faces.FacesException;
}
@Override
- public Deque<Product> getAvailableProducts () throws FacesException {
+ public Queue<Product> getAvailableProducts () throws FacesException {
try {
return this.getProduct().getAvailableProducts();
} catch (final RemoteException ex) {
}
@Override
- public Deque<Category> getAllCategories () throws FacesException {
+ public Queue<Category> getAllCategories () throws FacesException {
try {
// Fake zero category
Category c = new ProductCategory(0L, "Ist oberste Kategorie", 0L);
// Return it
return deque;
- } catch (final RemoteException ex) {
+ } catch (final SQLException ex) {
// Continue to throw
throw new FacesException(ex);
}
package org.mxchange.pizzaapplication.beans.controller;
import java.io.Serializable;
-import java.util.Deque;
+import java.util.Queue;
import javax.faces.view.facelets.FaceletException;
import org.mxchange.jshopcore.model.category.Category;
import org.mxchange.jshopcore.model.product.Product;
* @return Only available products
* @throws javax.faces.view.facelets.FaceletException If anything went wrong
*/
- public Deque<Product> getAvailableProducts () throws FaceletException;
+ public Queue<Product> getAvailableProducts () throws FaceletException;
/**
* Some "getter" for a linked list of all categories
* @return All categories
* @throws javax.faces.view.facelets.FaceletException If anything went wrong
*/
- public Deque<Category> getAllCategories () throws FaceletException;
+ public Queue<Category> getAllCategories () throws FaceletException;
}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
+ bean-discovery-mode="all">
+</beans>
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:selectOneMenu class="select" id="parent_id">
- <f:selectItems value="#{controller.allCategories}" var="categoryId" itemValue="#{categoryId.categoryId}" itemLabel="#{categoryId.title}" />
+ <f:selectItems value="#{controller.allCategories}" var="parent_category" itemValue="#{parent_category.categoryId}" itemLabel="#{parent_category.title}" />
</h:selectOneMenu>
</ui:composition>