m_firstName.addKeyUpHandler(this);
m_firstName.getElement().setId("firstNameTxt");
m_firstName.getElement().addClassName(WIDE_TEXT_FIELD);
add(m_firstName, "firstName");
m_firstNameFeedback = new FormFeedback();
m_feedbacks.add(m_firstNameFeedback);
add(m_firstNameFeedback, "firstNameRow");
/*
Last name
*/
m_lastName = new TextBox();
m_lastName.addKeyUpHandler(this);
m_lastName.getElement().setId("lastNameTxt");
m_lastName.getElement().addClassName(WIDE_TEXT_FIELD);
add(m_lastName, "lastName");
m_lastNameFeedback = new FormFeedback();
m_feedbacks.add(m_lastNameFeedback);
add(m_lastNameFeedback, "lastNameRow");
/*
email
*/
m_email = new TextBox();
m_email.addKeyUpHandler(this);
m_email.getElement().setId("emailTxt");
m_email.getElement().addClassName(WIDE_TEXT_FIELD);
add(m_email, "email");
m_emailFeedback = new FormFeedback();
m_feedbacks.add(m_emailFeedback);
add(m_emailFeedback, "emailRow");
/*
User's birthdate
*/
m_bDay = new DatePickerTextBox("userBdayTxt");
m_bDay.setMaximumDate(new Date()); //user cannot be born tomorrow
m_bDay.addKeyUpHandler(this);
m_bDay.getElement().addClassName("slimTextField");
add(m_bDay, "userBday");
m_bDayFeedback = new FormFeedback();
add(m_bDayFeedback, "userBdayRow");
/*
User's gender
*/
RadioButton female = new RadioButton("userGender", "Female");
add(female, "userGender");
RadioButton male = new RadioButton("userGender", "Male");
male.addStyleName("radioOption");
male.setValue(true);
male.getElement().setId("userMale");
add(male, "userGender");
/*
User description
*/
m_userDesc = new TextArea();
m_userDesc.addKeyUpHandler(this);
m_userDesc.getElement().setId("userDescTxt");
m_userDesc.getElement().addClassName(WIDE_TEXT_FIELD);
add(m_userDesc, "userDesc");
m_userDescFeedback = new FormFeedback();
m_feedbacks.add(m_userDescFeedback);
add(m_userDescFeedback, "userDescRow");
/*
Password
*/
m_password = new PasswordTextBox();
m_password.addKeyUpHandler(this);
m_password.getElement().setId("passwordTxt");
m_password.getElement().addClassName("slimTextField");
add(m_password, "password");
m_passwordFeedback = new FormFeedback();
m_feedbacks.add(m_passwordFeedback);
add(m_passwordFeedback, "passwordRow");
/*
Password repeat
*/
m_passwordRepeat = new PasswordTextBox();
m_passwordRepeat.addKeyUpHandler(this);
m_passwordRepeat.getElement().setId("passwordRepeatTxt");
m_passwordRepeat.getElement().addClassName("slimTextField");
add(m_passwordRepeat, "passwordRepeat");
m_passwordRepeatFeedback = new FormFeedback();
m_feedbacks.add(m_passwordRepeatFeedback);
add(m_passwordRepeatFeedback, "passwordRepeatRow");
/*
Security Question
*/
m_securityQuestion = new TextArea();
m_securityQuestion.addKeyUpHandler(this);
m_securityQuestion.getElement().setId("securityQuestionTxt");
m_securityQuestion.getElement().addClassName(WIDE_TEXT_FIELD);
add(m_securityQuestion, "securityQuestion");
m_securityQuestionFeedback = new FormFeedback();
m_feedbacks.add(m_securityQuestionFeedback);
add(m_securityQuestionFeedback, "securityQuestionRow");
/*
Security answer
*/
m_securityAnswer = new TextBox();
m_securityAnswer.addKeyUpHandler(this);
m_securityAnswer.getElement().setId("securityAnswerTxt");
m_securityAnswer.getElement().addClassName(WIDE_TEXT_FIELD);
add(m_securityAnswer, "securityAnswer");
m_securityAnswerFeedback = new FormFeedback();
m_feedbacks.add(m_securityAnswerFeedback);
add(m_securityAnswerFeedback, "securityAnswerRow");