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

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


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

  Added:       examples/dvdstore/view/admin      accept.xhtml ship.xhtml
                        process.xhtml index.jsp admin.xhtml
  Log:
  Move DVD to new build
  
  Revision  Changes    Path
  1.1      date: 2007/06/28 23:22:58;  author: pmuir;  state: Exp;jboss-seam/examples/dvdstore/view/admin/accept.xhtml
  
  Index: accept.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"
        xmlns:s="http://jboss.com/products/seam/taglib">
  <body>
      <ui:composition template="/WEB-INF/template.xhtml">
          <ui:define name="topnav">
              <ui:include src="/WEB-INF/incl/admin_nav.xhtml" />
          </ui:define>
  
          <ui:define name="sidebar">
              <ui:include src="/WEB-INF/incl/login.xhtml" />
              <ui:include src="/WEB-INF/incl/stats.xhtml" />
              <ui:include src="/WEB-INF/incl/processmenu.xhtml" />
          </ui:define>
          
          <ui:define name="body">
              <h1>Order Acceptance</h1>
  
              <p>Please accept or reject the order.</p>
  
              <div class="cntInfo">
                  <h:panelGrid columns="2">
                      <h:outputText value="Order" />
                      <h:outputText value="#{order.orderId}" />
                      
                      <h:outputText value="Order date:" />
                      <h:outputText value="#{order.orderDate}">
                          <s:convertDateTime type="both" dateStyle="full"/> 
                      </h:outputText>
                      
                      <h:outputText value="Net Amount:" />
                      <h:outputText value="#{order.netAmount}">
                          <f:convertNumber type="currency" currencySymbol="$" />
                      </h:outputText>
                      
                      <h:outputText value="Tax:" />
                      <h:outputText value="#{order.tax}">
                          <f:convertNumber type="currency" currencySymbol="$" />
                      </h:outputText>
                      
                      <h:outputText value="Total Amount:" />
                      <h:outputText value="#{order.totalAmount}">
                          <f:convertNumber type="currency" currencySymbol="$" />
                      </h:outputText>
                  </h:panelGrid>
                  
                  <div class="cntInfo">
                      <h:dataTable value="#{order.orderLines}" 
                                   var="item"
                                   styleClass="dvdtable" 
                                   headerClass="dvdtablehead"
                                   rowClasses="dvdtableodd,dvdtableeven"
                                   columnClasses="dvdtablecol">
                          <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>
                  </div>                
                  
                  <h:form>
                      <h:commandButton action="#{accept.reject}" value="Reject Order" /> 
                      <h:commandButton action="#{accept.accept}" value="Accept Order" /> 
                  </h:form>
              </div>
   
         </ui:define>
      </ui:composition>
  </body>
  </html>
  
  
  
  
  
  
  
  1.1      date: 2007/06/28 23:22:58;  author: pmuir;  state: Exp;jboss-seam/examples/dvdstore/view/admin/ship.xhtml
  
  Index: ship.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"
        xmlns:s="http://jboss.com/products/seam/taglib">
  <body>
      <ui:composition template="/WEB-INF/template.xhtml">
          <ui:define name="topnav">
              <ui:include src="/WEB-INF/incl/admin_nav.xhtml" />
          </ui:define>
  
          <ui:define name="sidebar">
              <ui:include src="/WEB-INF/incl/login.xhtml" />
              <ui:include src="/WEB-INF/incl/stats.xhtml" />
              <ui:include src="/WEB-INF/incl/processmenu.xhtml" />
          </ui:define>
          
          <ui:define name="body">
              <h1>Order Shipping</h1>
  
              <p>Please enter the tracking number below.</p>
  
              <div class="cntInfo">
                  <h:form>
                      <h:panelGrid columns="2">
                          <h:outputText value="Order Number:" />
                          <h:outputText value="#{order.orderId}" />
                          
                          <h:outputText value="Order date:" />
                          <h:outputText value="#{order.orderDate}">
                              <s:convertDateTime type="both" dateStyle="full"/> 
                          </h:outputText>
                          
                          <h:outputText value="Net Amount:" />
                          <h:outputText value="#{order.netAmount}">
                              <f:convertNumber type="currency" currencySymbol="$" />
                          </h:outputText>
                          
                          <h:outputText value="Tax:" />
                          <h:outputText value="#{order.tax}">
                              <f:convertNumber type="currency" currencySymbol="$" />
                          </h:outputText>
                          
                          <h:outputText value="Total Amount:" />
                          <h:outputText value="#{order.totalAmount}">
                              <f:convertNumber type="currency" currencySymbol="$" />
                          </h:outputText>
                          
                          <h:outputText value="Tracking number:" />
                          <h:panelGroup>
                              <!-- required, min length=4 -->
                              <h:inputText id="trackingNumber" value="#{ship.track}" required="true"/> 
  
                              <h:message for="trackingNumber" styleClass="cntError" />
                          </h:panelGroup>
                      </h:panelGrid>
                      
                      <div class="cntInfo">
                          <h:dataTable value="#{order.orderLines}" 
                                       var="item"
                                       styleClass="dvdtable" 
                                       headerClass="dvdtablehead"
                                       rowClasses="dvdtableodd,dvdtableeven"
                                       columnClasses="dvdtablecol">
                              <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>
                      </div>
                      <h:commandButton action="#{ship.ship}" value="Ship" /> 
                  </h:form>
              </div>
          </ui:define>
      </ui:composition>
  </body>
  </html>
  
  
  
  
  
  
  
  1.1      date: 2007/06/28 23:22:58;  author: pmuir;  state: Exp;jboss-seam/examples/dvdstore/view/admin/process.xhtml
  
  Index: process.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"
        xmlns:s="http://jboss.com/products/seam/taglib">
  <body>
      <ui:composition template="/WEB-INF/template.xhtml">
          <ui:define name="topnav">
              <ui:include src="/WEB-INF/incl/admin_nav.xhtml">
                  <ui:param name="page" value="process" />
              </ui:include>
          </ui:define>
          
          <ui:define name="sidebar">
              <ui:include src="/WEB-INF/incl/login.xhtml" />
              <ui:include src="/WEB-INF/incl/stats.xhtml" />
              <ui:include src="/WEB-INF/incl/processmenu.xhtml" />
          </ui:define>
          
          <ui:define name="body">
              <h2>Active Process Status</h2>
              
              <f:subview rendered="#{empty processInstanceList}">
                  <p>There are no active processes.</p>
              </f:subview>
                      
              <h:dataTable value="#{processInstanceList}" 
                           var="process"
                           styleClass="dvdtable"
                           headerClass="dvdtablehead"
                           rowClasses="dvdtableodd,dvdtableeven"
                           columnClasses="dvdtablecol"
                           rendered="#{not empty processInstanceList}">
                  <h:column>
                      <f:facet name="header">Process Definition</f:facet>
                      #{process.processDefinition.name}
                  </h:column>
                  <h:column>
                      <f:facet name="header">Process Start</f:facet>
                      <h:outputText value="#{process.start}">
                          <s:convertDateTime type="both"/>
                      </h:outputText>
                  </h:column>
                  <h:column>
                      <f:facet name="header">Current Node</f:facet>
                      #{process.rootToken.node.name}
                  </h:column>
                  <h:column>
                      <f:facet name="header">Current Node Enter</f:facet>
                      <h:outputText value="#{process.rootToken.nodeEnter}">
                          <s:convertDateTime type="both"/>
                      </h:outputText>
                  </h:column>
              </h:dataTable>
              
          </ui:define>
      </ui:composition>
  </body>
  </html>
  
  
  
  
  
  
  
  1.1      date: 2007/06/28 23:22:58;  author: pmuir;  state: Exp;jboss-seam/examples/dvdstore/view/admin/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:58;  author: pmuir;  state: Exp;jboss-seam/examples/dvdstore/view/admin/admin.xhtml
  
  Index: admin.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"
        xmlns:s="http://jboss.com/products/seam/taglib">
  <body>
      <ui:composition template="/WEB-INF/template.xhtml">
          <ui:define name="topnav">
              <ui:include src="/WEB-INF/incl/admin_nav.xhtml">
                  <ui:param name="page" value="admin" />
              </ui:include>
          </ui:define>
  
          <ui:define name="sidebar">
              <ui:include src="/WEB-INF/incl/login.xhtml" />
              <ui:include src="/WEB-INF/incl/stats.xhtml" />
              <ui:include src="/WEB-INF/incl/processmenu.xhtml" />
          </ui:define>
          
          <ui:define name="body">
              <h1>Order Management</h1>
              
              <p>
                  Pending orders are shown here on the order management
                  screen for the store manager to process.  Rather than
                  being data-driven, order management is process-driven.
                  A JBoss jBPM process assigns fulfillment tasks to the
                  manager based on the version of the process loaded.
                  The manager can change the version of the process at
                  any time using the admin options box to the right.  
              </p>
  
              <ul>
                  <li>
                  <a onclick="window.open('../img/ordermanagement1.html','flowimg','height=560,width=300,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'); return false;"
                     href="img/ordermanagement1.html">Order process 1</a> 
                  sends orders immediately to shipping, where the manager should ship 
                  the order and record the tracking number for the user to see.
                  </li>
                  <li>
                  <a onclick="window.open('../img/ordermanagement2.html','flowimg','height=600,width=420,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'); return false;"
                     href="img/ordermanagement2.html">Order process 2</a>
                  adds an approval step where the manager is first given the chance to 
                  approve the order before sending it to shipping.  In each case, the 
                  status of the order is shown in the customer's order list.
                  </li>
                  <li>
                  <a onclick="window.open('../img/ordermanagement3.html','flowimg','height=660,width=470,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'); return false;"
                     href="img/ordermanagement3.html">Order process 3</a> 
                  introduces a decision node.  Only orders over $100.00 need to be 
                  accepted.  Smaller orders are automatically approved for shipping.
                  </li>
              </ul>
              
              <h2>Task Assignment</h2>
  
              <f:subview rendered="#{empty pooledTaskInstanceList}">
                  <p>There are no pooled tasks to be assigned.</p>
              </f:subview>
              
              <h:dataTable rendered="#{not empty pooledTaskInstanceList}"
                           value="#{pooledTaskInstanceList}"
                           var="task" 
                           styleClass="dvdtable" 
                           headerClass="dvdtablehead"
                           rowClasses="dvdtableodd,dvdtableeven"
                           columnClasses="dvdtablecol">
                  <h:column>
                      <f:facet name="header">Order Id</f:facet>
                      #{task.variables['orderId']}
                  </h:column>
                  <h:column>
                      <f:facet name="header">Task</f:facet>
                      <h:outputText value="#{task.description}" />
                  </h:column>
                  <h:column>
                      <f:facet name="header">Order Amount</f:facet>
                      <h:outputText value="#{task.variables['amount']}">
                          <f:convertNumber type="currency" currencySymbol="$" />
                      </h:outputText>
                  </h:column>
                  <h:column>
                      <f:facet name="header">Customer</f:facet>
                      <h:outputText value="#{task.variables['customer']}" />
                  </h:column>
                  <h:column>
                      <s:button action="#{pooledTask.assignToCurrentActor}" taskInstance="#{task}"
                                value="Assign"/>
                  </h:column>
              </h:dataTable>
              
              
              <h2>Order Acceptance</h2>
              <f:subview rendered="#{empty taskInstanceListForType['approve']}">
                  <p>There are no orders to be accepted.</p>
              </f:subview>
  
              <h:dataTable rendered="#{not empty taskInstanceListForType['approve']}"
                           value="#{taskInstanceListForType['approve']}"
                           var="task" 
                           styleClass="dvdtable" 
                           headerClass="dvdtablehead"
                           rowClasses="dvdtableodd,dvdtableeven"
                           columnClasses="dvdtablecol">
                  <h:column>
                      <f:facet name="header">Order Id</f:facet>
                      #{task.variables['orderId']}
                  </h:column>
                  <h:column>
                      <f:facet name="header">Order Amount</f:facet>
                      <h:outputText value="#{task.variables['amount']}">
                          <f:convertNumber type="currency" currencySymbol="$" />
                      </h:outputText>
                  </h:column>
                  <h:column>
                      <f:facet name="header">Customer</f:facet>
                      <h:outputText value="#{task.variables['customer']}" />
                  </h:column>
                  <h:column>
                      <s:button action="#{accept.viewTask}" taskInstance="#{task}" 
                                value="Review"/>
                  </h:column>
              </h:dataTable>
              
              <h2>Shipping</h2>
              <f:subview rendered="#{empty taskInstanceListForType['ship']}">
                  <p>There are no orders to be shipped.</p>
              </f:subview>
              <h:dataTable rendered="#{not empty taskInstanceListForType['ship']}"
                           value="#{taskInstanceListForType['ship']}"
                           var="task" 
                           styleClass="dvdtable" 
                           headerClass="dvdtablehead"
                           rowClasses="dvdtableodd,dvdtableeven"
                           columnClasses="dvdtablecol">
                  <h:column>
                      <f:facet name="header">Order Id</f:facet>
                      #{task.variables['orderId']}
                  </h:column>
                  <h:column>
                      <f:facet name="header">Order Amount</f:facet>
                      <h:outputText value="#{task.variables['amount']}">
                          <f:convertNumber type="currency" currencySymbol="$" />
                      </h:outputText>
                  </h:column>
                  <h:column>
                      <f:facet name="header">Customer</f:facet>
                      <h:outputText value="#{task.variables['customer']}" />
                  </h:column>
                  <h:column>
                      <s:button action="#{ship.viewTask}" taskInstance="#{task}" 
                                value="Ship"/>
                  </h:column>               
              </h:dataTable>
          </ui:define>
      </ui:composition>
  </body>
  </html>
  
  
  
  
  
  
  



More information about the jboss-cvs-commits mailing list