<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 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 <input>:</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 <r:calendar> or <r:autocomplete>, 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>