Author: shane.bryzak(a)jboss.com
Date: 2010-07-22 01:35:50 -0400 (Thu, 22 Jul 2010)
New Revision: 13467
Added:
modules/security/trunk/examples/idmconsole/src/main/webapp/changepassword.xhtml
Modified:
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/faces-config.xml
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/templates/default.xhtml
modules/security/trunk/examples/idmconsole/src/main/webapp/menu.xhtml
modules/security/trunk/examples/idmconsole/src/main/webapp/style/default.css
Log:
added change password view
Modified:
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/faces-config.xml 2010-07-21
23:49:42 UTC (rev 13466)
+++
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/faces-config.xml 2010-07-22
05:35:50 UTC (rev 13467)
@@ -88,6 +88,25 @@
</navigation-case>
</navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/changepassword.xhtml</from-view-id>
+
+ <navigation-case>
+ <from-action>#{changePasswordAction.changePassword}</from-action>
+ <from-outcome>success</from-outcome>
+ <if>#{true}</if>
+ <to-view-id>/home.xhtml</to-view-id>
+ <redirect />
+ </navigation-case>
+
+ <navigation-case>
+ <from-outcome>cancel</from-outcome>
+ <to-view-id>/home.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ </navigation-rule>
</faces-config>
Modified:
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/templates/default.xhtml
===================================================================
---
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/templates/default.xhtml 2010-07-21
23:49:42 UTC (rev 13466)
+++
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/templates/default.xhtml 2010-07-22
05:35:50 UTC (rev 13467)
@@ -14,6 +14,16 @@
<div id="title">
Identity Management Console
</div>
+
+ <div id="headerMenu">
+ <h:form>
+ <ui:fragment rendered="#{identity.loggedIn}">
+ Welcome, #{identity.user.id}!<br/>
+ <a href="changepassword.jsf">Change
password</a><span> | </span>
+ <h:commandLink value="Log out"
action="#{identity.logout}"/>
+ </ui:fragment>
+ </h:form>
+ </div>
</div>
<div id="sidebar">
Added: modules/security/trunk/examples/idmconsole/src/main/webapp/changepassword.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/changepassword.xhtml
(rev 0)
+++
modules/security/trunk/examples/idmconsole/src/main/webapp/changepassword.xhtml 2010-07-22
05:35:50 UTC (rev 13467)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+ template="/WEB-INF/templates/default.xhtml">
+
+ <ui:define name="sidebar">
+ <ui:include src="menu.xhtml"/>
+ </ui:define>
+
+ <ui:define name="content">
+
+ <div id="contentMain">
+
+ <h2>Change password</h2>
+
+ <h:messages globalOnly="true"/>
+
+ <h:form id="changepassword">
+
+ <div class="formRow">
+ <h:outputLabel for="oldPassword" value="Old Password"
styleClass="formLabel"/>
+ <h:inputSecret id="oldPassword"
value="#{changePasswordAction.oldPassword}"/>
+ <div class="validationError"><h:message
for="oldPassword"/></div>
+ </div>
+
+ <div class="formRow">
+ <h:outputLabel for="newPassword" value="New Password"
styleClass="formLabel"/>
+ <h:inputSecret id="newPassword"
value="#{changePasswordAction.newPassword}"/>
+ <div class="validationError"><h:message
for="newPassword"/></div>
+ </div>
+
+ <div class="formRow">
+ <h:outputLabel for="confirmPassword" value="Confirm new
password" styleClass="formLabel"/>
+ <h:inputSecret id="confirmPassword"
value="#{changePasswordAction.confirmPassword}"/>
+ </div>
+
+ <div class="formButtons">
+ <h:commandButton id="save" value="Change Password"
action="#{changePasswordAction.changePassword}"
styleClass="formButton"/>
+ <h:button id="cancel" value="Cancel"
outcome="cancel" styleClass="formButton"/>
+ </div>
+
+ <br class="clear"/>
+
+ </h:form>
+
+ </div>
+
+ </ui:define>
+
+</ui:composition>
+
Modified: modules/security/trunk/examples/idmconsole/src/main/webapp/menu.xhtml
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/webapp/menu.xhtml 2010-07-21
23:49:42 UTC (rev 13466)
+++ modules/security/trunk/examples/idmconsole/src/main/webapp/menu.xhtml 2010-07-22
05:35:50 UTC (rev 13467)
@@ -3,8 +3,12 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
-
+
<ui:composition>
+
+ <div class="menuitem">
+ <a href="home.jsf">Home</a>
+ </div>
<div class="menuitem">
<a href="manageusers.jsf">Manage users</a>
@@ -17,7 +21,7 @@
<div class="menuitem">
<a href="manageroletypes.jsf">Manage role types</a>
</div>
-
- </ui:composition>
-
+
+ </ui:composition>
+
</html>
Modified: modules/security/trunk/examples/idmconsole/src/main/webapp/style/default.css
===================================================================
---
modules/security/trunk/examples/idmconsole/src/main/webapp/style/default.css 2010-07-21
23:49:42 UTC (rev 13466)
+++
modules/security/trunk/examples/idmconsole/src/main/webapp/style/default.css 2010-07-22
05:35:50 UTC (rev 13467)
@@ -11,6 +11,10 @@
background-color: #eeeeee;
}
+div#headerMenu {
+ float: right;
+}
+
div#title {
padding-top: 22px;
font-size: 22px;