[jboss-cvs] jboss-seam/examples/blog/view ...
Gavin King
gavin.king at jboss.com
Sun Oct 1 21:02:43 EDT 2006
User: gavin
Date: 06/10/01 21:02:43
Modified: examples/blog/view post.xhtml screen.css
Log:
demo s:decorate
Revision Changes Path
1.7 +41 -33 jboss-seam/examples/blog/view/post.xhtml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: post.xhtml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/blog/view/post.xhtml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- post.xhtml 30 Sep 2006 19:59:34 -0000 1.6
+++ post.xhtml 2 Oct 2006 01:02:43 -0000 1.7
@@ -10,39 +10,47 @@
<ui:define name="content">
<div class="blogEntry">
<h:form>
+ <s:decorations>
+ <f:facet name="afterInvalidField"><s:message/></f:facet>
+ <f:facet name="aroundInvalidField"><s:span styleClass="errors"/></f:facet>
<s:validateAll>
<div>
<h:outputLabel for="id">Id: </h:outputLabel>
</div>
<div class="hilite">
- <h:inputText id="id" value="#{blogEntry.id}" size="20" maxlength="20" required="true"/>
- <span class="errors"><h:message for="id"/></span>
+ <s:decorate>
+ <h:inputText value="#{blogEntry.id}" size="20" maxlength="20" required="true"/>
+ </s:decorate>
</div>
<div>
<h:outputLabel for="title">Title: </h:outputLabel>
</div>
<div class="hilite">
- <h:inputText id="title" value="#{blogEntry.title}" size="70" maxlength="70" required="true"/>
- <span class="errors"><h:message for="title"/></span>
+ <s:decorate>
+ <h:inputText value="#{blogEntry.title}" size="70" maxlength="70" required="true"/>
+ </s:decorate>
</div>
<div>
<h:outputLabel for="excerpt">Excerpt (optional): </h:outputLabel>
</div>
<div class="hilite">
- <h:inputTextarea id="excerpt" value="#{blogEntry.excerpt}" cols="68" rows="3"/>
- <span class="errors"><h:message for="excerpt"/></span>
+ <s:decorate>
+ <h:inputTextarea value="#{blogEntry.excerpt}" cols="68" rows="3"/>
+ </s:decorate>
</div>
<div>
<h:outputLabel for="body">Body text: </h:outputLabel>
</div>
<div class="hilite">
- <h:inputTextarea id="body" value="#{blogEntry.body}" cols="68" rows="20" required="true"/>
- <span class="errors"><h:message for="body"/></span>
+ <s:decorate>
+ <h:inputTextarea value="#{blogEntry.body}" cols="68" rows="20" required="true"/>
+ </s:decorate>
</div>
<div>
<h:commandButton value="Post" action="#{postAction.post}"/>
</div>
</s:validateAll>
+ </s:decorations>
</h:form>
</div>
</ui:define>
1.4 +10 -0 jboss-seam/examples/blog/view/screen.css
(In the diff below, changes in quantity of whitespace are not shown.)
Index: screen.css
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/blog/view/screen.css,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- screen.css 16 Apr 2006 14:32:14 -0000 1.3
+++ screen.css 2 Oct 2006 01:02:43 -0000 1.4
@@ -66,3 +66,13 @@
.blogEntry {
margin-top: 20px;
}
\ No newline at end of file
+.errors {
+ color: red;
+}
+.errors input {
+ color: red;
+ border: 1px solid red;
+}
+.errors textarea {
+ border: 1px solid red;
+}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list