JSP Tag Libraries

Скачать в pdf «JSP Tag Libraries»


</p>


</cond:test>


</cond:with>


</card>


</wml>


О Gets the remote interface of the Customer EJB We add the remote interface of the Customer EJB to the page scope.


e Adds the home interface of the OrderManager EJB We add the home interface of the OrderManager to the page scope.


d Creates an OrderManager EJB We use the Customer EJB to retrieve a remote interface of an OrderManager EJB from the home interface of the same EJB.


О Retrieves the user’s current Order EJB From the OrderManager EJB, we get the user’s current Order EJB.


G Makes sure that this page won’t get cached.


О Includes the user menu view We define a card that displays the order within. Inside the card, we include the options from the user menu view.


0    Creates a condition on the number of items in the current order We check whether the Order contains any OrderItems.

1    Tests if the number of items in the current order is more than none.


G Iterates through the OrderItems If the order contains the remote interfaces of the OrderItem, EJBs are iterated. For every OrderItem, the SKU, name, and price are displayed, together with the ordered quantity and the row sum.

1) Displays the SKU of the OrderItem.
1! Displays the name of the OrderItem.
1@ Displays the price for the OrderItem.
1# Displays the ordered quantity of the OrderItem.
1$ Displays the sum for the OrderItem.


1% Casts the ServletResponse into an HttpServletResponse We have to perform a little trick to make sure that the application server will encode the URL that we display as a link to remove an item from the Order. The application thinks that we are taking full responsibility for the URL as we are building it up with dynamic content. Our trick

Скачать в pdf «JSP Tag Libraries»