[jboss-cvs] jboss-seam/examples/dvdstore/view ...

Peter Muir peter at bleepbleep.org.uk
Thu Jun 28 19:22:59 EDT 2007


  User: pmuir   
  Date: 07/06/28 19:22:59

  Added:       examples/dvdstore/view          dvd.xhtml showorders.xhtml
                        home.xhtml complete.xhtml index.jsp confirm.xhtml
                        checkout.xhtml screen.css browse.xhtml
  Log:
  Move DVD to new build
  
  Revision  Changes    Path
  1.1      date: 2007/06/28 23:22:59;  author: pmuir;  state: Exp;jboss-seam/examples/dvdstore/view/dvd.xhtml
  
  Index: dvd.xhtml
  ===================================================================
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:s="http://jboss.com/products/seam/taglib"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html">
  <body>
      <ui:composition template="/WEB-INF/template.xhtml">
          <ui:define name="topnav">
              <ui:include src="/WEB-INF/incl/store_nav.xhtml">
                  <ui:param name="page" value="shop" />
              </ui:include>
          </ui:define>
  
          <ui:define name="sidebar">
              <ui:include src="/WEB-INF/incl/login.xhtml" />
              <ui:include src="/WEB-INF/incl/searchbox.xhtml" />
              <ui:include src="/WEB-INF/incl/cart.xhtml" />
          </ui:define>
          
          <ui:define name="body">
              <div class="productbox">
                  <f:subview rendered="#{dvd.imageURL != null}">
                      <div class="productimage">
                          <img src="#{dvd.imageURL}" />
                      </div>
                  </f:subview>
                  
                  <div class="productinfo">
                      <h:panelGrid columns="2">
                          <h:outputText value="Title:" />
                          <h:outputText value="#{dvd.title}" />
                          
                          <h:outputText value="Starring:" />
                          <h:panelGroup>
                              <ui:repeat value="#{dvd.actors}" var="starring">
                                  [#{starring.name}]
                              </ui:repeat>
                          </h:panelGroup>
                          
                          <h:outputText value="Price:" />
                          <h:outputText value="#{dvd.price}" />
                      </h:panelGrid>
                  </div>
  
                  <div class="cntInfo">
                      #{dvd.description}
                  </div>
  
                  <div class="productbuttons">
                      <s:button action="#{search.addToCart}" value="Add to Cart"/>
                      &#160;
                      <s:button view="/browse.xhtml" value="Back to Search"/>
                  </div>
              </div>
          </ui:define>
      </ui:composition>
  </body>
  </html>
  
  
  
  
  
  
  
  1.1      date: 2007/06/28 23:22:59;  author: pmuir;  state: Exp;jboss-seam/examples/dvdstore/view/showorders.xhtml
  
  Index: showorders.xhtml
  ===================================================================
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:s="http://jboss.com/products/seam/taglib"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html">
  <body>
      <ui:composition template="/WEB-INF/template.xhtml">
          <ui:define name="topnav">
              <ui:include src="/WEB-INF/incl/store_nav.xhtml">
                  <ui:param name="page" value="orders" />
              </ui:include>
          </ui:define>
  
          <ui:define name="sidebar">
              <ui:include src="/WEB-INF/incl/login.xhtml" />
              <ui:include src="/WEB-INF/incl/cart.xhtml" />
          </ui:define>
          
          <ui:define name="body">
              <h1>Your orders:</h1>
  
              <f:subview rendered="#{!orders.rowAvailable}">
                  <p>You have not placed any orders.</p>
              </f:subview>
  
              <f:subview rendered="#{orders.rowAvailable}">
                  
              <h:dataTable value="#{orders}" var="item"
                           styleClass="dvdtable" 
                           headerClass="dvdtablehead"
                           rowClasses="dvdtableodd,dvdtableeven"
                           columnClasses="dvdtablecol">
                  <h:column>
                      <f:facet name="header">Order Id</f:facet>
                      #{item.orderId}
                  </h:column>                        
                  <h:column>
                      <f:facet name="header">Date</f:facet>
                      <h:outputText value="#{item.orderDate}">
                          <s:convertDateTime type="both" dateStyle="full"/> 
                      </h:outputText>
                  </h:column>                        
                  <h:column>
                      <f:facet name="header">Status</f:facet>
                      #{item.status}
                  </h:column>                        
  
                  <h:column>
                      <s:button action="#{showorders.detailOrder}" value="Show Details" />
                  </h:column>
                  <h:column>
                      <s:button action="#{showorders.cancelOrder}" value="Cancel" rendered="#{item.open}"/>
                  </h:column>
              </h:dataTable>
  
              <f:subview rendered="#{myorder != null}">
                  <div class="cntInfo">
                      <h2>Order Details</h2>
  
                      <h:panelGrid columns="2">
                          <h:outputText value="Order Id:" />
                          <h:outputText value="#{myorder.orderId}" />
                          
                          <h:outputText value="Status:" />
                          <h:panelGroup>
                              <h:outputText value="#{myorder.status}" />
                              <h:outputText value="(Tracking Number: #{myorder.trackingNumber})" 
                                            rendered="#{myorder.statusCode==3}"/>
                          </h:panelGroup>
                          
                          <h:outputText value="Order date:" />
                          <h:outputText value="#{myorder.orderDate}">
                              <s:convertDateTime type="both" dateStyle="full"/> 
                          </h:outputText>
                          
                          <h:outputText value="Net Amount:" />
                          <h:outputText value="#{myorder.netAmount}">
                              <f:convertNumber type="currency" currencySymbol="$" />
                          </h:outputText>
                          
                          <h:outputText value="Tax:" />
                          <h:outputText value="#{myorder.tax}">
                              <f:convertNumber type="currency" currencySymbol="$" />
                          </h:outputText>
                          
                          <h:outputText value="Total Amount:" />
                          <h:outputText value="#{myorder.totalAmount}">
                              <f:convertNumber type="currency" currencySymbol="$" />
                          </h:outputText>
                      </h:panelGrid>
                      
  
                      <div class="cntInfo">
                          <h:dataTable value="#{myorder.orderLines}" var="item"
                                       styleClass="dvdtable" 
                                       headerClass="dvdtablehead"
                                       rowClasses="dvdtableodd,dvdtableeven"
                                       columnClasses="dvdtablecol">
                              <h:column>
                                  <f:facet name="header">
                                      <h:outputText value="#{messages.cartTitleColumn}" />
                                  </f:facet>
                                  <h:outputText value="#{item.product.title}" />
                              </h:column>                        
                              <h:column>
                                  <f:facet name="header">
                                      <h:outputText value="#{messages.cartActorColumn}" />
                                  </f:facet>
                                  <h:outputText value="#{item.product.actors[0].name}" />
                              </h:column>                        
                              <h:column>
                                  <f:facet name="header">
                                      <h:outputText value="#{messages.cartQuantityColumn}" />
                                  </f:facet>
                                  <h:outputText value="#{item.quantity}" />
                              </h:column>                                        
                              <h:column>
                                  <f:facet name="header">
                                      <h:outputText value="#{messages.cartPriceColumn}" />
                                  </f:facet>
                                  <h:outputText value="#{item.product.price}">
                                      <f:convertNumber type="currency" currencySymbol="$" />
                                  </h:outputText>
                              </h:column>                        
                          </h:dataTable>
                      </div>
                  </div>
              </f:subview>
          </f:subview>
          </ui:define>
      </ui:composition>
  </body>
  </html>
  
  
  
  
  
  
  
  1.1      date: 2007/06/28 23:22:59;  author: pmuir;  state: Exp;jboss-seam/examples/dvdstore/view/home.xhtml
  
  Index: home.xhtml
  ===================================================================
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:s="http://jboss.com/products/seam/taglib"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html">
  <body>
      <ui:composition template="/WEB-INF/template.xhtml">
          <ui:define name="topnav">
              <ui:include src="/WEB-INF/incl/store_nav.xhtml">
                  <ui:param name="page" value="home" />
              </ui:include>
          </ui:define> 
             
          <ui:define name="sidebar">
              <ui:include src="/WEB-INF/incl/login.xhtml" />
          </ui:define>
          
          <ui:define name="body">
              <h1>Welcome to the DVD Store</h1>
              
              <p>
                  Welcome to the JBoss DVD Store Demo.  The DVD Store is a simple storefront
                  application written using the latest JBoss technologies: EJB3, Seam and jBPM.
              </p>
  
              <h2>How to use the DVD Store</h2>
              <p>
                  You can enter the store DVD immediately by clicking on
                  the shopping link below. However, in order to complete
                  a purchase, you'll need to first log in as a customer.
                  There are 5 customer accounts: <b>user1</b> through
                  <b>user5</b> (with password <b>password</b>).  You can
                  login using any of the customer accounts or create
                  your own customer account to browse the DVD Store and
                  make purchases.  Once an order is submitted, you can
                  check the status of the order from the <em>My
                  Orders</em> screen.  When the order is fulfilled by
                  the store manager, the status of the order will be
                  updated.
              </p>
  
              <p>
                  When a customer places an order, the application
                  starts a jBPM order management process.  Depending on
                  the version of the process deployed, the store manager
                  (username <b>manager</b>, password <b>password</b>)
                  will be presented with different fulfilment options.
              </p> 
  
  
              <s:button view="/browse.xhtml" value="Start Shopping" />
  
          </ui:define>
      </ui:composition> 
  </body> 
  </html>
  
  
  
  1.1      date: 2007/06/28 23:22:59;  author: pmuir;  state: Exp;jboss-seam/examples/dvdstore/view/complete.xhtml
  
  Index: complete.xhtml
  ===================================================================
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html">
  <body>
      <ui:composition template="/WEB-INF/template.xhtml">
          <ui:define name="topnav">
              <ui:include src="/WEB-INF/incl/store_nav.xhtml">
                  <ui:param name="page" value="cart" />
              </ui:include>
          </ui:define>
  
          <ui:define name="sidebar">
              <ui:include src="/WEB-INF/incl/login.xhtml" />
          </ui:define>
  
          <ui:define name="body">
              <f:subview rendered="#{completedOrder == null}">
                  <p>Your order could not be completed.</p>
  
                  <h:form>
                      <h:commandButton action="browse" value="Continue Shopping" />
                  </h:form>
              </f:subview>
              
              <f:subview rendered="#{completedOrder != null}">
                  <h2>#{messages.checkoutCompleteHeader}</h2>
                  <h:form>
                      <h:dataTable value="#{completedOrder.orderLines}" 
                                   var="item"
                                   styleClass="dvdtable" 
                                   headerClass="dvdtablehead"
                                   rowClasses="dvdtableodd,dvdtableeven"
                                   columnClasses="dvdtablecol">
                          <h:column>
                              <f:facet name="header">
                                  <h:outputText value="#{messages.cartItemColumn}" />
                              </f:facet>
                              <h:outputText value="#{item.position}" />
                          </h:column>                        
                          <h:column>
                              <f:facet name="header">
                                  <h:outputText value="#{messages.cartQuantityColumn}" />
                              </f:facet>
                              <h:outputText value="#{item.quantity}" />
                          </h:column>                        
                          <h:column>
                              <f:facet name="header">
                                  <h:outputText value="#{messages.cartTitleColumn}" />
                              </f:facet>
                              <h:outputText value="#{item.product.title}" />
                          </h:column>                        
                          <h:column>
                              <f:facet name="header">
                                  <h:outputText value="#{messages.cartActorColumn}" />
                              </f:facet>
                              <h:outputText value="#{item.product.actors[0].name}" />
                          </h:column>                        
                          
                          <h:column>
                              <f:facet name="header">
                                  <h:outputText value="#{messages.cartPriceColumn}" />
                              </f:facet>
                              <h:outputText value="#{item.product.price}">
                                  <f:convertNumber type="currency" currencySymbol="$" />
                              </h:outputText>
                          </h:column>                        
                      </h:dataTable>
                  </h:form>
                  
  
                  <div style="width: 100%;">
                      <div class="cntInfo" style="float: right;">
                          <h:panelGrid columns="2">
                              <h:outputText value="#{messages.checkoutSubtotal}" />
                              <h:outputText value="#{completedOrder.netAmount}">
                                  <f:convertNumber type="currency" currencySymbol="$" />
                              </h:outputText>
                              
                              <h:outputText value="#{messages.checkoutTax}" />
                              <h:outputText value="#{completedOrder.tax}">
                                  <f:convertNumber type="currency" currencySymbol="$" />
                              </h:outputText>
                              
                              <h:outputText value="#{messages.checkoutTotal}" />
                              <h:outputText value="#{completedOrder.totalAmount}">
                                  <f:convertNumber type="currency" currencySymbol="$" />
                              </h:outputText>
                          </h:panelGrid>
                      </div>
                      
                      <div style="float:clear">&#160;</div>
                  </div>
                  
                  
                  <p class="orderBox cntAlert">
                      Thank you for ordering. 
                      <h:outputText value="#{completedOrder.totalAmount}"> 
                          <f:convertNumber type="currency" currencySymbol="$" />
                      </h:outputText>
                      charged was to your <h:outputText value="#{completedOrder.customer.creditCardTypeString}" />.
                      Your order number is 
                      <h:outputText value="#{completedOrder.orderId}" />.
                  </p>
              </f:subview>
          </ui:define>
      </ui:composition>
  </body>
  </html>
  
  
  
  1.1      date: 2007/06/28 23:22:59;  author: pmuir;  state: Exp;jboss-seam/examples/dvdstore/view/index.jsp
  
  Index: index.jsp
  ===================================================================
  <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
  <c:redirect url="/home.seam" />
  
  
  
  
  1.1      date: 2007/06/28 23:22:59;  author: pmuir;  state: Exp;jboss-seam/examples/dvdstore/view/confirm.xhtml
  
  Index: confirm.xhtml
  ===================================================================
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html">
  <body>
      <ui:composition template="/WEB-INF/template.xhtml">
          <ui:define name="topnav"> 
              <ui:include src="/WEB-INF/incl/store_nav.xhtml">
                  <ui:param name="page" value="cart" />
              </ui:include>
          </ui:define>
  
          <ui:define name="sidebar">
              <ui:include src="/WEB-INF/incl/login.xhtml" />
          </ui:define>
  
          <ui:define name="body">
              <h1>Confirm Order</h1>
              
              <f:subview rendered="#{currentOrder==null}">
                  <p>You have no order.</p>
              </f:subview>
  
              <f:subview rendered="#{currentOrder != null}">
                  <h:form>
                      <h:dataTable value="#{currentOrder.orderLines}" var="line"
                                   styleClass="dvdtable" 
                                   headerClass="dvdtablehead"
                                   rowClasses="dvdtableodd,dvdtableeven"
                                   columnClasses="dvdtablecol">
                          <h:column>
                              <f:facet name="header">
                                  <h:outputText value="#{messages.cartTitleColumn}" />
                              </f:facet>
                              <h:outputText value="#{line.product.title}" />
                          </h:column>                        
                          <h:column>
                              <f:facet name="header">
                                  <h:outputText value="#{messages.cartActorColumn}" />
                              </f:facet>
                              <h:outputText value="#{line.product.actors[0].name}" />
                          </h:column>                        
                          
                          <h:column>
                              <f:facet name="header">
                                  <h:outputText value="#{messages.cartPriceColumn}" />
                              </f:facet>
                              <h:outputText value="#{line.product.price}">
                                  <f:convertNumber type="currency" currencySymbol="$" />
                              </h:outputText>
                          </h:column>                        
                          <h:column>
                              <f:facet name="header">
                                  <h:outputText value="#{messages.cartQuantityColumn}" />
                              </f:facet>
                              <h:outputText value="#{line.quantity}"/>
                          </h:column>                        
                      </h:dataTable>
                  </h:form>
                  
                  <div style="width: 100%;">
                      <div class="cntInfo" style="float:right;">
                          <h:panelGrid columns="2">
                              <h:outputText value="#{messages.checkoutSubtotal}" />
                              <h:outputText value="#{currentOrder.netAmount}">
                                  <f:convertNumber type="currency" currencySymbol="$" />
                              </h:outputText>
                              
                              <h:outputText value="#{messages.checkoutTax}" />
                              <h:outputText value="#{currentOrder.tax}">
                                  <f:convertNumber type="currency" currencySymbol="$" />
                              </h:outputText>
                              
                              <h:outputText value="#{messages.checkoutTotal}" />
                              <h:outputText value="#{currentOrder.totalAmount}">
                                  <f:convertNumber type="currency" currencySymbol="$" />
                              </h:outputText>
                          </h:panelGrid>
                          
                          <h:form>
                              <h:commandButton action="purchase" value="Confirm" />
                              &#160;
                              <h:commandButton action="cancel" value="Cancel" />
                          </h:form>
                      </div>
                  </div>
              </f:subview>            
          </ui:define>
      </ui:composition>
  </body>
  </html>
  
  
  
  1.1      date: 2007/06/28 23:22:59;  author: pmuir;  state: Exp;jboss-seam/examples/dvdstore/view/checkout.xhtml
  
  Index: checkout.xhtml
  ===================================================================
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html">
  <body>
      <ui:composition template="/WEB-INF/template.xhtml">
          <ui:define name="topnav">
              <ui:include src="/WEB-INF/incl/store_nav.xhtml">
                  <ui:param name="page" value="cart" />
              </ui:include>
          </ui:define>
  
          <ui:define name="sidebar">
              <ui:include src="/WEB-INF/incl/login.xhtml" />
          </ui:define>
  
          <ui:define name="body">
              <h1>Shopping Cart</h1>
  
              <p>
                  The checkout wizard uses a 
                  <a onclick="window.open('img/checkout.html','flowimg','height=330,width=370,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'); return false;"
                     href="img/checkout.html">pageflow</a>
                  to define the flow of the user interaction.
              </p>
          
              <f:subview rendered="#{empty cart.cart}">
                  <p>Your cart is empty.</p>
  
                  <h:form>
                      <h:commandButton action="browse" value="Continue Shopping" />
                  </h:form>
              </f:subview>
  
              <f:subview rendered="#{not empty cart.cart}">
                  <h:form>
                      <h:dataTable value="#{cart.cart}" var="item"
                                   styleClass="dvdtable" 
                                   headerClass="dvdtablehead"
                                   rowClasses="dvdtableodd,dvdtableeven"
                                   columnClasses="dvdtablecol">
                          <h:column>
                              <f:facet name="header">
                                  <h:outputText value="#{messages.cartRemoveColumn}" />
                              </f:facet>
                              <h:selectBooleanCheckbox value="#{cart.cartSelection[item]}"/>
                          </h:column>
                          <h:column>
                              <f:facet name="header">
                                  <h:outputText value="#{messages.cartTitleColumn}" />
                              </f:facet>
                              <h:outputText value="#{item.product.title}" />
                          </h:column>                        
                          <h:column>
                              <f:facet name="header">
                                  <h:outputText value="#{messages.cartActorColumn}" />
                              </f:facet>
                                  <h:outputText value="#{item.product.actors[0].name}" />
                          </h:column>                        
                          
                          <h:column>
                              <f:facet name="header">
                                  <h:outputText value="#{messages.cartPriceColumn}" />
                              </f:facet>
                              <h:outputText value="#{item.product.price}">
                                  <f:convertNumber type="currency" currencySymbol="$" />
                              </h:outputText>
                          </h:column>                        
                          <h:column>
                              <f:facet name="header">
                                  <h:outputText value="#{messages.cartQuantityColumn}" />
                              </f:facet>
                              <h:inputText value="#{item.quantity}" size="6" />
                          </h:column>                        
                      </h:dataTable>
                      <h:commandButton action="browse"  
                                       value="Continue Shopping" />
                      &#160;
                      <h:commandButton action="#{cart.resetCart}"  
                                       value="Empty Cart"  />
                      &#160;
                      <h:commandButton action="#{cart.updateCart}" 
                                       value="#{messages.checkoutUpdateButton}" />
                  </h:form>
                  
                  <div style="width: 100%;">
                      <div class="cntInfo" style="float:right;">
                          <h:panelGrid columns="2">
                              <h:outputText value="#{messages.checkoutSubtotal}" />
                              <h:outputText value="#{cart.subtotal}">
                                  <f:convertNumber type="currency" currencySymbol="$" />
                              </h:outputText>
                              
                              <h:outputText value="#{messages.checkoutTax}" />
                              <h:outputText value="#{cart.tax}">
                                  <f:convertNumber type="currency" currencySymbol="$" />
                              </h:outputText>
                              
                              <h:outputText value="#{messages.checkoutTotal}" />
                              <h:outputText value="#{cart.total}">
                                  <f:convertNumber type="currency" currencySymbol="$" />
                              </h:outputText>
                          </h:panelGrid>
                          
                          
                          <f:subview rendered="#{identity.loggedIn}">
                              <h:form>
                                  <h:commandButton action="#{checkout.createOrder}"  
                                                   value="#{messages.checkoutPurchaseButton}"  />
                              </h:form>
                          </f:subview>
                      </div>
                      
                      <f:subview rendered="#{!identity.loggedIn}">
                          <p class="warning">You must be logged in to place an order</p>
                      </f:subview>
                  </div>
              </f:subview>
          </ui:define>
      </ui:composition>
  </body>
  </html>
  
  
  
  1.1      date: 2007/06/28 23:22:59;  author: pmuir;  state: Exp;jboss-seam/examples/dvdstore/view/screen.css
  
  Index: screen.css
  ===================================================================
  
  
  /*<group=defaults>*/
  
  body, div, dd, dt, dl, img, ul, ol, li, p, h1, h2, h3, h4, h5, form {
      margin: 0;
      padding: 0;
  }
  
  html {
      height: 100%;
  }
  img {
      border: 0;
  }
  
  body {
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-size: small;
      line-height: 1.25em;
      color: #333;
      position: relative;
      background: #fff url(img/bg.gif) 0 0 repeat-x;
      width: 100%;
      height: 100%;
      margin-left: auto;
      margin-right: auto;
  }
  input {
      padding: 4px;
  }
  input, select {
      border: 1px solid #aaa;
      vertical-align: middle;
  }
  p {
      text-align: justify;
      margin: 12px;
      line-height: 150%;
  }
  ol, ul {
      margin: 10px 0px 10px 6px;
  }
  li {
      margin: 10px 12px;
  }
      
  /*</group>*/
  
  /*<group=Layout>*/
  
  #document {
          height: 100%;
  }
  #footer {
          clear: both;
          float: left;
          width: 100%;
          text-align: right;
          display: block;
          padding: 40px 192px 5px 5px;
          border-top: 1px solid #eaeaea;
          color: #ccc;
          font-size: x-small;
  }
  #container {
          padding: 15px 5px;
  }
  #sidebar {
          width: 180px;
          float: right;
          margin-top: 11px;
          margin-bottom: 12px;
          text-align: center;
  }
  #content {
          margin-right: 192px;
  }
  
  #pgMainMenu {
          width: 760px;
  }
  #pgMainMenu #container {
          padding-left: 0;
          padding-right: 0;
  }
      
  /*</group>*/
  
  /*<group=header>*/
  
  #header {
      position: relative;
      height: 60px;
      text-align: center;
      font-size: 36px;
      font-weight: normal;
      color: #264071;
  }
  
  #header span {
      position:absolute;
      top: 20px;
      left: 16px;
  
      padding-top: 3px;
      height: 40px;
  }
      
  /*</group>*/
  
  /*<group=Navigation>*/
  
  #nav {
          position: relative;
          padding: 1px 20px 0 20px;
          border-top: 1px solid #c0c0c0;
          border-bottom: 1px solid #c0c0c0;
          line-height: normal;
          height: 25px;
  }
  #nav ul {
          margin: 0px;
          padding: 0px;
          position: absolute;
          margin-top: 1px;
          list-style: none;
          text-align: center;
  }
  #nav li {
          float: left;
          margin: 0px;
          margin-right: 2px;
          padding: 0 0 0 4px;
  }
  #nav li a {
          display: block;
          padding: 6px 20px 6px 16px;
          font-family: Verdana, Arial, Helvetica, sans-serif;
          font-size: 10px;
          font-weight: bold;
          text-decoration: none;
          color: #333;
  }
  #nav li a:hover {
          color: #044c9c;
  }
  #nav .current {
          border-bottom: 1px solid #fff;
          background: url(img/nav.tab.left.gif) no-repeat left top;
  }
  #nav .current a {
          color: #044c9c;
          background: url(img/nav.tab.right.gif) no-repeat right top;
  }
  #nav .current a {
          text-decoration: none;
  }
      
  /*</group>*/
  /* Breadcrumb */
  #breadcrumb {
          color: #3b66a2;
          font-size: small;
  }
  
  /*<group=Headings>*/
  
  h1, h2, h3, h4, h5 {
          font-family: "Trebuchet MS", Arial, sans-serif;
          line-height: normal;
          color: #223F74;
          font-weight: bold;
  }
  h1 {
          font-size: x-large;
          padding: 0px;
          margin-bottom: 10px;
  }
  h2 {
          font-size: large;
          letter-spacing: 0px;
          color: #376098;
          line-height: 170%
  }
  h3 {
          font-size: medium;
          letter-spacing: 0px;
          color: #333;
  }
      
  /*</group>*/
  
  /*<group=Content Boxes>*/
  
  .cntInfo, .cntError, .cntAlert, .cntSubTitle, .cntSubMenu {
          padding: 4px;
          margin: 0;
          margin-bottom: 5px;
          border: 1px solid #eaeaea;
          background-color: #fff;
  }
  .cntInfo p, .cntError p, .cntAlert p {
          padding: 0;
          padding-bottom: 5px;
  }
  .cntInfo {
          background: #FAFAF8 url(img/shade.info.gif) 0 0 repeat-x;
  }
  
  .cntInfo .cntForm {
      white-space: nowrap;
  }
  
  .cntError {
       background-color: #ffc;
       border-color: #930;
       font-size: 10px; /* make box not wrap */;
       white-space: nowrap;
       position: relative;
       left: 5px;
  }
  .cntAlert {
      background-color: #d3e4ff;
      border-color: #36c;
  }
  .cntSubTitle {
      border: 0;
      border-top: 1px solid #dadada;
      background: url(img/shade.subtitle.gif) 0 2px repeat-x;
  }
  .cntSubMenu {
      border: 0;
      border-top: 1px solid #dadada;
      background: url(img/shade.menu.gif) 0 2px repeat-x;
  }
      
  /*</group>*/
  
  /*<group=top sellers>*/
  
  .bestouter {
      width:  600px;
      height: 100px;
  }
  
  .bestinner {
      float: left;
      height:160px;
      width: 120px;
      border-style: solid;
      border-width: 1px;
      margin: 10px;
      background: #dfeefe;
  }
  
  .besttitle {
      heioght: .5em;
      text-align: center;
      background: #5e8bc4 0px;
      text-transform: none;
      white-space: nowrap;
      font-size: 1em;
      font-weight: bold;
  }
  
  .bestimage {
      margin-top:  10px;
      height: auto;
  }
  
  .bestimage img {
     height: 120px;
     vertical-align: middle;
     margin-left:  auto;
     margin-right: auto;
     display:  block;
  }
  
  .besttitle a:link {
      text-decoration: none;
  }
  
  .besttitle a:hover {
      text-decoration: underline;
  }
  
  /*</group>*/
  
  .spacer {
      margin-top: 20px;
  }
  .controlBar {
      background-color: #d3e4ff;
      /* background: #fff url(img/control.bg.gif) 0 100% repeat-x; */
      border: 1px solid #CAC4B6;
      color: #333;
      padding: 0px;
      margin: 0px;
      margin-bottom: 5px;
      height: 34px;
      clear:  left;
      text-align: left;
      text-indent: 1px;
  }
  
  .controlBar .buttonbox {
      float: right; 
      width: 50%; 
      text-align: left; 
      padding: 3px 3px;
  }
  
  
  .controlBar .button {    
     float: right; 
     width: 30px; 
     /* border: 1px solid #d3e4ff; */
  }
  
  .controlBar .message {
      padding: 3px 6px;
      vertical-align: bottom;
      margin-top: 5px;
      font-size: 20px;
      font-weight: bold;
  }
  
  .controlBar option {
          font-size: small;       
  }
  
  .dvdtable {    
      width:  99%;
  }
  
  .dvdtablehead {
      text-align: left;
  }
  
  .results {
          /*clear: left;
          float: left;
          */
          border-bottom: 1px solid #eaeaea;
  }
  #searchSummary a {
          color: #2C5298;
          text-decoration: none;
  }
  #searchSummary a:hover {
          text-decoration: underline;
  }
  
  /* Box */
  
  .box {
          text-align: left;
          border: 1px solid #aaa;
          margin-bottom: 20px;
          width: 170px;
  }
  .boxHeader {
          background: #f6f5e7 url(img/box.hdr.bg.yellow.gif) repeat-x;
          padding: 5px 10px;
  }
  .boxHeader h3 {
          font-weight: bold;
          padding: 0px;
          color: #333;
  }
  .boxContent {
          background: #fff url(img/shade.gif) repeat-x;
          border-top: 1px solid #aaa;
          padding : 10px;
  }
  .boxFooter {
          text-align: center;
          padding-bottom: 10px;
  }
  
  /* Forms */
  .required, .warning {
          font-weight: bold;
          color: #900;
  }
  
  /*<group=menu>*/
  
  .menu {
          background: #619ad9 url(img/menu.bg.gif) 0 100% no-repeat;
          text-align: left;
          margin-bottom: 10px;
          padding-bottom: 12px;
  }
  .menu dt {
          color: #fff;
          font-weight: bold;
          padding: 7px 6px 5px 16px;
          border-bottom: 2px groove #6AA9EE;
  }
  .menu dd {
          background-color: #DDEEFF;
          border-top: 1px solid #F9FBFD;
          border-bottom: 1px solid #3B7FBD;
          border-left: 1px solid #C1C1C1;
          border-right: 1px solid #C1C1C1;
          padding: 6px;
  }
  
  
  .menu input {
          width: 156px;
  }
  .menu select {
          width: 165px;
  }
  .menuHeader {
      background: #619ad9 url(img/menu.top.bg.gif) 0 0 no-repeat;
      border-bottom: 1px solid #000;
  }
  .menuSection {
      color: #2C5298;
      padding-bottom: 4px;
  }
  .menuSection dt {
      color: #2C5298;
      font-size: small;
      border: 0;
      padding: 0;
      font-weight: bold;
  }
  .menuSection dd {
          color: #2C5298;
          font-size: 85%;
          padding: 0;
          padding-left: 4px;
          border: 0;
  }
  .menuSection a {
          color: #2C5298;
          text-decoration: none;
  }
  .menuSection a:hover {
          text-decoration: underline;
  }
  
  .menuFooter a {
      /* color: #2C5298; */
      text-decoration: none;
  }
  .menuFooter a:hover {
      text-decoration: underline;
  }
  
  .menuForm dd, .menuForm dt {
      border: 0;
      padding: 0;
  }
  
  .menuForm dt {
      color: #2C5298;
      font-size: 12px;
  }
  .menuForm dd {
      padding-bottom: 5px;
  }
  
  /* Menu */
  
  /* Menu */
      
  /*</group>*/
  .formButton {
          background: #eaeaea url(img/btn.bg.gif) 0 0 repeat-x;
          border-style: ridge; 
  }
  
  /*<group=Status Box>*/
  
  #status {
          float: right;
          padding: 5px 10px;
          text-align: right;
  }
  #status dl {
          list-style: none;
          background-image: url(img/status.bg.gif);
  }
  #status dt {
          display: none;
  }
  #status dd {
          color: #fff;
          font-family: Verdana, Arial, Helvetica, sans-serif;
          font-size: x-small;
          padding: 2px 4px;
          line-height: normal;
          border: 1px solid #003080;
  }
  
  /* Status Box */
      
  /*</group>*/
  
  
  
  .orderBox {
      clear: both;
      position: relative;
      top: 10px;
      margin-left: 50px;
      margin-right: 50px;
      padding: 10px;
  
  }
  
  /*<group=product page>*/
  .productbox {    
      margin-left:  40px;
  }
  
  .productimage {   
      float: left;
      margin-right: -30px;
      padding-right: 2px;
      padding-bottom: 2px;
  }
  
  .productimage img {
      position: relative;
      left: -30px;
  }
      
  
  .logo {
  	text-align: center;
  }
  
  .logo img {
  	width: 120px;
  }
  
  .productinfo {
     
  }
  
  
  
  /*</group>*/
  
  
  
  1.1      date: 2007/06/28 23:22:59;  author: pmuir;  state: Exp;jboss-seam/examples/dvdstore/view/browse.xhtml
  
  Index: browse.xhtml
  ===================================================================
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:s="http://jboss.com/products/seam/taglib"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:fn="http://java.sun.com/jsp/jstl/functions">
  
  <body>
      <ui:composition template="/WEB-INF/template.xhtml">
          <ui:define name="topnav">
              <ui:include src="/WEB-INF/incl/store_nav.xhtml">
                  <ui:param name="page" value="shop" />
              </ui:include>
          </ui:define>
          
          <ui:define name="sidebar">
              <ui:include src="/WEB-INF/incl/login.xhtml" />
              <ui:include src="/WEB-INF/incl/searchbox.xhtml" />
              <ui:include src="/WEB-INF/incl/cart.xhtml" />
          </ui:define>
          
          <ui:define name="body">
              <f:subview rendered="#{searchResults==null}">
                  <p> This is the DVD search screen.  Use the search box
                  to the right to search for DVDs.  The search component
                  is a conversational Seam component.  You can perform
                  multiple searches in multiple windows, and Seam will
                  keep them all separate.  The shopping cart, of course,
                  is shared, allowing the customer to place items in the
                  car from any of the search screens.</p>
              
                  <div class="bestouter">
                      <ui:repeat value="#{topProducts}" var="item">
                          <div class="bestinner">
                              <div class="besttitle">
                                  <s:link view="/dvd.xhtml">
                                      #{fn:length(item.title) gt 14 ? fn:substring(item.title,0,13) : item.title}
                                      <f:param name="id" value="#{item.productId}"/>
                                  </s:link>
                              </div>
                              <div class="bestimage">
                                  <s:link view="/dvd.xhtml">
                                      <f:param name="id" value="#{item.productId}"/>
                                      <img src="#{item.imageURL}" />
                                  </s:link>
                              </div>
                          </div>
                      </ui:repeat>
                  </div>
              </f:subview>
              
              <f:subview rendered="#{searchResults.rowCount == 0}">
                  <h2>
                      <h:outputText value="#{messages.noSearchResultsHeader}" />
                  </h2>
              </f:subview>
                  
              <h:form rendered="#{searchResults.rowCount > 0}">
                  <div class="controlBar">
                      <div class="buttonbox">
                          <div class="button">
                              <h:commandLink action="#{search.nextPage}" rendered="#{!search.lastPage}">
                                  <img src="img/arrow-r.png" />
                              </h:commandLink>
                              &#160;
                          </div>
                          <div class="button">
                              <h:commandLink action="#{search.prevPage}" rendered="#{!search.firstPage}">
                                  <img src="img/arrow-l.png" />
                              </h:commandLink>
                              &#160;
                          </div>
                      </div>
                      
                      <div class="message">#{messages.searchResultsHeader}</div>
                  </div>
                  
                  <h:dataTable value="#{searchResults}" 
                               var="product" 
                               styleClass="dvdtable" 
                               headerClass="dvdtablehead"
                               rowClasses="results"
                               columnClasses="dvdtablecol">
                      <h:column>
                          <f:facet name="header">
                              <h:outputText value="#{messages.searchResultsAdd}" />
                          </f:facet>
                          <h:selectBooleanCheckbox value="#{searchSelections[product]}"/>
                      </h:column>
                      <h:column>
                          <f:facet name="header">
                              <h:outputText value="#{messages.searchResultsTitle}" />
                          </f:facet>
                          
                          <s:link view="/dvd.xhtml" value="#{product.title}">
                              <f:param name="id" value="#{product.productId}"/>
                          </s:link>
                      </h:column>                        
                      
                      <h:column>
                          <f:facet name="header">
                              <h:outputText value="Starring" />
                          </f:facet>
                          <h:outputText value="#{product.actors[0].name}" />
                      </h:column>                        
                      
                      <h:column>
                          <f:facet name="header">
                              <h:outputText value="#{messages.searchResultsPrice}" />
                          </f:facet>
                          <h:outputText value="#{product.price}">
                              <f:convertNumber type="currency" currencySymbol="$" />
                          </h:outputText>
                      </h:column>                        
                  </h:dataTable>
                  
                  <h:commandButton action="#{search.addAllToCart}" 
                                   value="#{messages.searchUpdateButton}"/>
                  
              </h:form>        
          </ui:define>
      </ui:composition>
  </body>
  </html>
  
  
  
  
  
  
  



More information about the jboss-cvs-commits mailing list