InitialContext context = new InitialContext();
// Try to lookup the bean
- this.category = (CategorySessionBeanRemote) context.lookup("ejb/stateless-product"); //NOI18N
+ this.category = (CategorySessionBeanRemote) context.lookup("ejb/stateless-category"); //NOI18N
}
@Override
- public void doAdminAddCategory (final Category category) throws FaceletException {
+ public void addCategory (final Category category) throws FaceletException {
try {
// Deligate to bean
this.category.doAdminAddCategory(category);
</h:panelGrid>
//-->
- <h:form acceptcharset="utf-8" id="add_item">
- <table class="basket_item_table">
- <thead>
- <tr>
- <th colspan="5" class="table_header">
- Folgendes kann bestellt werden:
- </th>
- </tr>
-
- <tr>
- <th class="table_header_column">
- Bestellen?
- </th>
-
- <th class="table_header_column">
- Anzahl:
- </th>
-
- <th class="table_header_column">
- Produkt:
- </th>
-
- <th class="table_header_column">
- Einzelpreis:
- </th>
-
- <th class="table_header_column">
- Zwischensumme:
- </th>
- </tr>
- </thead>
-
- <tbody>
- <ui:repeat var="product" value="#{controller.availableProducts}">
+ <table class="basket_item_table">
+ <thead>
+ <tr>
+ <th colspan="5" class="table_header">
+ Folgendes kann bestellt werden:
+ </th>
+ </tr>
+
+ <tr>
+ <th class="table_header_column">
+ Bestellen?
+ </th>
+
+ <th class="table_header_column">
+ Anzahl:
+ </th>
+
+ <th class="table_header_column">
+ Produkt:
+ </th>
+
+ <th class="table_header_column">
+ Einzelpreis:
+ </th>
+
+ <th class="table_header_column">
+ Zwischensumme:
+ </th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <ui:repeat var="product" value="#{controller.availableProducts}">
+ <h:form acceptcharset="utf-8" id="add_item">
<f:viewAction action="#{basket.setCurrentProduct(product)}" />
</td>
<td class="table_data_column">
- #{basket.item.amount}
+ #{basket.currentItem.amount}
</td>
<td class="table_data_column">
</td>
<td class="table_data_column" align="right">
- <h:outputText class="price" value="#{basket.item.calculateTotalPrice()}">
+ <h:outputText class="price" value="#{controller.calculateTotalPrice(basket.currentItem)}">
<f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" />
</h:outputText>
</td>
</td>
</tr>
</ui:fragment>
- </ui:repeat>
- </tbody>
- </table>
- </h:form>
+ </h:form>
+ </ui:repeat>
+ </tbody>
+ </table>
</ui:define>
<ui:define name="footer">