Author: thomas.heute(a)jboss.com
Date: 2008-07-02 09:21:04 -0400 (Wed, 02 Jul 2008)
New Revision: 11263
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/AssignRoleAction.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordAction.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/CaptchaValidator.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/CurrentPasswordValidator.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/EmailValidator.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/PasswordValidator.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UsernameValidator.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_fr.properties
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/index.xhtml
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/roles.xhtml
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/common/confirm.xhtml
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/index.xhtml
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/lostPassword/status.xhtml
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/profile/status.xhtml
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/register/success.xhtml
Log:
- Simple cleanup (while doing testing)
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/AssignRoleAction.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/AssignRoleAction.java 2008-07-02
10:01:26 UTC (rev 11262)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/AssignRoleAction.java 2008-07-02
13:21:04 UTC (rev 11263)
@@ -119,7 +119,7 @@
catch (Exception e)
{
e.printStackTrace();
- ctx.addMessage(null, new FacesMessage("Problem while fetching
user."));
+ ctx.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL,
"Problem while fetching user.", "Problem while fetching user."));
}
return "userAdmin";
}
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java 2008-07-02
10:01:26 UTC (rev 11262)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java 2008-07-02
13:21:04 UTC (rev 11263)
@@ -210,7 +210,9 @@
}
else
{
- FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage(bundle.getString("IDENTITY_VALIDATION_ERROR_REGISTRATION")));
+ FacesContext.getCurrentInstance().addMessage("status", new
FacesMessage(FacesMessage.SEVERITY_ERROR,
+ bundle.getString("IDENTITY_VALIDATION_ERROR_REGISTRATION"),
+ bundle.getString("IDENTITY_VALIDATION_ERROR_REGISTRATION")));
}
}
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordAction.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordAction.java 2008-07-02
10:01:26 UTC (rev 11262)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordAction.java 2008-07-02
13:21:04 UTC (rev 11263)
@@ -175,7 +175,9 @@
{
log.error("", e);
FacesContext.getCurrentInstance().addMessage(null,
- new
FacesMessage(bundle.getString("IDENTITY_LOST_PASSWORD_ERROR")));
+ new FacesMessage(FacesMessage.SEVERITY_ERROR,
+ bundle.getString("IDENTITY_LOST_PASSWORD_ERROR"),
+ bundle.getString("IDENTITY_LOST_PASSWORD_ERROR")));
return "status";
}
}
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/CaptchaValidator.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/CaptchaValidator.java 2008-07-02
10:01:26 UTC (rev 11262)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/CaptchaValidator.java 2008-07-02
13:21:04 UTC (rev 11263)
@@ -50,7 +50,9 @@
if ( tester.equals(Boolean.FALSE))
{
- throw new ValidatorException(new
FacesMessage(bundle.getString("IDENTITY_VALIDATION_ERROR_CAPTCHA_INCORRECT")));
+ throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
+
bundle.getString("IDENTITY_VALIDATION_ERROR_CAPTCHA_INCORRECT"),
+
bundle.getString("IDENTITY_VALIDATION_ERROR_CAPTCHA_INCORRECT")));
}
}
}
\ No newline at end of file
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/CurrentPasswordValidator.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/CurrentPasswordValidator.java 2008-07-02
10:01:26 UTC (rev 11262)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/CurrentPasswordValidator.java 2008-07-02
13:21:04 UTC (rev 11263)
@@ -59,12 +59,16 @@
}
catch (Exception e)
{
- throw new ValidatorException(new
FacesMessage(bundle.getString("IDENTITY_VALIDATION_ERROR_PASSWORD_ERROR")));
+ throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
+ bundle.getString("IDENTITY_VALIDATION_ERROR_PASSWORD_ERROR"),
+ bundle.getString("IDENTITY_VALIDATION_ERROR_PASSWORD_ERROR")));
}
if (user == null || (!user.validatePassword((String) value)))
{
- throw new ValidatorException(new
FacesMessage(bundle.getString("IDENTITY_VALIDATION_ERROR_INVALID_PASSWORD")));
+ throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
+ bundle.getString("IDENTITY_VALIDATION_ERROR_INVALID_PASSWORD"),
+
bundle.getString("IDENTITY_VALIDATION_ERROR_INVALID_PASSWORD")));
}
}
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/EmailValidator.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/EmailValidator.java 2008-07-02
10:01:26 UTC (rev 11262)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/EmailValidator.java 2008-07-02
13:21:04 UTC (rev 11263)
@@ -51,7 +51,7 @@
if (!Pattern.matches(EMAIL_VALIDATION, (String) value))
{
- throw new ValidatorException(new
FacesMessage(bundle.getString("IDENTITY_VALIDATION_ERROR_INVALID_EMAIL")));
+ throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
bundle.getString("IDENTITY_VALIDATION_ERROR_INVALID_EMAIL"),
bundle.getString("IDENTITY_VALIDATION_ERROR_INVALID_EMAIL")));
}
}
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/PasswordValidator.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/PasswordValidator.java 2008-07-02
10:01:26 UTC (rev 11262)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/PasswordValidator.java 2008-07-02
13:21:04 UTC (rev 11263)
@@ -47,12 +47,16 @@
if (value == null || password == null || !password.equals((String) value))
{
- throw new ValidatorException(new
FacesMessage(bundle.getString("IDENTITY_VALIDATION_ERROR_PASSWORD_DOESNT_MATCH")));
+ throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
+
bundle.getString("IDENTITY_VALIDATION_ERROR_PASSWORD_DOESNT_MATCH"),
+
bundle.getString("IDENTITY_VALIDATION_ERROR_PASSWORD_DOESNT_MATCH")));
}
}
else
{
- throw new ValidatorException(new
FacesMessage(bundle.getString("IDENTITY_VALIDATION_ERROR_PASSWORD_ERROR")));
+ throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
+ bundle.getString("IDENTITY_VALIDATION_ERROR_PASSWORD_ERROR"),
+ bundle.getString("IDENTITY_VALIDATION_ERROR_PASSWORD_ERROR")));
}
}
}
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UsernameValidator.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UsernameValidator.java 2008-07-02
10:01:26 UTC (rev 11262)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UsernameValidator.java 2008-07-02
13:21:04 UTC (rev 11263)
@@ -46,6 +46,7 @@
{
/** The username regex */
// private static final String NICKNAME_VALIDATION =
"^[a-zA-Z]([a-zA-Z0-9]+(([\\.\\-\\_]?[a-zA-Z0-9]+)+)?)";
+
/** The user module */
private UserModule userModule;
@@ -69,14 +70,16 @@
// checking jBPM context
if (registrationService.checkUsername(username))
{
- throw new ValidatorException(new
FacesMessage(bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN")
- + username));
+ throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
+
bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN"),
+
bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN")));
}
User u = userModule.findUserByUserName(username);
// User found so this nickname is already taken
- throw new ValidatorException(new
FacesMessage(bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN")
- + u.getUserName()));
+ throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
+ bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN"),
+ bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN")));
}
catch (NoSuchUserException e)
{
@@ -84,17 +87,23 @@
}
catch (IllegalArgumentException e)
{
- throw new ValidatorException(new
FacesMessage(bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR")));
+ throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
+ bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR"),
+ bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR")));
}
catch (IdentityException e)
{
log.error("Error validation username", e);
- throw new ValidatorException(new
FacesMessage(bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR")));
+ throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
+ bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR"),
+ bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR")));
}
catch (CoreIdentityConfigurationException e)
{
log.error("Error validation username", e);
- throw new ValidatorException(new
FacesMessage(bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR")));
+ throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
+ bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR"),
+ bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR")));
}
}
}
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties 2008-07-02
10:01:26 UTC (rev 11262)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties 2008-07-02
13:21:04 UTC (rev 11263)
@@ -178,4 +178,6 @@
IDENTITY_DYNAMIC_VALUE_TEST2=test label2
javax.portlet.title=User profile
-javax.portlet.keywords=management,user
\ No newline at end of file
+javax.portlet.keywords=management,user
+
+javax.faces.component.UIInput.REQUIRED=Value is required
\ No newline at end of file
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_fr.properties
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_fr.properties 2008-07-02
10:01:26 UTC (rev 11262)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_fr.properties 2008-07-02
13:21:04 UTC (rev 11263)
@@ -294,3 +294,4 @@
IDENTITY_YIM = Identifiant Yahoo
javax.portlet.title=Utilisateur
+javax.faces.component.UIInput.REQUIRED=Valeur requise
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml 2008-07-02
10:01:26 UTC (rev 11262)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml 2008-07-02
13:21:04 UTC (rev 11263)
@@ -39,7 +39,7 @@
<supported-locale>it</supported-locale>
<supported-locale>ru</supported-locale>
</locale-config>
-
+ <message-bundle>conf.bundles.Identity</message-bundle>
</application>
<factory>
<faces-context-factory>
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/index.xhtml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/index.xhtml 2008-07-02
10:01:26 UTC (rev 11262)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/index.xhtml 2008-07-02
13:21:04 UTC (rev 11263)
@@ -15,7 +15,7 @@
<ui:define name="content">
<h3><h:outputText
value="#{bundle.IDENTITY_MANAGEMENT_USER_MANAGEMENT}" /></h3>
- <h:messages id="status" for="status"
infoClass="portlet-msg-success" errorClass="portlet-msg-error"
+ <h:messages style="list-style:none"
infoClass="portlet-msg-success" errorClass="portlet-msg-error"
fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
<h:form>
<h:panelGrid>
@@ -41,7 +41,7 @@
</td>
</tr>
<c:if test="#{useradministrationbean.pendingCount > 0}">
- <tr class="portlet-section-body">
+ <tr class="line-item">
<td> <h:outputText
value="#{bundle.IDENTITY_MANAGEMENT_COUNT_PENDING_USERS}" /></td>
<td><h:outputText
value="#{useradministrationbean.pendingCount}" /></td>
</tr>
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/roles.xhtml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/roles.xhtml 2008-07-02
10:01:26 UTC (rev 11262)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/roles.xhtml 2008-07-02
13:21:04 UTC (rev 11263)
@@ -15,7 +15,7 @@
<ui:define name="content">
<h3><h:outputText
value="#{bundle.IDENTITY_MANAGEMENT_ROLE_MANAGEMENT}" /></h3>
- <h:messages id="status" infoClass="portlet-msg-success"
errorClass="portlet-msg-error"
+ <h:messages style="list-style:none"
infoClass="portlet-msg-success" errorClass="portlet-msg-error"
fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
<br/>
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/common/confirm.xhtml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/common/confirm.xhtml 2008-07-02
10:01:26 UTC (rev 11262)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/common/confirm.xhtml 2008-07-02
13:21:04 UTC (rev 11263)
@@ -27,7 +27,8 @@
</h:column>
</h:dataTable>
</c:if>
- <h:messages />
+ <h:messages style="list-style:none"
infoClass="portlet-msg-success" errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
<hr/>
<p style="text-align: right;">
<h:commandButton value="#{bundle.IDENTITY_BUTTON_EDIT}"
action="revise" styleClass="portlet-form-button"/>
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/index.xhtml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/index.xhtml 2008-07-02
10:01:26 UTC (rev 11262)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/index.xhtml 2008-07-02
13:21:04 UTC (rev 11263)
@@ -20,5 +20,6 @@
</c:choose>
</c:otherwise>
</c:choose>
- <h:messages />
+ <h:messages style="list-style:none"
infoClass="portlet-msg-success" errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
</div>
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/lostPassword/status.xhtml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/lostPassword/status.xhtml 2008-07-02
10:01:26 UTC (rev 11262)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/lostPassword/status.xhtml 2008-07-02
13:21:04 UTC (rev 11263)
@@ -12,7 +12,8 @@
<h:outputText value="#{bundle.IDENTITY_LOST_PASSWORD_STATUS_TITLE}" />
</ui:define>
<ui:define name="content">
- <h:messages />
+ <h:messages style="list-style:none"
infoClass="portlet-msg-success" errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
</ui:define>
</ui:composition>
</div>
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/profile/status.xhtml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/profile/status.xhtml 2008-07-02
10:01:26 UTC (rev 11262)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/profile/status.xhtml 2008-07-02
13:21:04 UTC (rev 11263)
@@ -17,7 +17,8 @@
</ui:define>
<ui:define name="content">
- <h3><h:messages /></h3>
+ <h3><h:messages style="list-style:none"
infoClass="portlet-msg-success" errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/></h3>
</ui:define>
</ui:composition>
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/register/success.xhtml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/register/success.xhtml 2008-07-02
10:01:26 UTC (rev 11262)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/register/success.xhtml 2008-07-02
13:21:04 UTC (rev 11263)
@@ -12,7 +12,8 @@
<h:outputText value="#{bundle.IDENTITY_REGISTER_STATUS_TITLE}"/>
</ui:define>
<ui:define name="content">
- <h3><h:messages /></h3>
+ <h3><h:messages style="list-style:none"
infoClass="portlet-msg-success" errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/></h3>
</ui:define>
</ui:composition>
</div>
\ No newline at end of file