0 Replies Latest reply on Feb 15, 2012 10:46 AM by lcbdl888

    Bugs in Richfaces 4.1.0.final

    lcbdl888

      Hi,

       

      I think I found some bugs in Richfaces 4.1.0.final

       

      1. There is not a good way to control the width of autocomplete.  I found these two classes rf-au-lst-scrl rf-au-inp control the the input component and the dropdown list.  I tried to override them in my own css.  It didn't work.  Finally I use jQuery fixed. $(".rf-au-inp").css("width","284px");  $(".rf-au-lst-scrl").css("width", "300px !important");

       

       

              <rich:autocomplete id="securityQuestion1" value="#{user.securityQuestion1}"  showButton="true" mode="client"

                 autocompleteMethod="#{userProfileBean.showAllSecurityQuestions}" selectFirst="false" clientFilterFunction="customFilter">

           <rich:validator event="blur"/>

           </rich:autocomplete>

      <rich:message for="securityQuestion1"/>


      2. The client side validation doesn't show correct error message when submit the form.  The error message show correct when leave focus from the component.  It shows "Value must be at lest 4 characters long".  But when submit the form, the error message is "Value must be at lest {0} characters long"

       

       

        in User.java

       

                @NotNull

                @Size(min=4, message="{validator.securityAnswer}")

                public String getSecurityAnswer1() {

                          return securityAnswer1;

                }

       

       

      in the xhtml page

       

      <h:inputText id="securityAnswer1" value="#{user.securityAnswer1}" size="35" maxlength="100">

            <rich:validator event="blur"/>

      </h:inputText>

      <rich:message for="securityAnswer1"/>

       

      in ValidationMessages.properties

       

      validator.securityAnswer=Value must be at lest {0} characters long.

       

      3.   When a field has multiple validation on it like below,  the sequence of the validations are not always the same.  Sometimes, it validate NotNull first, sometimes, it validate Size first.  Is there a way to control the sequence of validation?

       

                @NotNull

                @Size(min=4, message="{validator.securityAnswer}")

                public String getSecurityAnswer1() {

                               return securityAnswer1;

                }