ICEfaces
  1. ICEfaces
  2. ICE-10100

Change default ajax event to 'valueChange' for input components

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.BETA
    • Fix Version/s: 4.0
    • Labels:
      None
    • Environment:
      Any

      Description

      According to the JSF specification, the 'valueChange' ajax event is the default event for input components such as h:inputText and h:selectOneMenu. Our input components use 'blur' as the default event. In order to better align to the JSF specification, our input components should have 'valueChange' as their default ajax event.

        Activity

        Arturo Zambrano created issue -
        Arturo Zambrano made changes -
        Field Original Value New Value
        Assignee Arturo Zambrano [ artzambrano ]
        Arturo Zambrano made changes -
        Fix Version/s 4.0 [ 11382 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #41524 Thu Jun 26 11:00:02 MDT 2014 art.zambrano ICE-10100 changed default ajax event to valueChange for input components; added valueChange ajax event to ace:textAreaEntry
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textentry/TextEntryMeta.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textareaentry/TextAreaEntryMeta.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/autocompleteentry/AutoCompleteEntryMeta.java
        Hide
        Arturo Zambrano added a comment -

        Committed fix at revision 41524. Changed default ajax event to valueChange for ace:autoCompleteEntry, ace:textEntry, and ace:textAreaEntry; added valueChange ajax event to ace:textAreaEntry.

        The following input components already had the valueChange event as their default: ace:comboBox, ace:maskedEntry, ace:themeSelect, ace:simpleSelectOneMenu, ace:selectmenu.

        I tried adding the valueChange event to ace:richTextEntry now that it was updated to version 4.3, since the onchange has never been properly supported. However, the event it's still not properly supported; the event fires every time one types a character, so this component was left unmodified in this regard.

        Show
        Arturo Zambrano added a comment - Committed fix at revision 41524. Changed default ajax event to valueChange for ace:autoCompleteEntry, ace:textEntry, and ace:textAreaEntry; added valueChange ajax event to ace:textAreaEntry. The following input components already had the valueChange event as their default: ace:comboBox, ace:maskedEntry, ace:themeSelect, ace:simpleSelectOneMenu, ace:selectmenu. I tried adding the valueChange event to ace:richTextEntry now that it was updated to version 4.3, since the onchange has never been properly supported. However, the event it's still not properly supported; the event fires every time one types a character, so this component was left unmodified in this regard.
        Hide
        Ken Fyten added a comment -

        For ace:richTextEntry, can we do the following:

        • Use the valueChange event emitted from the CKeditor on every key press to set a "valueIsChanged" flag in our component, and then when the user leaves the components completely (on blur) and the flag is set, then we emit a valueChange event ourselves at the component level.
        Show
        Ken Fyten added a comment - For ace:richTextEntry, can we do the following: Use the valueChange event emitted from the CKeditor on every key press to set a "valueIsChanged" flag in our component, and then when the user leaves the components completely (on blur) and the flag is set, then we emit a valueChange event ourselves at the component level.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #41539 Fri Jun 27 15:56:34 MDT 2014 art.zambrano ICE-10100 added valueChange event to ace:richTextEntry and changed default ajax event to it
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/richtextentry/richtextentry.js
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/richtextentry/RichTextEntryMeta.java
        Hide
        Arturo Zambrano added a comment -

        r41539: added valueChange event to ace:richTextEntry and changed default ajax event to it.

        Show
        Arturo Zambrano added a comment - r41539: added valueChange event to ace:richTextEntry and changed default ajax event to it.
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #41583 Thu Jul 03 15:09:40 MDT 2014 art.zambrano ICE-10100 added onchange event listener to call ice.setFocus(); corrected default values for valueChange ajax event
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textentry/TextEntryMeta.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textareaentry/TextAreaEntryMeta.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/textareaentry/textareaentry.js
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/textentry/textentry.js
        Hide
        Arturo Zambrano added a comment -

        QA reported on ICE-9500...

        Re-opening this JIRA because of the following regressions in showcase (Icefaces 4 trunk rev. 41557/all browsers):
        messages/ textEntry/ textAreaEntry (all browsers)
        > All: demos are not functional: messages are not rendered when tabbing through without text being entered; when tabbing through after typing text, the focus jumps back to the input entry at the end of the typed text (no errors seen).
        Steps:
        type at least one character in one of the inputs.
        press Tab - > focus is initially visible on the next input entry, but it goes back to the first input entry, at the end of the typed text.

        Those issues were caused (more precisely, they became visible) after the changes related to this JIRA. The default event for ace:textEntry and ace:textAreaEntry was changed from blur to valueChange. The client-side code had an event listener on the blur event to call ice.setFocus(), so that no focus is returned to the component when the response comes. This issue was fixed by adding a similar event handler for the change event.

        Additionally, I realized that the default render and execute values for the valueChange event of ace:textEntry and ace:textAreaEntry were wrong. They were execute=@all, render=@this. It should've been the other way: execute=@this, render=@all. This was fixed as well.

        These fixes were committed at revision 41583.

        Show
        Arturo Zambrano added a comment - QA reported on ICE-9500 ... Re-opening this JIRA because of the following regressions in showcase (Icefaces 4 trunk rev. 41557/all browsers): messages/ textEntry/ textAreaEntry (all browsers) > All: demos are not functional: messages are not rendered when tabbing through without text being entered; when tabbing through after typing text, the focus jumps back to the input entry at the end of the typed text (no errors seen). Steps: type at least one character in one of the inputs. press Tab - > focus is initially visible on the next input entry, but it goes back to the first input entry, at the end of the typed text. Those issues were caused (more precisely, they became visible) after the changes related to this JIRA. The default event for ace:textEntry and ace:textAreaEntry was changed from blur to valueChange. The client-side code had an event listener on the blur event to call ice.setFocus(), so that no focus is returned to the component when the response comes. This issue was fixed by adding a similar event handler for the change event. Additionally, I realized that the default render and execute values for the valueChange event of ace:textEntry and ace:textAreaEntry were wrong. They were execute=@all, render=@this. It should've been the other way: execute=@this, render=@all. This was fixed as well. These fixes were committed at revision 41583.
        Hide
        Carmen Cristurean added a comment -

        Re-opening because the same showcase demos (messages, textEntry, textAreaEntry) fail: no faces messages/ validation messages are rendered on page when tabbing through, unless at least one character is typed, then removed from the input entry (rev.41589).

        Show
        Carmen Cristurean added a comment - Re-opening because the same showcase demos (messages, textEntry, textAreaEntry) fail: no faces messages/ validation messages are rendered on page when tabbing through, unless at least one character is typed, then removed from the input entry (rev.41589).
        Carmen Cristurean made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Carmen Cristurean added a comment -

        Added tests for 'valueChange' ajax event, and changed default ajax event to valueChange for ace:textEntry, ace:textAreaEntry, ace:autoCompleteEntry, ace:richTextEntry (the other ace: components mentioned above already had tests with the valueChange event as default).

        Issue:
        The ace:richTextEntry "valueChange" Event Test w/ ValueChangeListener attribute (Default execute/render) Ajax test fails:
        Expected message = "ValueChangeEvent received! (#1)", Actual message =

        The test can be found here:
        http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/richTextEntry

        Show
        Carmen Cristurean added a comment - Added tests for 'valueChange' ajax event, and changed default ajax event to valueChange for ace:textEntry, ace:textAreaEntry, ace:autoCompleteEntry, ace:richTextEntry (the other ace: components mentioned above already had tests with the valueChange event as default). Issue: The ace:richTextEntry "valueChange" Event Test w/ ValueChangeListener attribute (Default execute/render) Ajax test fails: Expected message = "ValueChangeEvent received! (#1)", Actual message = The test can be found here: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/richTextEntry
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #41621 Thu Jul 10 12:07:44 MDT 2014 art.zambrano ICE-10100 changed ajax event to blur in ace:textEntry and ace:textAreaEntry demos to showcase 'required' feature
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/textEntry/textEntryIndicator.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/textEntry/textEntry.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/textAreaEntry/textAreaEntryReqStyle.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/textAreaEntry/textAreaEntry.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/textEntry/textEntryLabel.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/textEntry/textEntryReqStyle.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/textAreaEntry/textAreaEntryLabel.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/textAreaEntry/textAreaEntryIndicator.xhtml
        Hide
        Arturo Zambrano added a comment -

        r41621: changed ajax event to blur in ace:textEntry and ace:textAreaEntry demos to showcase 'required' feature.

        Show
        Arturo Zambrano added a comment - r41621: changed ajax event to blur in ace:textEntry and ace:textAreaEntry demos to showcase 'required' feature.
        Arturo Zambrano made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Arturo Zambrano added a comment -

        The problem with the richTextEntry test is in the app itself. The valueChangeListener is firing, but that test is missing render="@all" execute="@all" in the ajax tag to render the text fields under the editor, and that's why the message is not displayed on the page. Please fix.

        Show
        Arturo Zambrano added a comment - The problem with the richTextEntry test is in the app itself. The valueChangeListener is firing, but that test is missing render="@all" execute="@all" in the ajax tag to render the text fields under the editor, and that's why the message is not displayed on the page. Please fix.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #41625 Thu Jul 10 14:08:40 MDT 2014 art.zambrano ICE-10100 corrected default execute and render values for valueChange event
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/richtextentry/RichTextEntryMeta.java
        Hide
        Arturo Zambrano added a comment -

        Corrected default execute and render values for valueChange event to execute=@this, render=@all. No need to fix the test app now.

        Show
        Arturo Zambrano added a comment - Corrected default execute and render values for valueChange event to execute=@this, render=@all. No need to fix the test app now.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #41773 Fri Jul 11 14:15:25 MDT 2014 ken.fyten ICE-10100 - Changed ajax event to blur in ace:messages demo to showcase 'required' feature.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/message/message.xhtml
        Hide
        Liana Munroe added a comment -

        Re-opening for possible regression.
        Showcase ace:textEntry/textAreaEntry
        > All demos: validation messages generated on any textEntry/textAreaEntry demo are rendered on the other textEntry/textAreaEntry pages.
        To reproduce
        Navigate to ace:textEntry > Overview
        Insert cursor in first field then tab through 2 more fields.
        Note validation messages for required fields.
        Navigate to ace:textEntry > Auto Tab
        Note that the messages rendered in the Overview demo are now displayed in the Auto Tab demo.

        Show
        Liana Munroe added a comment - Re-opening for possible regression. Showcase ace:textEntry/textAreaEntry > All demos: validation messages generated on any textEntry/textAreaEntry demo are rendered on the other textEntry/textAreaEntry pages. To reproduce Navigate to ace:textEntry > Overview Insert cursor in first field then tab through 2 more fields. Note validation messages for required fields. Navigate to ace:textEntry > Auto Tab Note that the messages rendered in the Overview demo are now displayed in the Auto Tab demo.
        Liana Munroe made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Arturo Zambrano added a comment -

        I couldn't reproduce the last issue. Please re-test.

        Show
        Arturo Zambrano added a comment - I couldn't reproduce the last issue. Please re-test.
        Arturo Zambrano made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Liana Munroe added a comment -

        No longer able to reproduce Icefaces 4 trunk r42039. Tomcat7, all browsers.

        Show
        Liana Munroe added a comment - No longer able to reproduce Icefaces 4 trunk r42039. Tomcat7, all browsers.
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Arturo Zambrano
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: