Merged V2.2 to HEAD

10931: Merged V2.1 to V2.2
      9931: Fix for https://issues.alfresco.com/jira/browse/ETWOONE-295
      10094: Further fix for ETWOONE-241: SAXException - XML parser apparently is not thread safe
      10101: Resolve ACT 1282: wcm workflow falling over on Oracle while hitting in clause limit of 1000 expressions.
      10188: https://issues.alfresco.com/jira/browse/ETWOONE-74 (Part 1)
      10447: ETWOONE-328: performance improvement added to rule trigger code
      10455: Fix for ETWOONE-306.
      10292: Fix for ETWOONE-92: If two users update the same contents at the same time, you get InvalidNodeRefException
      10293: Fix for ETWOONE-116: Send email action does not handle invalid email address
      10294: Fix for ETWOONE-164: when a powerpoint 2007 pptx is stored in alfresco ...
      10341: Action Evaluator request level cache


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10934 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2008-09-19 12:51:08 +00:00
parent 1f74c0282c
commit 997e6537aa
7 changed files with 130 additions and 15 deletions

View File

@@ -65,6 +65,7 @@ import org.alfresco.web.ui.common.Utils;
import org.alfresco.web.ui.common.component.UIActionLink;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.validator.EmailValidator;
/**
* @author Kevin Roast
@@ -84,7 +85,8 @@ public class NewUserWizard extends AbstractWizardBean
private static final String STEP2_TITLE_ID = "new_user_step2_title";
private static final String STEP2_DESCRIPTION_ID = "new_user_step2_desc";
private static final String FINISH_INSTRUCTION_ID = "new_user_finish_instruction";
private static final String ERROR = "error_person";
private static final String ERROR = "error_person";
private static final String MSG_ERROR_MAIL_NOT_VALID = "email_format_is_not_valid";
/** form variables */
private String firstName = null;
@@ -916,6 +918,23 @@ public class NewUserWizard extends AbstractWizardBean
}
}
/**
* Validate Email field data is acceptable
*
* @param context
* @param component
* @param value
* @throws ValidatorException
*/
public void validateEmail(FacesContext context, UIComponent component, Object value) throws ValidatorException
{
EmailValidator emailValidator = EmailValidator.getInstance();
if (!emailValidator.isValid((String) value))
{
String err =Application.getMessage(context, MSG_ERROR_MAIL_NOT_VALID);
throw new ValidatorException(new FacesMessage(err));
}
}
// ------------------------------------------------------------------------------
// Helper methods