ICEfaces
  1. ICEfaces
  2. ICE-11132

Multiple ace:autoCompleteEntry components in same form with ace:clientValidateRequired causes premature validation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-4.1.0.GA
    • Fix Version/s: 4.2.BETA, 4.2
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Tomcat 7/8, FF 47, IE 11, Chrome 52.
    • Assignee Priority:
      P2
    • Affects:
      Compatibility/Configuration

      Description

      Issue found when using multiple ace:autoCompleteEntry components with ace:clientValidateRequired in one form.
      Using this configuration the ace:autoCompleteEntry does not behave as expected.
      Scenario:
      A form has 3 ace:autoCompleteEntry components, each use an ace:clientValidateRequired within.
      After typing only one character into the first ace:autoCompleteEntry the validation messages for the 2nd and third autoCompleteEntry are immediately rendered.
      This can be reproduced with the /ICE-10883.jsf test app found at
      http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/autoCompleteEntry

        Activity

        Liana Munroe created issue -
        Liana Munroe made changes -
        Field Original Value New Value
        Summary Multiple ace:autoCompleteEntry components with ace:clientValidateRequired validation issue ace:autoCompleteEntry components with ace:clientValidateRequired validation issue
        Ken Fyten made changes -
        Summary ace:autoCompleteEntry components with ace:clientValidateRequired validation issue Multiple ace:autoCompleteEntry components in same form with ace:clientValidateRequired causes premature validation
        Ken Fyten made changes -
        Assignee Mircea Toma [ mircea.toma ]
        Fix Version/s 4.2 [ 12870 ]
        Assignee Priority P2 [ 10011 ]
        Hide
        Mircea Toma added a comment -

        Run validation only when the entire form is executed. Cleanup validation messages for elements that where changed after last submit and now pass validation.

        Show
        Mircea Toma added a comment - Run validation only when the entire form is executed. Cleanup validation messages for elements that where changed after last submit and now pass validation.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49214 Wed Sep 14 15:24:48 MDT 2016 mircea.toma ICE-11132 Run validation only when the entire form is executed. Cleanup validation messages for elements that where changed after last submit and now pass validation.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/clientvalidator/clientvalidator.js
        Hide
        Liana Munroe added a comment - - edited

        Tested with ICEfaces 4 trunk r49214. Tomcat 8, FF 47, Chrome 53, IE 11
        Initial testing shows that the original issue is resolved however there is now a change in the way that some validation messages are displayed when certain keyboard events are used in a validateOn attribute.
        The events tested so far that have changed message behaviour are keyup, keydown and keypress. When these events are used the validation message is only shown for a second then is removed when the list of autoCompleteEntry options is rendered. This issue was not occurring prior to the fix.

        This can be seen in the QA test app /autoCompleteEntry/ICE-10883.jsf where Required or Length validateOn=keyup.
        Other events such as click, blur, dblclick, mousemove etc. do not have this issue.

        Show
        Liana Munroe added a comment - - edited Tested with ICEfaces 4 trunk r49214. Tomcat 8, FF 47, Chrome 53, IE 11 Initial testing shows that the original issue is resolved however there is now a change in the way that some validation messages are displayed when certain keyboard events are used in a validateOn attribute. The events tested so far that have changed message behaviour are keyup, keydown and keypress. When these events are used the validation message is only shown for a second then is removed when the list of autoCompleteEntry options is rendered. This issue was not occurring prior to the fix. This can be seen in the QA test app /autoCompleteEntry/ ICE-10883 .jsf where Required or Length validateOn=keyup. Other events such as click, blur, dblclick, mousemove etc. do not have this issue.
        Mircea Toma made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Mircea Toma added a comment - - edited

        The validation messages are removed by the update that contains the new auto complete values.

        Show
        Mircea Toma added a comment - - edited The validation messages are removed by the update that contains the new auto complete values.
        Hide
        Liana Munroe added a comment - - edited

        Jenkins ICEfaces 4 continuous trunk # 2087
        The commit for this fix has caused a regression for all components that use ace client validators and an ace:ajax event. The event no longer fires the validator. In these 2 examples the blur event does not fire the validator messages.
        example

         <h:form id="form1">
                <ace:autoCompleteEntry id="autoCompleteEntry1" value="#{autoCompleteEntryClientVal.value1}"
                                       rows="10" label="ace:autoCompleteEntry 1" labelPosition="top">
                      <ace:ajax render="@this messageGrid1" event="blur"/>
                        <ace:clientValidateRequired  />                  
                    <f:selectItems value="#{autoCompleteEntryBean.cities}"/>
                </ace:autoCompleteEntry>
                <br />
            <h:commandButton id="form2Submit" value="Submit Value" />
                 <br />
                 <h:panelGrid id="messageGrid1" width="100%">
                 <ace:message id="message1" for="autoCompleteEntry1"/>
                 </h:panelGrid>
            </h:form>
        

        or

        <h:form id="form1">
        		<h:panelGrid id="inputGrid" columns="1" width="100%">
        			<ace:comboBox id="comboBox2" value="#{comboBoxClientVal.value2}"
        				label="ace:comboBox2" labelPosition="top">
        				<f:selectItems value="#{comboBoxBean.provinces}" />
        				<ace:ajax execute="@form" render="@form messageGrid2" event="blur" />
        				<ace:clientValidateRequired />
        				<ace:clientValidateLength maximum="#{comboBoxClientVal.maxChar}" />
        			</ace:comboBox>
        		</h:panelGrid>
        		<br />
        		<h:commandButton id="form4Submit" value="Submit Value" />
        		<br />
        		<h:panelGrid id="messageGrid2" width="100%">
        			<ace:message id="message2" for="comboBox2" />
        		</h:panelGrid>
        	</h:form>
        
        Show
        Liana Munroe added a comment - - edited Jenkins ICEfaces 4 continuous trunk # 2087 The commit for this fix has caused a regression for all components that use ace client validators and an ace:ajax event. The event no longer fires the validator. In these 2 examples the blur event does not fire the validator messages. example <h:form id= "form1" > <ace:autoCompleteEntry id= "autoCompleteEntry1" value= "#{autoCompleteEntryClientVal.value1}" rows= "10" label= "ace:autoCompleteEntry 1" labelPosition= "top" > <ace:ajax render= "@ this messageGrid1" event= "blur" /> <ace:clientValidateRequired /> <f:selectItems value= "#{autoCompleteEntryBean.cities}" /> </ace:autoCompleteEntry> <br /> <h:commandButton id= "form2Submit" value= "Submit Value" /> <br /> <h:panelGrid id= "messageGrid1" width= "100%" > <ace:message id= "message1" for = "autoCompleteEntry1" /> </h:panelGrid> </h:form> or <h:form id= "form1" > <h:panelGrid id= "inputGrid" columns= "1" width= "100%" > <ace:comboBox id= "comboBox2" value= "#{comboBoxClientVal.value2}" label= "ace:comboBox2" labelPosition= "top" > <f:selectItems value= "#{comboBoxBean.provinces}" /> <ace:ajax execute= "@form" render= "@form messageGrid2" event= "blur" /> <ace:clientValidateRequired /> <ace:clientValidateLength maximum= "#{comboBoxClientVal.maxChar}" /> </ace:comboBox> </h:panelGrid> <br /> <h:commandButton id= "form4Submit" value= "Submit Value" /> <br /> <h:panelGrid id= "messageGrid2" width= "100%" > <ace:message id= "message2" for = "comboBox2" /> </h:panelGrid> </h:form>
        Hide
        Mircea Toma added a comment - - edited

        Introduced ice.skipClientValidation parameter to programatically mark submits that should skip client validation. This is used by ace:autoCompleteEntry when requesting the autocompleting items.

        Show
        Mircea Toma added a comment - - edited Introduced ice.skipClientValidation parameter to programatically mark submits that should skip client validation. This is used by ace:autoCompleteEntry when requesting the autocompleting items.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49240 Tue Sep 20 05:04:36 MDT 2016 mircea.toma ICE-11132 Introduce ice.skipClientValidation parameter to programatically mark submits that should skip client validation.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/autocompleteentry/autocompleteentry.js
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/clientvalidator/clientvalidator.js
        Hide
        Liana Munroe added a comment -

        Tested with ICEfaces 4 trunk r49240. FF 47, IE 11 Chrome 53.
        Multiple autoCompleteEntries are not functioning properly again. Validation messages appear to be removed prematurely. Also the value is submit to the server even if the validation is not complete.
        This can be seen in the QA test apps /autoCompleteEntry/ICE-10883.jsf, /ICE-10883-2.jsf, ICE-10883-3.jsf.
        To reproduce use /autoCompleteEntry/ICE-10883.jsf
        The first 3 fields in the form are ace:autoCompleteEntry with ace:clientValidateRequired using validateOn attributes.
        1) Place focus in the first field, then press TAB, a validation message is seen.
        2) In the second field (now focused) mouse click to cause a validation message to be shown.
        3) Click in the third field and press "a" to show a list of autoCompleteEntry options.
        4) As soon as the options list is shown, the validation messages for the previous fields are removed.

        Looking further down the page you will see that there are ace:autoCompleteEntries with ace:clientValidateLength using validateOn attributes.
        Similar issues are seen here. Validation messages are removed prematurely and a value is submitted to the server even when that filed has not passed validation.

        Show
        Liana Munroe added a comment - Tested with ICEfaces 4 trunk r49240. FF 47, IE 11 Chrome 53. Multiple autoCompleteEntries are not functioning properly again. Validation messages appear to be removed prematurely. Also the value is submit to the server even if the validation is not complete. This can be seen in the QA test apps /autoCompleteEntry/ ICE-10883 .jsf, / ICE-10883 -2.jsf, ICE-10883 -3.jsf. To reproduce use /autoCompleteEntry/ ICE-10883 .jsf The first 3 fields in the form are ace:autoCompleteEntry with ace:clientValidateRequired using validateOn attributes. 1) Place focus in the first field, then press TAB, a validation message is seen. 2) In the second field (now focused) mouse click to cause a validation message to be shown. 3) Click in the third field and press "a" to show a list of autoCompleteEntry options. 4) As soon as the options list is shown, the validation messages for the previous fields are removed. Looking further down the page you will see that there are ace:autoCompleteEntries with ace:clientValidateLength using validateOn attributes. Similar issues are seen here. Validation messages are removed prematurely and a value is submitted to the server even when that filed has not passed validation.
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Mircea Toma added a comment -

        Modified ace:autoCompleteEntry request for autocoplete items to use render=@this attribute and thus avoid validation message overwrite.

        Show
        Mircea Toma added a comment - Modified ace:autoCompleteEntry request for autocoplete items to use render=@this attribute and thus avoid validation message overwrite.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49309 Thu Sep 22 11:47:09 MDT 2016 mircea.toma ICE-11132 Use render=@this submit attribute to avoid client validation message overwrite.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/autocompleteentry/autocompleteentry.js
        Hide
        Liana Munroe added a comment - - edited

        Tested with ICEfaces 4 trunk r49309.
        This latest fix causes most of our regression tests for autoCompleteEntry to fail. When an option is chosen from the list the return value is no longer rendered on the page.
        This can be seen with showcase demos such as:
        ace:autoCompleteEntry > Select Items, Custom Facet, Match Criteria, Displayed Rows, Lazy Loading.
        After making a selection the value can not be submit via blur or pressing enter. There are no submit buttons in the autoCompleteEntry demos. The value was submit only if I navigated away from the page.

        Show
        Liana Munroe added a comment - - edited Tested with ICEfaces 4 trunk r49309. This latest fix causes most of our regression tests for autoCompleteEntry to fail. When an option is chosen from the list the return value is no longer rendered on the page. This can be seen with showcase demos such as: ace:autoCompleteEntry > Select Items, Custom Facet, Match Criteria, Displayed Rows, Lazy Loading. After making a selection the value can not be submit via blur or pressing enter. There are no submit buttons in the autoCompleteEntry demos. The value was submit only if I navigated away from the page.
        Liana Munroe made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Mircea Toma added a comment - - edited

        Add <ace:ajax render="@all"../> facets for 'valueChange' and 'blur' events in all demoes to force rendering of all the components.

        Show
        Mircea Toma added a comment - - edited Add <ace:ajax render="@all"../> facets for 'valueChange' and 'blur' events in all demoes to force rendering of all the components.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49316 Mon Sep 26 13:34:14 MDT 2016 mircea.toma ICE-11132 Add <ace:ajax render="@all"../> facets for 'valueChange' and 'blur' events to force rendering of all the components.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/autocompleteentry/autoCompleteEntryLabel.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/autocompleteentry/autoCompleteEntryMatch.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/autocompleteentry/autoCompleteEntryLazy.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/autocompleteentry/autoCompleteEntryIndicator.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/autocompleteentry/autoCompleteEntry.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/autocompleteentry/autoCompleteEntrySelect.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/autocompleteentry/autoCompleteEntryRows.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/autocompleteentry/autoCompleteEntryFacet.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/autocompleteentry/autoCompleteEntryReqStyle.xhtml
        Hide
        Carmen Cristurean added a comment -

        Verified ICEfaces4 trunk r49316 on IE11, FF47, Chrome53/Tomcat7.

        Show
        Carmen Cristurean added a comment - Verified ICEfaces4 trunk r49316 on IE11, FF47, Chrome53/Tomcat7.
        Hide
        Ken Fyten added a comment -

        Adding a note to remind me to include the ace:autoComplete component behavior change in the release notes as it could impact existing applications that depend on the old "render=@all" behaviour, though that behaviour was incorrect.

        Show
        Ken Fyten added a comment - Adding a note to remind me to include the ace:autoComplete component behavior change in the release notes as it could impact existing applications that depend on the old "render=@all" behaviour, though that behaviour was incorrect.
        Ken Fyten made changes -
        Affects Compatibility/Configuration [ 10002 ]
        Hide
        Liana Munroe added a comment - - edited

        ICEfaces 4 trunk r39343.
        "ace:clientValidateRequired" validation messages are premature after selecting an item from the autoCompleteEntry list. This can be seen in QA test app /ICE-10883.jsf found at:
        http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/autoCompleteEntry

        The page has ace:autoCompleteEntry with ace:clientValidateRequired using validateOn attributes. Each autoCompleteEntry looks something like this:

        <ace:autoCompleteEntry id="autoCompleteEntry1" value="#{autoCompleteEntryClientVal.value1}"
        			label="Required validateOn=blur" labelPosition="top">
         				<ace:ajax render="@this, messageGrid1" event="blur" />
        			  <f:selectItems value="#{autoCompleteEntryBean.cities}"/>
        			  <ace:clientValidateRequired validateOn="blur" />
        		</ace:autoCompleteEntry>
        

        To reproduce the issue:
        1.) Place the cursor in the first field and type the letter "a".
        2.) Click on any selection from the list.
        3.) Press TAB to blur to the next field.
        4.) The validation messages are now incorrectly shown for the next 2 fields.

        Show
        Liana Munroe added a comment - - edited ICEfaces 4 trunk r39343. "ace:clientValidateRequired" validation messages are premature after selecting an item from the autoCompleteEntry list. This can be seen in QA test app / ICE-10883 .jsf found at: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/autoCompleteEntry The page has ace:autoCompleteEntry with ace:clientValidateRequired using validateOn attributes. Each autoCompleteEntry looks something like this: <ace:autoCompleteEntry id= "autoCompleteEntry1" value= "#{autoCompleteEntryClientVal.value1}" label= "Required validateOn=blur" labelPosition= "top" > <ace:ajax render= "@ this , messageGrid1" event= "blur" /> <f:selectItems value= "#{autoCompleteEntryBean.cities}" /> <ace:clientValidateRequired validateOn= "blur" /> </ace:autoCompleteEntry> To reproduce the issue: 1.) Place the cursor in the first field and type the letter "a". 2.) Click on any selection from the list. 3.) Press TAB to blur to the next field. 4.) The validation messages are now incorrectly shown for the next 2 fields.
        Liana Munroe made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Mircea Toma added a comment -

        Modified ace:autoCompleteEntry's client code to skip validation for its onblur submit.

        Show
        Mircea Toma added a comment - Modified ace:autoCompleteEntry 's client code to skip validation for its onblur submit.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49348 Tue Oct 11 05:59:58 MDT 2016 mircea.toma ICE-11132 Mark autoCompleteEntry's onblur submit to skip validation.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/autocompleteentry/autocompleteentry.js
        Hide
        Liana Munroe added a comment - - edited

        Tested with ICEfaces 4 trunk r49348. Issues found:
        1.) Making a selection from an ace:autoCompleteEntry with a clientValidateLength/Pattern/Decimal etc. in the same form as an ace:autoCompleteEntry that uses clientValidateRequired will cause "required" validation to fire.
        To demonstrate use /ICE-10883.jsf found at:
        http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/autoCompleteEntry
        In the 4th autoCompleteEntry from the top labelled "Length validateOn=blur", type a letter then make a selection from the list.
        Notice that the top 3 fields on the page will render their required validation menus.

        2.) The latest commit changes the behaviour when blurring away from an ace:autoCompleteEntry with a nested ace:clientValidateRequired component that does NOT use the validateOn attribute. In this situation the blur event is not respected. The validation does not occur when unless a submit has been attempted.
        Scenarios:

        <ace:autoCompleteEntry id="autoCompleteEntry1" value="#{autoCompleteEntryClientVal.value1}"
                                                rows="10" label="ace:autoCompleteEntry 1" labelPosition="top">             
                           <ace:clientValidateRequired  />      
                         <ace:ajax render="@this messageGrid1" event="blur"/>            
                    <f:selectItems value="#{autoCompleteEntryBean.cities}"/>
                </ace:autoCompleteEntry>
        

        OR

        <ace:autoCompleteEntry id="autoCompleteEntry1" value="#{autoCompleteEntryClientVal.value1}"
                                                rows="10" label="ace:autoCompleteEntry 1" labelPosition="top">             
                           <ace:clientValidateRequired  />      
                        <ace:ajax render="@all"/>         
                    <f:selectItems value="#{autoCompleteEntryBean.cities}"/>
                </ace:autoCompleteEntry>
        

        1.) Place focus on the autoCompleteEntry then press TAB, no validation message appears.
        2.) Submit the form, the validation message appears
        3.) Place focus again on the autoCompleteEntry and enter a letter the validation message is removed.
        4.) Press backspace to remove the letter the validation messages appear.
        Prior to this commit the validation message would appear when blurring away from the field at any time, now the blur event is not respected, unless a validateOn="blur" attribute is specified.
        This particular issue does not seem to affect other validators such as ace:clientValidateLength/Pattern/Decimal.

        Please see example /autoCompleteEntryClientValidateRequired.jsf found at:
        http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/autoCompleteEntry

        Show
        Liana Munroe added a comment - - edited Tested with ICEfaces 4 trunk r49348. Issues found: 1.) Making a selection from an ace:autoCompleteEntry with a clientValidateLength/Pattern/Decimal etc. in the same form as an ace:autoCompleteEntry that uses clientValidateRequired will cause "required" validation to fire. To demonstrate use / ICE-10883 .jsf found at: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/autoCompleteEntry In the 4th autoCompleteEntry from the top labelled "Length validateOn=blur", type a letter then make a selection from the list. Notice that the top 3 fields on the page will render their required validation menus. 2.) The latest commit changes the behaviour when blurring away from an ace:autoCompleteEntry with a nested ace:clientValidateRequired component that does NOT use the validateOn attribute. In this situation the blur event is not respected. The validation does not occur when unless a submit has been attempted. Scenarios: <ace:autoCompleteEntry id= "autoCompleteEntry1" value= "#{autoCompleteEntryClientVal.value1}" rows= "10" label= "ace:autoCompleteEntry 1" labelPosition= "top" > <ace:clientValidateRequired /> <ace:ajax render= "@ this messageGrid1" event= "blur" /> <f:selectItems value= "#{autoCompleteEntryBean.cities}" /> </ace:autoCompleteEntry> OR <ace:autoCompleteEntry id= "autoCompleteEntry1" value= "#{autoCompleteEntryClientVal.value1}" rows= "10" label= "ace:autoCompleteEntry 1" labelPosition= "top" > <ace:clientValidateRequired /> <ace:ajax render= "@all" /> <f:selectItems value= "#{autoCompleteEntryBean.cities}" /> </ace:autoCompleteEntry> 1.) Place focus on the autoCompleteEntry then press TAB, no validation message appears. 2.) Submit the form, the validation message appears 3.) Place focus again on the autoCompleteEntry and enter a letter the validation message is removed. 4.) Press backspace to remove the letter the validation messages appear. Prior to this commit the validation message would appear when blurring away from the field at any time, now the blur event is not respected, unless a validateOn="blur" attribute is specified. This particular issue does not seem to affect other validators such as ace:clientValidateLength/Pattern/Decimal. Please see example /autoCompleteEntryClientValidateRequired.jsf found at: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/autoCompleteEntry
        Hide
        Ken Fyten added a comment -

        Re-opened.

        When not specifying validateOn it is no longer activating clientValidateRequired when the component submits.

        Show
        Ken Fyten added a comment - Re-opened. When not specifying validateOn it is no longer activating clientValidateRequired when the component submits.
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Mircea Toma added a comment -

        Applied initial fix once again, that is to run client validation only when the entire form or all components are executed. With the ace:ajax modified (found in the test page) to render only @this and messageGrid1 the regressions cannot be reproduce anymore.

        Show
        Mircea Toma added a comment - Applied initial fix once again, that is to run client validation only when the entire form or all components are executed. With the ace:ajax modified (found in the test page) to render only @this and messageGrid1 the regressions cannot be reproduce anymore.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49358 Wed Oct 12 14:00:56 MDT 2016 mircea.toma ICE-11132 Run client validation only when the entire form or all components are executed.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/autocompleteentry/autocompleteentry.js
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/clientvalidator/clientvalidator.js
        Hide
        Liana Munroe added a comment -

        Tested with ICEfaces 4 trunk 49358, Tomcat 8.
        Issue #1 in the October 11 comment is resolved.
        Issue #2 in the October 11 comment has not been resolved...
        There is a change in behaviour when blurring away from an ace:autoCompleteEntry with a nested ace:clientValidateRequired component that does NOT use the validateOn attribute. In this situation the blur event is not respected. The validation does not occur when unless a submit has been attempted....
        Please see example /autoCompleteEntryClientValidateRequired.jsf found at:
        http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/autoCompleteEntry

        Show
        Liana Munroe added a comment - Tested with ICEfaces 4 trunk 49358, Tomcat 8. Issue #1 in the October 11 comment is resolved. Issue #2 in the October 11 comment has not been resolved... There is a change in behaviour when blurring away from an ace:autoCompleteEntry with a nested ace:clientValidateRequired component that does NOT use the validateOn attribute. In this situation the blur event is not respected. The validation does not occur when unless a submit has been attempted.... Please see example /autoCompleteEntryClientValidateRequired.jsf found at: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/autoCompleteEntry
        Hide
        Ken Fyten added a comment -

        Re-opened.

        We seem to be going in circles on this issue...

        Due to the inherent complexities of this component we will drop support for using the clientValidator* "validateOn" attribute with it. It will continue to function with client validators using the default submit events as it has previously.

        Show
        Ken Fyten added a comment - Re-opened. We seem to be going in circles on this issue... Due to the inherent complexities of this component we will drop support for using the clientValidator* "validateOn" attribute with it. It will continue to function with client validators using the default submit events as it has previously.
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49370 Mon Oct 17 12:14:08 MDT 2016 mircea.toma ICE-11132 Enhance client validation to respect the scope of the 'execute' attribute of a partial submit.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/clientvalidator/clientvalidator.js
        Hide
        Mircea Toma added a comment - - edited

        Well, I gave it another shot and I believe I got it right this time. In order to make the client validation work as expected I had to enhance client validation to respect the scope of the 'execute' attribute of a partial submit.

        So, for (2) where validation is triggered by the partial submit we need to define which components are executed (client validation will now respect that):

        <ace:autoCompleteEntry id="autoCompleteEntry1" value="#{autoCompleteEntryClientVal.value1}"
                                                rows="10" label="ace:autoCompleteEntry 1" labelPosition="top">             
                         <ace:clientValidateRequired  />      
                         <ace:ajax execute="@this" render="@this messageGrid1" event="blur"/>         
                        <f:selectItems value="#{autoCompleteEntryBean.cities}"/>
        </ace:autoCompleteEntry>
        

        The event "blur" needs to be defined on the ace:ajax facet since the default behviour for required validation is to enforce it only when the form is submitted. See https://jqueryvalidation.org/required-method/ .

        Show
        Mircea Toma added a comment - - edited Well, I gave it another shot and I believe I got it right this time. In order to make the client validation work as expected I had to enhance client validation to respect the scope of the 'execute' attribute of a partial submit. So, for (2) where validation is triggered by the partial submit we need to define which components are executed (client validation will now respect that): <ace:autoCompleteEntry id= "autoCompleteEntry1" value= "#{autoCompleteEntryClientVal.value1}" rows= "10" label= "ace:autoCompleteEntry 1" labelPosition= "top" > <ace:clientValidateRequired /> <ace:ajax execute= "@ this " render= "@ this messageGrid1" event= "blur" /> <f:selectItems value= "#{autoCompleteEntryBean.cities}" /> </ace:autoCompleteEntry> The event "blur" needs to be defined on the ace:ajax facet since the default behviour for required validation is to enforce it only when the form is submitted. See https://jqueryvalidation.org/required-method/ .
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49371 Mon Oct 17 13:34:03 MDT 2016 mircea.toma ICE-11132 Fix variable capturing when defining proxy callback.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/clientvalidator/clientvalidator.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49372 Mon Oct 17 14:10:13 MDT 2016 mircea.toma ICE-11132 Add inline comments. Add 'onfocusin' callback proxying.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/clientvalidator/clientvalidator.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49375 Mon Oct 17 17:41:00 MDT 2016 mircea.toma ICE-11132 Mark submit for acquiring list items with 'ice.skipClientValidation' parameter.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/autocompleteentry/autocompleteentry.js
        Hide
        Mircea Toma added a comment - - edited

        Liana said:
        "I made a new test app /autoCompleteEntryClientValidateRequired2.jsf found at: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/autoCompleteEntry
        Here there are 3 autoCompleteEntries in a form, set up as suggested in your last comment in ICE-11132.

        <ace:autoCompleteEntry id="autoCompleteEntry1" value="#{autoCompleteEntryClientVal.value1}"
                                                rows="10" label="ace:autoCompleteEntry 1" labelPosition="top">             
                         <ace:clientValidateRequired  />      
                         <ace:ajax execute="@this" render="@this messageGrid1" event="blur"/>         
                        <f:selectItems value="#{autoCompleteEntryBean.cities}"/>
        </ace:autoCompleteEntry>
        

        The first autoCompleteEntry validates as expected but the other two do not. No messages are shown for autoCompleteEntries 2 and 3 unless a submit via submit button is performed."

        Show
        Mircea Toma added a comment - - edited Liana said: "I made a new test app /autoCompleteEntryClientValidateRequired2.jsf found at: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/autoCompleteEntry Here there are 3 autoCompleteEntries in a form, set up as suggested in your last comment in ICE-11132 . <ace:autoCompleteEntry id= "autoCompleteEntry1" value= "#{autoCompleteEntryClientVal.value1}" rows= "10" label= "ace:autoCompleteEntry 1" labelPosition= "top" > <ace:clientValidateRequired /> <ace:ajax execute= "@ this " render= "@ this messageGrid1" event= "blur" /> <f:selectItems value= "#{autoCompleteEntryBean.cities}" /> </ace:autoCompleteEntry> The first autoCompleteEntry validates as expected but the other two do not. No messages are shown for autoCompleteEntries 2 and 3 unless a submit via submit button is performed."
        Hide
        Mircea Toma added a comment -

        Fixed disableRules function to return the disabled rules for the current submit (as it's expected from it).

        Show
        Mircea Toma added a comment - Fixed disableRules function to return the disabled rules for the current submit (as it's expected from it).
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49390 Thu Oct 20 12:48:11 MDT 2016 mircea.toma ICE-11132 Fix disableRules function to return the disabled rules for the current submit (as it's expected from it).
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/clientvalidator/clientvalidator.js
        Hide
        Liana Munroe added a comment -

        Verified ICEfaces 4 trunk r49391, Tomcat 7, FF 47, Chrome 53, MS Edge, IE 11, 10, 9, 8.

        Show
        Liana Munroe added a comment - Verified ICEfaces 4 trunk r49391, Tomcat 7, FF 47, Chrome 53, MS Edge, IE 11, 10, 9, 8.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49399 Mon Oct 24 15:44:26 MDT 2016 mircea.toma ICE-11132 Modified ace:radioButton renderer to lazy initialize the client-side component code.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/radiobutton/RadioButtonRenderer.java
        Ken Fyten made changes -
        Fix Version/s 4.2.BETA [ 13091 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Liana Munroe
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: