[jboss-cvs] jboss-seam/examples/registration/view    ...
    Gavin King 
    gavin.king at jboss.com
       
    Wed Sep 27 00:11:03 EDT 2006
    
    
  
  User: gavin   
  Date: 06/09/27 00:11:03
  Added:       examples/registration/view    editContact.xhtml search.xhtml
                        viewContact.xhtml
  Log:
  major work on crud example
  
  Revision  Changes    Path
  1.1      date: 2006/09/27 04:11:03;  author: gavin;  state: Exp;jboss-seam/examples/registration/view/editContact.xhtml
  
  Index: editContact.xhtml
  ===================================================================
  <!DOCTYPE composition 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:h="http://java.sun.com/jsf/html"
  	  			xmlns:f="http://java.sun.com/jsf/core"
  	  			xmlns:s="http://jboss.com/products/seam/taglib"
  				template="template.xhtml">
    <head>
  	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      <title>Edit Contact</title>
    </head>
    <body>
    
      <h:form>
      
      <h:messages/>
      
      <table>
        <tr>
          <td>First Name</td>
          <td><h:inputText value="#{contact.firstName}"/></td>
        </tr>
        <tr>
          <td>Last Name</td>
          <td><h:inputText value="#{contact.lastName}"/></td>
        </tr>
        <tr>
          <td>Cell Phone</td>
          <td><h:inputText value="#{contact.cellPhone}"/></td>
        </tr>
        <tr>
          <td>Home Phone</td>
          <td><h:inputText value="#{contact.homePhone}"/></td>
        </tr>
        <tr>
          <td>Address</td>
          <td><h:inputText value="#{contact.address}"/></td>
        </tr>
        <tr>
          <td>City</td>
          <td><h:inputText value="#{contact.city}"/></td>
        </tr>
        <tr>
          <td>State</td>
          <td><h:inputText value="#{contact.state}"/></td>
        </tr>
        <tr>
          <td>Zip</td>
          <td><h:inputText value="#{contact.zip}"/></td>
        </tr>
        <tr>
          <td>Country</td>
          <td><h:inputText value="#{contact.country}"/></td>
        </tr>
      </table>
      
      <h:commandLink action="/viewContact.xhtml" value="Update Contact" rendered="#{contactActions.managed}">
        <f:param name="contactId" value="#{contact.id}"/>
      </h:commandLink>
        
      <h:commandLink action="#{contactActions.persist}" value="Create New Contact" rendered="#{!contactActions.managed}"/>
        
      <h:commandLink action="#{contactActions.remove}" value="Delete Contact" rendered="#{contactActions.managed}"/>
        
      <s:link view="/viewContact.xhtml" value="Cancel"/>
      
      </h:form>
     
    </body>
  </html>
  
  
  
  1.1      date: 2006/09/27 04:11:03;  author: gavin;  state: Exp;jboss-seam/examples/registration/view/search.xhtml
  
  Index: search.xhtml
  ===================================================================
  <!DOCTYPE composition 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:h="http://java.sun.com/jsf/html"
  	  			xmlns:f="http://java.sun.com/jsf/core"
  	  			xmlns:s="http://jboss.com/products/seam/taglib"
  				template="template.xhtml">
    <head>
  	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      <title>Contact List</title>
    </head>
    <body>
      <h:form>
         First Name: <h:inputText value="#{exampleContact.firstName}"/>
         Last Name : <h:inputText value="#{exampleContact.lastName}"/>
         <h:commandButton value="Search" action="/search.xhtml"/>
      <table>
        <tr>
          <th>Name</th>
          <th>Cell Phone</th>
          <th>Home Phone</th>
          <th>Address</th>
          <th>City</th>
          <th>State</th>
          <th>Zip</th>
          <th>Country</th>
        </tr>
        <ui:repeat value="#{contacts.resultList}" var="cont">
          <tr>
            <td>
              <s:link view="/viewContact.xhtml" value="#{cont.firstName} #{cont.lastName}">
                <f:param name="contactId" value="#{cont.id}"/>
              </s:link>
            </td>
            <td>#{cont.cellPhone}</td>
            <td>#{cont.homePhone}</td>
            <td>#{cont.address}</td>
            <td>#{cont.city}</td>
            <td>#{cont.state}</td>
            <td>#{cont.zip}</td>
            <td>#{cont.country}</td>
          </tr>
        </ui:repeat>
      </table>
      </h:form>
      
      <s:link view="/search.xhtml" rendered="#{contacts.previousExists}" value="<<">
        <f:param name="firstResult" value="0"/>
      </s:link>
      <h:outputText rendered="#{!contacts.previousExists}" value="<<"/>
       
      <s:link view="/search.xhtml" rendered="#{contacts.previousExists}" value="<">
        <f:param name="firstResult" value="#{contacts.previousFirstResult}"/>
      </s:link>
      <h:outputText rendered="#{!contacts.previousExists}" value="<"/>
       
      <s:link view="/search.xhtml" rendered="#{contacts.nextExists}" value=">">
        <f:param name="firstResult" value="#{contacts.nextFirstResult}"/>
      </s:link>
      <h:outputText rendered="#{!contacts.nextExists}" value=">"/>
      
    </body>
  </html>
  
  
  
  1.1      date: 2006/09/27 04:11:03;  author: gavin;  state: Exp;jboss-seam/examples/registration/view/viewContact.xhtml
  
  Index: viewContact.xhtml
  ===================================================================
  <!DOCTYPE composition 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:h="http://java.sun.com/jsf/html"
  	  			xmlns:f="http://java.sun.com/jsf/core"
  	  			xmlns:s="http://jboss.com/products/seam/taglib"
  				template="template.xhtml">
    <head>
  	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      <title>View Contact</title>
    </head>
    <body>
    
      <table>
        <tr>
          <td>First Name</td>
          <td>#{contact.firstName}</td>
        </tr>
        <tr>
          <td>Last Name</td>
          <td>#{contact.lastName}</td>
        </tr>
        <tr>
          <td>Cell Phone</td>
          <td>#{contact.cellPhone}</td>
        </tr>
        <tr>
          <td>Home Phone</td>
          <td>#{contact.homePhone}</td>
        </tr>
        <tr>
          <td>Address</td>
          <td>#{contact.address}</td>
        </tr>
        <tr>
          <td>City</td>
          <td>#{contact.city}</td>
        </tr>
        <tr>
          <td>State</td>
          <td>#{contact.state}</td>
        </tr>
        <tr>
          <td>Zip</td>
          <td>#{contact.zip}</td>
        </tr>
        <tr>
          <td>Country</td>
          <td>#{contact.country}</td>
        </tr>
      </table>
      
      <s:link view="/editContact.xhtml" value="Edit Contact"/>
        
      <s:link view="/search.xhtml" value="Search Contacts"/>
    </body>
  </html>
  
  
  
    
    
More information about the jboss-cvs-commits
mailing list