Author: emuckenhuber
Date: 2007-09-21 04:18:57 -0400 (Fri, 21 Sep 2007)
New Revision: 8394
Modified:
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/MetaDataServiceBean.java
trunk/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/assignRoles.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/editProfile.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/editRole.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/roleMembers.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/changePassword.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/resetPassword.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/viewProfile.xhtml
Log:
- minor user interface updates
Modified:
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java 2007-09-21
08:12:34 UTC (rev 8393)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java 2007-09-21
08:18:57 UTC (rev 8394)
@@ -223,27 +223,16 @@
catch (RuntimeException e)
{
ResourceBundle bundle =
ResourceBundle.getBundle("conf.bundles.Identity",
ctx.getViewRoot().getLocale());
- FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage(bundle.getString("IDENTITY_EDIT_PROFILE_ERROR")));
+ FacesContext.getCurrentInstance().addMessage("status", new
FacesMessage(bundle.getString("IDENTITY_EDIT_PROFILE_ERROR")));
log.error("",e);
}
catch (IdentityException e)
{
ResourceBundle bundle =
ResourceBundle.getBundle("conf.bundles.Identity",
ctx.getViewRoot().getLocale());
- FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage(bundle.getString("IDENTITY_EDIT_PROFILE_ERROR")));
+ FacesContext.getCurrentInstance().addMessage("status", new
FacesMessage(bundle.getString("IDENTITY_EDIT_PROFILE_ERROR")));
log.error("",e);
}
- if ( windowState != null)
- {
- try
- {
- JBossActionResponse response = (JBossActionResponse)
ctx.getExternalContext().getResponse();
- response.setWindowState(windowState);
- }
- catch(WindowStateException e)
- {
- log.error("", e);
- }
- }
+ this.resetWindowState(ctx);
return "start";
}
@@ -257,18 +246,19 @@
{
// Update password
this.identityUserBean.updatePassword(this.currentUser, this.password);
- ctx.addMessage(null, new
FacesMessage(bundle.getString("IDENTITY_EDIT_CHANGE_PASSWOR_STATUS")));
+ ctx.addMessage("status", new
FacesMessage(bundle.getString("IDENTITY_EDIT_CHANGE_PASSWOR_STATUS")));
}
catch (Exception e)
{
log.error("error while updating password", e);
- ctx.addMessage(null, new
FacesMessage(bundle.getString("IDENTITY_EDIT_CHANGE_PASSWORD_ERROR")));
+ ctx.addMessage("status", new
FacesMessage(bundle.getString("IDENTITY_EDIT_CHANGE_PASSWORD_ERROR")));
}
}
else
{
- ctx.addMessage(null, new
FacesMessage(bundle.getString("IDENTITY_EDIT_CHANGE_PASSWORD_ERROR")));
+ ctx.addMessage("status", new
FacesMessage(bundle.getString("IDENTITY_EDIT_CHANGE_PASSWORD_ERROR")));
}
+ this.resetWindowState(ctx);
return "status";
}
@@ -298,22 +288,39 @@
String validationStatus = this.validateEmailService.changeEmail(portalURL,
user, email, locale);
if (IdentityConstants.REGISTRATION_PENDING.equals(validationStatus))
{
- ctx.addMessage(null, new
FacesMessage(bundle.getString("IDENTITY_EDIT_CHANGE_EMAIL_STATUS_PENDING")));
+ ctx.addMessage("status", new
FacesMessage(bundle.getString("IDENTITY_EDIT_CHANGE_EMAIL_STATUS_PENDING")));
}
else
{
- ctx.addMessage(null, new
FacesMessage(bundle.getString("IDENTITY_EDIT_CHANGE_EMAIL_STATUS_CHANGED")));
+ ctx.addMessage("status", new
FacesMessage(bundle.getString("IDENTITY_EDIT_CHANGE_EMAIL_STATUS_CHANGED")));
}
}
catch (Exception e)
{
log.error("error while changing email", e);
- ctx.addMessage(null, new
FacesMessage(bundle.getString("IDENTITY_EDIT_CHANGE_EMAIL_ERROR")));
+ ctx.addMessage("status", new
FacesMessage(bundle.getString("IDENTITY_EDIT_CHANGE_EMAIL_ERROR")));
}
}
+ this.resetWindowState(ctx);
return "status";
}
+ private void resetWindowState(FacesContext ctx)
+ {
+ if ( windowState != null)
+ {
+ try
+ {
+ JBossActionResponse response = (JBossActionResponse)
ctx.getExternalContext().getResponse();
+ response.setWindowState(windowState);
+ }
+ catch(WindowStateException e)
+ {
+ log.error("", e);
+ }
+ }
+ }
+
private String getPortalURL()
{
ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext();
Modified:
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/MetaDataServiceBean.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/MetaDataServiceBean.java 2007-09-21
08:12:34 UTC (rev 8393)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/common/MetaDataServiceBean.java 2007-09-21
08:18:57 UTC (rev 8394)
@@ -50,12 +50,9 @@
IdentityUIConfiguration cf = cfb.getConfiguration();
this.map = cf.getUiComponents();
}
-
+
public Class getType(Object propertyName) throws IllegalArgumentException
{
- if (propertyName != null &&
propertyName.equals("identityUIConfiguration"))
- return IdentityUIConfiguration.class;
- else
return UIComponentConfiguration.class;
}
@@ -69,8 +66,8 @@
{
return true;
}
-
- /** used on for building the url after validating email */
+
+ /** used for building the url after validating email */
public String getPortalContextPath()
{
ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext();
Modified:
trunk/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties
===================================================================
---
trunk/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties 2007-09-21
08:12:34 UTC (rev 8393)
+++
trunk/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties 2007-09-21
08:18:57 UTC (rev 8394)
@@ -51,7 +51,6 @@
IDENTITY_EDIT_PASSWORD_TITLE=Change your password
IDENTITY_EDIT_PASSWORD_CURRENT=Current password
IDENTITY_EDIT_CHANGE_PASSWORD=Change password
-IDENTITY_EDIT_CHANGE_PASSWORD_FOR_USER=Change password for user
IDENTITY_EDIT_CHANGE_PASSWORD_ERROR=Could not change your password.
IDENTITY_EDIT_CHANGE_PASSWOR_STATUS=Your password has been updated.
@@ -119,9 +118,8 @@
IDENTITY_MANAGEMENT_DISABLE=Disable
IDENTITY_MANAGEMENT_ENABLE=Enable
IDENTITY_MANAGEMENT_RESET_PASSWORD=Reset password
-IDENTITY_MANAGEMENT_RESET_PASSWORD_FOR_USER=Reset password of user
IDENTITY_MANAGEMENT_RESET_PASSWORD_DESCRIPTION=The user will get a random password sent
by email.
-IDENTITY_MANAGEMENT_ASSIGN_ROLE_TO_USER=Assign roles to user:
+IDENTITY_MANAGEMENT_ASSIGN_ROLES=Assign roles
IDENTITY_MANAGEMENT_COUNT_PENDING_USERS=Pending users
IDENTITY_MANAGEMENT_COUNT_REGISTERED_USERS=Registered users
IDENTITY_MANAGEMENT_APPROVE_ALL=Approve selected
Modified: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml 2007-09-21
08:12:34 UTC (rev 8393)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml 2007-09-21
08:18:57 UTC (rev 8394)
@@ -265,7 +265,7 @@
<from-view-id>/WEB-INF/jsf/profile/changePassword.xhtml</from-view-id>
<navigation-case>
<from-outcome>status</from-outcome>
- <to-view-id>/WEB-INF/jsf/profile/status.xhtml</to-view-id>
+ <to-view-id>/WEB-INF/jsf/profile/viewProfile.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
@@ -278,7 +278,7 @@
<from-view-id>/WEB-INF/jsf/profile/changeEmail.xhtml</from-view-id>
<navigation-case>
<from-outcome>status</from-outcome>
- <to-view-id>/WEB-INF/jsf/profile/status.xhtml</to-view-id>
+ <to-view-id>/WEB-INF/jsf/profile/viewProfile.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
Modified:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/assignRoles.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/assignRoles.xhtml 2007-09-21
08:12:34 UTC (rev 8393)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/assignRoles.xhtml 2007-09-21
08:18:57 UTC (rev 8394)
@@ -13,8 +13,11 @@
<h:commandLink action="userAdmin"
value="#{bundle.IDENTITY_MANAGEMENT_USER_MANAGEMENT}" />
</li>
<li class="pathSeparator"><h:graphicImage
url="/img/pathSeparator.png" alt=">"/></li>
+ <li class="pathItem">
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ASSIGN_ROLES}" />
+ </li>
+ <li class="pathSeparator"><h:graphicImage
url="/img/pathSeparator.png" alt=">"/></li>
<li class="selected">
- <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ASSIGN_ROLE_TO_USER}"
/>
<h:outputText value="#{assignrolemgr.uiUser.username}" />
</li>
</ui:define>
Modified:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/editProfile.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/editProfile.xhtml 2007-09-21
08:12:34 UTC (rev 8393)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/editProfile.xhtml 2007-09-21
08:18:57 UTC (rev 8394)
@@ -13,9 +13,13 @@
<h:commandLink action="userAdmin"
value="#{bundle.IDENTITY_MANAGEMENT_USER_MANAGEMENT}" />
</li>
<li class="pathSeparator"><h:graphicImage
url="/img/pathSeparator.png" alt=">"/></li>
- <li class="selected">
+ <li class="pathItem">
<h:outputText value="#{bundle.IDENTITY_EDIT_PROFILE_TITLE}" />
</li>
+ <li class="pathSeparator"><h:graphicImage
url="/img/pathSeparator.png" alt=">"/></li>
+ <li class="selected">
+ <h:outputText value="#{editprofilemgr.uiUser.username}" />
+ </li>
</ui:define>
<ui:define name="content">
Modified:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/editRole.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/editRole.xhtml 2007-09-21
08:12:34 UTC (rev 8393)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/editRole.xhtml 2007-09-21
08:18:57 UTC (rev 8394)
@@ -13,8 +13,12 @@
<h:commandLink action="roleAdmin"
value="#{bundle.IDENTITY_MANAGEMENT_ROLE_MANAGEMENT}" />
</li>
<li class="pathSeparator"><h:graphicImage
url="/img/pathSeparator.png" alt=">"/></li>
+ <li class="pathItem">
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_EDIT_ROLE}"/>
+ </li>
+ <li class="pathSeparator"><h:graphicImage
url="/img/pathSeparator.png" alt=">"/></li>
<li class="selected">
- <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_EDIT_ROLE}"/>
+ <h:outputText id="rolename" value="#{editrolemgr.uiRole.name}"
/>
</li>
</ui:define>
Modified:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/roleMembers.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/roleMembers.xhtml 2007-09-21
08:12:34 UTC (rev 8393)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/roles/roleMembers.xhtml 2007-09-21
08:18:57 UTC (rev 8394)
@@ -81,7 +81,7 @@
<hr/>
<h:form>
<h4><h:outputText
value="#{bundle.IDENTITY_MANAGEMENT_SEARCH_USER}"/></h4>
- <h:panelGrid columns="3">
+ <h:panelGrid columns="4">
<h:inputText id="searchString"
value="#{rolemanagementbean.userNameFilter}" />
<h:commandButton value="Search"
action="#{rolemanagementbean.viewRoleMembers}"
styleClass="portlet-form-button" />
<h:selectOneMenu id="limit"
value="#{rolemanagementbean.limit}">
Modified:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/changePassword.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/changePassword.xhtml 2007-09-21
08:12:34 UTC (rev 8393)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/changePassword.xhtml 2007-09-21
08:18:57 UTC (rev 8394)
@@ -14,8 +14,11 @@
<h:commandLink action="userAdmin"
value="#{bundle.IDENTITY_MANAGEMENT_USER_MANAGEMENT}" />
</li>
<li class="pathSeparator"><h:graphicImage
url="/img/pathSeparator.png" alt=">"/></li>
+ <li class="pathItem">
+ <h:outputText value="#{bundle.IDENTITY_EDIT_CHANGE_PASSWORD}" />
+ </li>
+ <li class="pathSeparator"><h:graphicImage
url="/img/pathSeparator.png" alt=">"/></li>
<li class="selected">
- <h:outputText value="#{bundle.IDENTITY_EDIT_CHANGE_PASSWORD_FOR_USER}"
/>
<h:outputText value="#{editprofilemgr.currentUser}" />
</li>
</ui:define>
Modified:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/resetPassword.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/resetPassword.xhtml 2007-09-21
08:12:34 UTC (rev 8393)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/resetPassword.xhtml 2007-09-21
08:18:57 UTC (rev 8394)
@@ -13,8 +13,11 @@
<h:commandLink action="userAdmin"
value="#{bundle.IDENTITY_MANAGEMENT_USER_MANAGEMENT}" />
</li>
<li class="pathSeparator"><h:graphicImage
url="/img/pathSeparator.png" alt=">"/></li>
- <li class="selected">
- <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_RESET_PASSWORD_FOR_USER}
" />
+ <li class="pathItem">
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_RESET_PASSWORD}" />
+ </li>
+ <li class="pathSeparator"><h:graphicImage
url="/img/pathSeparator.png" alt=">"/></li>
+ <li class="selected">
<h:outputText value="#{lostpasswordmgr.username}" />
</li>
</ui:define>
Modified:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/viewProfile.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/viewProfile.xhtml 2007-09-21
08:12:34 UTC (rev 8393)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/viewProfile.xhtml 2007-09-21
08:18:57 UTC (rev 8394)
@@ -15,6 +15,9 @@
</ui:define>
<ui:define name="content">
+ <h:messages id="status" for="status"
infoClass="portlet-msg-success" errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
+
<h:panelGrid columns="2">
<h:outputText value="#{bundle.IDENTITY_USERNAME}:"/>
<h:outputText value="#{editprofilemgr.uiUser.username}"/>