// Private Data Members
private Boolean captchaRendered;
public void submit(ActionEvent actionEvent) {
Registrant submittedRegistrant = registrantModelBean.getRegistrant();
logger.debug("Adding user firstName=[{0}], lastName=[{1}], emailAddress=[{2}], captchaText=[{3}]",
new Object[] {
submittedRegistrant.getFirstName(), submittedRegistrant.getLastName(),
submittedRegistrant.getEmailAddress(), submittedRegistrant.getCaptchaText()
});
LiferayFacesContext liferayFacesContext = LiferayFacesContext.getInstance();
long creatorUserId = liferayFacesContext.getUser().getUserId();
long companyId = liferayFacesContext.getCompanyId();
Locale locale = liferayFacesContext.getLocale();
try {
boolean active = true;
boolean autoScreenName = false;
boolean sendEmail = true;
RegistrantServiceUtil.add(creatorUserId, companyId, locale, submittedRegistrant, active, autoScreenName,
sendEmail);
String key = "thank-you-for-registering";
liferayFacesContext.addGlobalInfoMessage(key, submittedRegistrant.getEmailAddress());
submittedRegistrant.clearProperties();
}
catch (DuplicateUserScreenNameException e) {
liferayFacesContext.addGlobalErrorMessage("the-screen-name-you-requested-is-already-taken");
}
catch (DuplicateUserEmailAddressException e) {