Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    "Password Item" Validation Error Message Showing Wrong in "Google Chrome" Browser.

    Hi,
    Version : Smart Gwt-4.0p
    Issue : "Password Item" Validation Error Message Showing Wrong in "Google Chrome" Browser.

    Procedure :

    1. Have one "Password Item' field
    2. Please find the attached file to know the properties and validators have been set for the password item.
    3. In my case I am not allowing space and "min length" for the password field and I added following validators :
    final String PASSWORD_REG_EXP="^(^([\\x00-\\x80]+))$";
    passwordStringValidator
    .setExpression(PASSWORD_REG_EXP);
    passwordStringValidator.setStopIfFalse(true);
    passwordStringValidator.setStopOnError(true);
    final String GROUP_NAME_REG_EXP2 = "[^\\s]";

    4. Run sample application and enter a "space" using space bar from key board.
    5. After clicking "OK", Then Password is cleared, and shows an error message like "Invalid Value" .
    It is happening in IE.

    code for clearing content :
    ---------------------------
    //Blur Handler For Clearing the content from "password item"
    ReferringGroupPasswordItem.addBlurHandler(new BlurHandler() {

    @Override
    public void onBlur(BlurEvent event) {

    if (!(ReferringGroupPasswordItem.validate())) {

    ReferringGroupPasswordItem.clearValue();
    }
    }
    });
    ---------------------------

    Expected : "Invalid Value" for all the browsers.

    Actual Result : "Field is required" in Google Chrome and
    "Invalid Value" in IE.


    Please find the sample Application from attachments.
    File : testsmartGwtProject.java

    Please let me know your comments.

    Thanks
    Attached Files

    #2
    Your code inexplicably contains a blur handler that calls "clearValue()", making the field unusable since the value is always cleared when the user exits the field.

    IE and Chrome happen to report different errors for this because they fire native events in a different order (not something that can be corrected by a web framework). Both error messages are correct.

    Comment

    Working...
    X