[jboss-cvs] jboss-seam/examples/booking/view ...
Gavin King
gavin.king at jboss.com
Sun Mar 18 15:21:27 EDT 2007
User: gavin
Date: 07/03/18 15:21:27
Modified: examples/booking/view book.xhtml register.xhtml
Log:
use s:decorateAll
Revision Changes Path
1.33 +80 -109 jboss-seam/examples/booking/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/booking/view/book.xhtml,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- book.xhtml 22 Feb 2007 01:48:38 -0000 1.32
+++ book.xhtml 18 Mar 2007 19:21:27 -0000 1.33
@@ -46,20 +46,20 @@
</div>
<s:validateAll>
+ <s:decorateAll rowClass="entry"
+ labelColumnClass="label"
+ fieldColumnClass="input"
+ messageColumnClass="errors">
<f:facet name="aroundInvalidField">
<s:span styleClass="errors"/>
</f:facet>
- <f:facet name="afterInvalidField">
- <s:div styleClass="errors">
+ <f:facet name="message">
<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 id="checkinDateDecorate">
+ <f:facet name="label">Check In Date:</f:facet>
<h:inputText id="checkinDate" value="#{booking.checkinDate}" required="true">
<s:convertDateTime pattern="MM/dd/yyyy"/>
<a:support event="onblur" reRender="checkinDateDecorate"/>
@@ -68,13 +68,9 @@
<h:graphicImage url="img/dtpick.gif" style="margin-left:5px;cursor:pointer"/>
</s:selectDate>
</s:decorate>
- </div>
- </div>
- <div class="entry">
- <div class="label"><h:outputLabel for="checkoutDate">Check Out Date:</h:outputLabel></div>
- <div class="input">
<s:decorate id="checkoutDateDecorate">
+ <f:facet name="label">Check Out Date:</f:facet>
<h:inputText id="checkoutDate" value="#{booking.checkoutDate}" required="true">
<s:convertDateTime pattern="MM/dd/yyyy"/>
<a:support event="onblur" reRender="checkoutDateDecorate"/>
@@ -83,60 +79,36 @@
<h:graphicImage url="img/dtpick.gif" style="margin-left:5px;cursor:pointer"/>
</s:selectDate>
</s:decorate>
- </div>
- </div>
- <div class="entry">
- <div class="label"><h:outputLabel for="beds">Room Preference:</h:outputLabel></div>
- <div class="input">
- <s:decorate>
<h:selectOneMenu id="beds" value="#{booking.beds}">
+ <f:facet name="label">Room Preference:</f:facet>
<f:selectItem itemLabel="One king-size bed" itemValue="1"/>
<f:selectItem itemLabel="Two double beds" itemValue="2"/>
<f:selectItem itemLabel="Three beds" itemValue="3"/>
</h:selectOneMenu>
- </s:decorate>
- </div>
- </div>
- <div class="entry">
- <div class="label"><h:outputLabel for="smoking">Smoking Preference:</h:outputLabel></div>
- <div id="radio" class="input">
- <s:decorate>
- <h:selectOneRadio id="smoking" value="#{booking.smoking}" layout="pageDirection">
+ <h:selectOneRadio id="smoking" value="#{booking.smoking}" layout="pageDirection" styleClass="radio">
+ <f:facet name="label">Smoking Preference:</f:facet>
<f:selectItem itemLabel="Smoking" itemValue="true"/>
<f:selectItem itemLabel="Non Smoking" itemValue="false"/>
</h:selectOneRadio>
- </s:decorate>
- </div>
- </div>
- <div class="entry">
- <div class="label"><h:outputLabel for="creditCard">Credit Card #:</h:outputLabel></div>
- <div class="input">
<s:decorate id="creditCardDecorate">
+ <f:facet name="label">Credit Card #:</f:facet>
<h:inputText id="creditCard" value="#{booking.creditCard}" required="true">
<a:support event="onblur" reRender="creditCardDecorate"/>
</h:inputText>
</s:decorate>
- </div>
- </div>
- <div class="entry">
- <div class="label"><h:outputLabel for="creditCardName">Credit Card Name:</h:outputLabel></div>
- <div class="input">
<s:decorate id="creditCardNameDecorate">
+ <f:facet name="label">Credit Card Name:</f:facet>
<h:inputText id="creditCardName" value="#{booking.creditCardName}" required="true">
<a:support event="onblur" reRender="creditCardNameDecorate"/>
</h:inputText>
</s:decorate>
- </div>
- </div>
- <div class="entry">
- <div class="label"><h:outputLabel for="creditCardExpiryMonth">Credit Card Expiry:</h:outputLabel></div>
- <div class="input">
- <s:decorate>
+ <s:decorate id="creditCardExpiryDecorate">
+ <f:facet name="label">Credit Card Expiry:</f:facet>
<h:selectOneMenu id="creditCardExpiryMonth" value="#{booking.creditCardExpiryMonth}">
<f:selectItem itemLabel="Jan" itemValue="1"/>
<f:selectItem itemLabel="Feb" itemValue="2"/>
@@ -159,9 +131,8 @@
<f:selectItem itemLabel="2009" itemValue="2009"/>
</h:selectOneMenu>
</s:decorate>
- </div>
- </div>
+ </s:decorateAll>
</s:validateAll>
<div class="entry errors">
1.22 +25 -38 jboss-seam/examples/booking/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/booking/view/register.xhtml,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- register.xhtml 17 Feb 2007 02:56:46 -0000 1.21
+++ register.xhtml 18 Mar 2007 19:21:27 -0000 1.22
@@ -43,56 +43,43 @@
<fieldset>
<s:validateAll>
+ <s:decorateAll rowClass="entry"
+ labelColumnClass="label"
+ fieldColumnClass="input"
+ messageColumnClass="errors">
<f:facet name="aroundInvalidField">
<s:span styleClass="errors"/>
</f:facet>
- <f:facet name="afterInvalidField">
+ <f:facet name="message">
<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 id="usernameDecorate">
+ <f:facet name="label">Username:</f:facet>
<h:inputText id="username" value="#{user.username}" required="true">
<a:support event="onblur" reRender="usernameDecorate"/>
</h:inputText>
</s:decorate>
- </div>
- </div>
- <div class="entry">
- <div class="label"><h:outputLabel for="name">Real Name:</h:outputLabel></div>
- <div class="input">
<s:decorate id="nameDecorate">
+ <f:facet name="label">Real Name:</f:facet>
<h:inputText id="name" value="#{user.name}" required="true">
<a:support event="onblur" reRender="nameDecorate"/>
</h:inputText>
</s:decorate>
- </div>
- </div>
- <div class="entry">
- <div class="label"><h:outputLabel for="password">Password:</h:outputLabel></div>
- <div class="input">
- <s:decorate>
- <h:inputSecret id="password" value="#{user.password}" required="true"/>
- </s:decorate>
- </div>
- </div>
-
- <div class="entry">
- <div class="label"><h:outputLabel for="verify">Verify Password:</h:outputLabel></div>
- <div class="input">
- <s:decorate>
- <h:inputSecret id="verify" value="#{register.verify}" required="true"/>
- </s:decorate>
- </div>
- </div>
+ <h:inputSecret id="password" value="#{user.password}" required="true">
+ <f:facet name="label">Password:</f:facet>
+ </h:inputSecret>
+
+ <h:inputSecret id="verify" value="#{register.verify}" required="true">
+ <f:facet name="label">Verify Password:</f:facet>
+ </h:inputSecret>
+ </s:decorateAll>
</s:validateAll>
<div class="entry errors">
More information about the jboss-cvs-commits
mailing list