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

        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.
        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.
        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).
        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
        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.
        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.
        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.
        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.
        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.
        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: