[jboss-cvs] jboss-seam/examples/dvdstore/web/WEB-INF/incl ...
Norman Richards
norman.richards at jboss.com
Thu Mar 22 15:39:31 EDT 2007
User: nrichards
Date: 07/03/22 15:39:31
Modified: examples/dvdstore/web/WEB-INF/incl login.xhtml
processmenu.xhtml stats.xhtml
Log:
fix security issues, clean up navigation and security, introduce framework
Revision Changes Path
1.9 +42 -51 jboss-seam/examples/dvdstore/web/WEB-INF/incl/login.xhtml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: login.xhtml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/dvdstore/web/WEB-INF/incl/login.xhtml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- login.xhtml 15 Feb 2007 03:11:30 -0000 1.8
+++ login.xhtml 22 Mar 2007 19:39:31 -0000 1.9
@@ -1,13 +1,11 @@
-<c:choose xmlns="http://www.w3.org/1999/xhtml"
+<div class="menu"
+ xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:c="http://java.sun.com/jstl/core">
+ xmlns:h="http://java.sun.com/jsf/html">
- <c:when test="#{not identity.loggedIn}">
- <div class="menu">
- <h:form>
+ <h:form rendered="#{not identity.loggedIn}">
<dl>
<dt class="menuHeader">#{messages.loginPagePrompt}</dt>
<dd class="menuForm">
@@ -31,15 +29,11 @@
</dt>
</dl>
</h:form>
- </div>
- </c:when>
- <c:otherwise>
- <div class="menu">
+ <h:form rendered="#{identity.loggedIn}">
<dl>
<dt class="menuHeader">Welcome, #{currentUser.firstName}</dt>
<dd class="menuForm">
- <h:form>
<dl>
<dd>Thank you for choosing the DVD Store</dd>
<dd>
@@ -47,10 +41,7 @@
styleClass="formButton" style="width: 166px;"/>
</dd>
</dl>
- </h:form>
</dd>
</dl>
- </div>
- </c:otherwise>
-
-</c:choose>
+ </h:form>
+</div>
1.11 +2 -1 jboss-seam/examples/dvdstore/web/WEB-INF/incl/processmenu.xhtml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: processmenu.xhtml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/dvdstore/web/WEB-INF/incl/processmenu.xhtml,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- processmenu.xhtml 22 Feb 2007 06:03:49 -0000 1.10
+++ processmenu.xhtml 22 Mar 2007 19:39:31 -0000 1.11
@@ -1,5 +1,6 @@
-<f:subview rendered="#{currentUser.admin}"
+<f:subview rendered="#{s:hasRole('admin')}"
xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
1.7 +2 -1 jboss-seam/examples/dvdstore/web/WEB-INF/incl/stats.xhtml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: stats.xhtml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/dvdstore/web/WEB-INF/incl/stats.xhtml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- stats.xhtml 22 Feb 2007 06:03:49 -0000 1.6
+++ stats.xhtml 22 Mar 2007 19:39:31 -0000 1.7
@@ -1,5 +1,6 @@
-<f:subview rendered="#{currentUser.admin}"
+<f:subview rendered="#{s:hasRole('admin')}"
xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
More information about the jboss-cvs-commits
mailing list