ICEfaces
  1. ICEfaces
  2. ICE-10201

ace:textEntry - requiredMessage fails to render when using a submit button

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 4.0
    • Fix Version/s: 4.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces4 trunk rev. 42320
      Browsers: all
      Server: Tomcat 7.0.27
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      The normal submit of the form is blocked by the HTML5 _required=true_ attribute set on the input element. Since ICEfaces captures the actual _submit_ event to issue an AJAX request the submit is not triggered.

      To workaround this client side validation the submit button can have an f:ajax facet thus forcing a submit that directly invokes the AJAX request:
      {code}
              <h:commandButton id="submit" type="submit" value="Submit">
                  <f:ajax render="@all" execute="@all"/>
              </h:commandButton>
      {code}
      Show
      The normal submit of the form is blocked by the HTML5 _required=true_ attribute set on the input element. Since ICEfaces captures the actual _submit_ event to issue an AJAX request the submit is not triggered. To workaround this client side validation the submit button can have an f:ajax facet thus forcing a submit that directly invokes the AJAX request: {code}         <h:commandButton id="submit" type="submit" value="Submit">             <f:ajax render="@all" execute="@all"/>         </h:commandButton> {code}

      Description

      ace:textEntry QA test application -> Dynamic attribute test:
      When using a submit button, the requiredMessage on the ace:textEntry is not rendered on page. The requiredMessage is rendered if pressing "Enter" on the ace:textEntry (while no text is being entered in the textEntry), or if replacing the h:commandButton with an ace:ajax component with a 'blur' type event on the ace:textEntry.

      Test application:
      http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/textEntry

      Test page: /textEntryDynAttribute.jsf

      Steps:
      - on /textEntryDynAttribute.jsf, set rendered=true, required=true.
      - click inside the ace:textEntry component, without typing any character.
      - click the 'Submit' button -> the expected required message is "Required text missing" is not rendered, instead there is a message "Please fill out this field", coming from the browser. If the Enter key is pressed, the requiredMessage is displayed.

      Note: the requiredMessage is rendered on page if replacing the submit h:commandButton with an ace:ajax component on the ace:textEntry:
      <ace:ajax render="@this value textEntryMsg validatorMsg" event="blur"/>

        Issue Links

          Activity

          Hide
          Mircea Toma added a comment - - edited

          The normal submit of the form is blocked by the HTML5 required=true attribute set on the input element. Since ICEfaces captures the actual submit event to issue an AJAX request the submit is not triggered.

          To workaround this client side validation the submit button can have an f:ajax facet thus forcing a submit that directly invokes the AJAX request:

                  <h:commandButton id="submit" type="submit" value="Submit">
                      <f:ajax render="@all" execute="@all"/>
                  </h:commandButton>
          
          Show
          Mircea Toma added a comment - - edited The normal submit of the form is blocked by the HTML5 required=true attribute set on the input element. Since ICEfaces captures the actual submit event to issue an AJAX request the submit is not triggered. To workaround this client side validation the submit button can have an f:ajax facet thus forcing a submit that directly invokes the AJAX request: <h:commandButton id= "submit" type= "submit" value= "Submit" > <f:ajax render= "@all" execute= "@all" /> </h:commandButton>

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Carmen Cristurean
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: