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

Michael Yuan michael.yuan at jboss.com
Mon Feb 26 04:43:28 EST 2007


  User: myuan   
  Date: 07/02/26 04:43:28

  Modified:    examples/glassfish/view    book.xhtml home.xhtml
                        register.xhtml
  Log:
  Works with the security model. But uses "org.jboss.seam.security.identity" instead of "identity"
  
  Revision  Changes    Path
  1.6       +16 -22    jboss-seam/examples/glassfish/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/glassfish/view/book.xhtml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- book.xhtml	22 Feb 2007 05:50:39 -0000	1.5
  +++ book.xhtml	26 Feb 2007 09:43:28 -0000	1.6
  @@ -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.4       +3 -3      jboss-seam/examples/glassfish/view/home.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: home.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/glassfish/view/home.xhtml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- home.xhtml	15 Feb 2007 07:46:32 -0000	1.3
  +++ home.xhtml	26 Feb 2007 09:43:28 -0000	1.4
  @@ -21,15 +21,15 @@
   			<fieldset>
   				<div>
   					<h:outputLabel for="username">Login Name</h:outputLabel>
  -					<h:inputText id="username" value="#{identity.username}" style="width: 175px;"/>
  +					<h:inputText id="username" value="#{org.jboss.seam.security.identity.username}" style="width: 175px;"/>
   					<div class="errors"><h:message for="username"/></div>
   				</div>
   				<div>
   					<h:outputLabel for="password">Password</h:outputLabel>
  -					<h:inputSecret id="password" value="#{identity.password}" style="width: 175px;"/>
  +					<h:inputSecret id="password" value="#{org.jboss.seam.security.identity.password}" style="width: 175px;"/>
   				</div>
   				<div class="errors"><h:messages globalOnly="true"/></div>
  -				<div class="buttonBox"><h:commandButton id="login" action="#{identity.login}" value="Account Login"/></div>
  +				<div class="buttonBox"><h:commandButton id="login" action="#{org.jboss.seam.security.identity.login}" value="Account Login"/></div>
   				<div class="notes"><s:link id="register" view="/register.xhtml" value="Register New User"/></div>
   			</fieldset>
               </h:form>
  
  
  
  1.3       +13 -16    jboss-seam/examples/glassfish/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/glassfish/view/register.xhtml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- register.xhtml	9 Jan 2007 09:12:11 -0000	1.2
  +++ register.xhtml	26 Feb 2007 09:43:28 -0000	1.3
  @@ -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