<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Thanks for bringing this up Lukas. 
      It's an issue we've skirted around before and never dealt with
      head on, mostly in the context of the pickList component [1,2,3].<br>
      <br>
      In RF-12360 [1] the user reporting the issue remarked:<br>
      "
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      this is not consistent with standard h:selectOneMenu onchange
      behaviour (which fires onchange event immediately)."<br>
      This however is inconsistent with the JSF API docs [4] which state
      that the onchange attribute is<br>
      "
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      Javascript code executed when this element loses focus and its
      value has been modified since gaining focus."<br>
      <br>
      @QE: Do you have metamer configured with vanilla JSF tags?  We
      should do some investigative work and map out the onchange
      attribute behaviour for various HTML elements and JSF tags.<br>
      <br>
      @Lukas I like the idea of leaving keeping the change event aligned
      with the HTML and JSF specifications.  Introducing a new event is
      the right way to go.  W.r.t. your point about the attribute not
      being supported across all components - I don't think it's by any
      means a showstopper.  <br>
      <br>
      In fact I would suggest that rather than have a single event that
      all components reuse, we rather have each component offer the
      change event + some-semantic-event specific to that component that
      can be used to trigger earlier notifications.<br>
      <br>
      For example, this would be the "keypress" event in an input
      element, or the "select" event in one of the select components, or
      the "drag" event for the inputNumberSlider etc.<br>
      <br>
      Brian<br>
      <br>
      [1] <a href="https://issues.jboss.org/browse/RF-12360">https://issues.jboss.org/browse/RF-12360</a><br>
      [2] <a href="https://issues.jboss.org/browse/RF-12929">https://issues.jboss.org/browse/RF-12929</a><br>
      [3] <a href="https://issues.jboss.org/browse/RF-11617">https://issues.jboss.org/browse/RF-11617</a><br>
      <br>
      On 13-10-21 03:19 AM, Lukáš Fryč wrote:<br>
    </div>
    <blockquote
cite="mid:CAEroY36=A_-i8fd6qVHxcGfx6C2jZaA2m0ANUeJ3qowxa-zS3A@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div style="font-family:arial,sans-serif;font-size:13px">I would
          like to address an issue that arose from a discussion <a
            moz-do-not-send="true"
            href="https://issues.jboss.org/browse/RF-13180"
            target="_blank">https://issues.jboss.org/browse/RF-13180</a> .</div>
        <div style="font-family:arial,sans-serif;font-size:13px"><br>
        </div>
        <span style="font-family:arial,sans-serif;font-size:13px">When
          one reacts on changes of value, he can use 'change' event that
          have defficiency coming from classic HTML &lt;input&gt;:</span>
        <div style="font-family:arial,sans-serif;font-size:13px">
          <br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">- the
          'change' event is fired after 'blur' event when the value
          changed between a focus and a subsequent blur event</div>
        <div style="font-family:arial,sans-serif;font-size:13px">
          <br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">This
          means in component like &lt;r:calendar&gt; or
          &lt;r:autocomplete&gt;, a 'change' event is not fired when
          input is externally changed by selection of a value from
          popup, but only when a value is changed and then input is
          blurred.</div>
        <div style="font-family:arial,sans-serif;font-size:13px"><br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">This
          has downside in form of a bad experience:</div>
        <div style="font-family:arial,sans-serif;font-size:13px">
          <br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">*
          client-side validation is triggered when autocomplete is
          blurred, but it could be validated right after selection from
          a suggestion box</div>
        <div style="font-family:arial,sans-serif;font-size:13px">
          * so when one want to react on changes, he need to use
          behavior-based (as opposed to semantically-based) events, such
          as 'onkeypress', 'onselect'</div>
        <div style="font-family:arial,sans-serif;font-size:13px">
          <br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">----</div>
        <div style="font-family:arial,sans-serif;font-size:13px"><br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">This
          defficiency could be solved by introducing new event: e.g.
          'valuechanged' which would be defined as:</div>
        <div style="font-family:arial,sans-serif;font-size:13px"><br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">* event
          'valuechanged' is triggered when component's input is blurred
          or the value is changed externally</div>
        <div style="font-family:arial,sans-serif;font-size:13px"><br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">However,
          this solutions has its own drawback coming from a fact, that
          this event must be supported by library - so e.g. common JSF
          components won't be supported (unless we provide a shim for
          them - e.g. event triggering emulation).</div>
        <div style="font-family:arial,sans-serif;font-size:13px"><br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">~ Lukas</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
richfaces-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:richfaces-dev@lists.jboss.org">richfaces-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/richfaces-dev">https://lists.jboss.org/mailman/listinfo/richfaces-dev</a></pre>
    </blockquote>
    <br>
  </body>
</html>