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

Michael Yuan michael.yuan at jboss.com
Mon Feb 26 18:39:45 EST 2007


  User: myuan   
  Date: 07/02/26 18:39:45

  Modified:    examples/hibernate2/view   book.xhtml register.xhtml
  Log:
  patch the example
  
  Revision  Changes    Path
  1.10      +16 -22    jboss-seam/examples/hibernate2/view/book.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: book.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/hibernate2/view/book.xhtml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -b -r1.9 -r1.10
  --- book.xhtml	22 Feb 2007 05:50:47 -0000	1.9
  +++ book.xhtml	26 Feb 2007 23:39:45 -0000	1.10
  @@ -50,20 +50,23 @@
               <f:facet name="aroundInvalidField">
                  <s:span styleClass="errors"/>
               </f:facet>
  +            <f:facet name="afterInvalidField">
  +                <s:div styleClass="errors">
  +               	    <s:message/>
  +               	</s:div>
  +            </f:facet>
   		    
   			<div class="entry">
                               <div class="label"><h:outputLabel for="checkinDate">Check In Date:</h:outputLabel></div>
                               <div class="input">
  -                                <s:decorate>
  +                                <s:decorate id="checkinDateDecorate">
                                       <h:inputText id="checkinDate" value="#{booking.checkinDate}" required="true">
                                           <s:convertDateTime pattern="MM/dd/yyyy"/>
  -                                        <a:support event="onblur" reRender="checkinDateErrors"/>
  +                                        <a:support event="onblur" reRender="checkinDateDecorate"/>
                                       </h:inputText>
                                       <s:selectDate for="checkinDate">
  -                                        <h:graphicImage url="img/dtpick.gif" style="margin-left:5px"/>
  +                                        <h:graphicImage url="img/dtpick.gif" style="margin-left:5px;cursor:pointer"/>
                                       </s:selectDate>
  -                                    <br/>
  -                                    <a:outputPanel id="checkinDateErrors"><s:message/></a:outputPanel>
                                   </s:decorate>
                               </div>
   			</div>
  @@ -71,16 +74,14 @@
   			<div class="entry">
                               <div class="label"><h:outputLabel for="checkoutDate">Check Out Date:</h:outputLabel></div>
                               <div class="input">
  -                                <s:decorate>
  +                                <s:decorate id="checkoutDateDecorate">
                                       <h:inputText id="checkoutDate" value="#{booking.checkoutDate}" required="true">
                                           <s:convertDateTime pattern="MM/dd/yyyy"/>
  -                                        <a:support event="onblur" reRender="checkoutDateErrors"/>
  +                                        <a:support event="onblur" reRender="checkoutDateDecorate"/>
                                       </h:inputText>
                                       <s:selectDate for="checkoutDate">
  -                                        <h:graphicImage url="img/dtpick.gif" style="margin-left:5px"/>
  +                                        <h:graphicImage url="img/dtpick.gif" style="margin-left:5px;cursor:pointer"/>
                                       </s:selectDate>
  -                                    <br/>
  -                                    <a:outputPanel id="checkoutDateErrors"><s:message/></a:outputPanel>
                                   </s:decorate>
                               </div>
                           </div>
  @@ -94,7 +95,6 @@
   							<f:selectItem itemLabel="Two double beds" itemValue="2"/>
   							<f:selectItem itemLabel="Three beds" itemValue="3"/>
   						</h:selectOneMenu>
  -						<br/>
   					</s:decorate>
   				</div>
   			</div>
  @@ -107,7 +107,6 @@
   							<f:selectItem itemLabel="Smoking" itemValue="true"/>
   							<f:selectItem itemLabel="Non Smoking" itemValue="false"/>
   						</h:selectOneRadio>
  -						<br/>
   					</s:decorate>
   				</div>
   			</div>
  @@ -115,12 +114,10 @@
   			<div class="entry">
   				<div class="label"><h:outputLabel for="creditCard">Credit Card #:</h:outputLabel></div>
   				<div class="input">
  -					<s:decorate>
  +					<s:decorate id="creditCardDecorate">
   						<h:inputText id="creditCard" value="#{booking.creditCard}" required="true">
  -                           <a:support event="onblur" reRender="creditCardErrors"/>
  +                           <a:support event="onblur" reRender="creditCardDecorate"/>
                           </h:inputText>
  -						<br/>
  -                        <a:outputPanel id="creditCardErrors"><s:message/></a:outputPanel>
   					</s:decorate>
   				</div>
   			</div>
  @@ -128,12 +125,10 @@
   			<div class="entry">
   				<div class="label"><h:outputLabel for="creditCardName">Credit Card Name:</h:outputLabel></div>
   				<div class="input">
  -					<s:decorate>
  +					<s:decorate id="creditCardNameDecorate">
   						<h:inputText id="creditCardName" value="#{booking.creditCardName}" required="true">
  -                           <a:support event="onblur" reRender="creditCardNameErrors"/>
  +                           <a:support event="onblur" reRender="creditCardNameDecorate"/>
                           </h:inputText>
  -						<br/>
  -                        <a:outputPanel id="creditCardNameErrors"><s:message/></a:outputPanel>
   					</s:decorate>
   				</div>
   			</div>
  @@ -163,7 +158,6 @@
   							<f:selectItem itemLabel="2008" itemValue="2008"/>
   							<f:selectItem itemLabel="2009" itemValue="2009"/>
   						</h:selectOneMenu>
  -						<br/>
   					</s:decorate>
   				</div>
   			</div>
  
  
  
  1.6       +13 -16    jboss-seam/examples/hibernate2/view/register.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: register.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/hibernate2/view/register.xhtml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- register.xhtml	10 Jan 2007 01:11:31 -0000	1.5
  +++ register.xhtml	26 Feb 2007 23:39:45 -0000	1.6
  @@ -47,16 +47,19 @@
   					    <f:facet name="aroundInvalidField">
   					       <s:span styleClass="errors"/>
   					    </f:facet>
  +                       <f:facet name="afterInvalidField">
  +                           <s:div styleClass="errors">
  +               	               <s:message/>
  +               	           </s:div>
  +                       </f:facet>
   		    
   						<div class="entry">
   							<div class="label"><h:outputLabel for="username">Username:</h:outputLabel></div>
   							<div class="input">
  -								<s:decorate>
  +								<s:decorate id="usernameDecorate">
   									<h:inputText id="username" value="#{user.username}" required="true">
  -                                        <a:support event="onblur" reRender="usernameErrors"/>
  +                                        <a:support event="onblur" reRender="usernameDecorate"/>
                                       </h:inputText>
  -                                    <br/>
  -                                    <a:outputPanel id="usernameErrors"><s:message/></a:outputPanel>
   								</s:decorate>
   							</div>
   						</div>
  @@ -64,12 +67,10 @@
   						<div class="entry">
   							<div class="label"><h:outputLabel for="name">Real Name:</h:outputLabel></div>
   							<div class="input">
  -								<s:decorate>
  +								<s:decorate id="nameDecorate">
   									<h:inputText id="name" value="#{user.name}" required="true">
  -                                        <a:support event="onblur" reRender="nameErrors"/>
  +                                        <a:support event="onblur" reRender="nameDecorate"/>
                                       </h:inputText>
  -                                    <br/>
  -                                    <a:outputPanel id="nameErrors"><s:message/></a:outputPanel>
   								</s:decorate>
   							</div>
   						</div>
  @@ -79,8 +80,6 @@
   							<div class="input">
   								<s:decorate>
   									<h:inputSecret id="password" value="#{user.password}" required="true"/>
  -                                    <br/>
  -                                    <h:message for="password"/>
   								</s:decorate>
   							</div>
   						</div>
  @@ -90,8 +89,6 @@
   							<div class="input">
   								<s:decorate>
   									<h:inputSecret id="verify" value="#{register.verify}" required="true"/>
  -                                    <br/>
  -                                    <h:message for="verify"/>
   								</s:decorate>
   							</div>
   						</div>
  
  
  



More information about the jboss-cvs-commits mailing list