Nicholas Oxhøj created RF-13152:
-----------------------------------

             Summary: <a4j:support> does not override literal event handlers 
without EL-espressions
                 Key: RF-13152
                 URL: https://issues.jboss.org/browse/RF-13152
             Project: RichFaces
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: component-a4j-core
    Affects Versions: 3.3.3.Final
         Environment: JSF 1.2
            Reporter: Nicholas Oxhøj
            Priority: Minor


If I nest an <a4j:support> inside a component which also has an inline event 
listener whose text doesn't contain any EL-expressions, the <a4j:support> 
_won't_ be executed. For example

{code}
<h:inputText onchange="alert('Inline listener')">
  <a4j:support event="onchange" onsubmit="alert('a4j:support listener')" />
</h:inputText>
{code}

will show an alert with "Inline listener" and *not* perform the <a4j:support>.

If you add _any_ EL-expression to the inline event listener, the <a4j:support> 
_will_ be executed instead. For example

{code}
<h:inputText onchange="alert('Inline listener')#{''}">
  <a4j:support event="onchange" onsubmit="alert('a4j:support listener')" />
</h:inputText>
{code}

*will* show an alert with "a4j:support listener".

I am not exactly sure how a UIComponents "attributes" and "value expression 
bindings" are supposed to work together according to the JSF spec, but the 
problem here seems to be that when the inline listener doesn't contain any 
EL-expressions, it is stored as an "attribute", but the <a4j:support> is stored 
as a "value binding expression". Later, during page rendering, 
HtmlInputText#getOnchange() will first look for an attribute called "onchange" 
and return that if found. Only if an attribute is not found, it looks for a 
"value expression binding" and returns that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to