[richfaces-issues] [JBoss JIRA] (RF-12114) Richfaces 4.2 rich:autocomplete don't fire ajax on blur event

Brian Leathem (JIRA) jira-events at lists.jboss.org
Thu Jul 26 15:54:17 EDT 2012


    [ https://issues.jboss.org/browse/RF-12114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708178#comment-12708178 ] 

Brian Leathem commented on RF-12114:
------------------------------------

Consider the tag:

{code}
<rich:autocomplete id="autocompleteNameId"
                   value="#{richBean.name}"
                   required="true"
                   autocompleteMethod="#{richBean.autocompleteName}"
                   var="result"
                   fetchValue="#{result}"
                   requestDelay="100"
                   showButton="true"
                   onblur="console.log('autocomplete blur')">
  <a4j:ajax event="blur" listener="#{richBean.onBlurListener1}" render="outId1">
  </a4j:ajax>

  <h:column>
    <h:outputText value="#{result}" />
  </h:column>

</rich:autocomplete>
{code}

The event is successfully propagated to the server, but during the component decode, the source of the event (_behaviorSource_) is compared to the _clientId_ of the component.  The event is only processed if the ids match.  See:

org.richfaces.renderkit.RenderKitUtils#509
{code}
if (behaviorSource != null && behaviorSource.equals(clientId)) {
    if (behaviorsForEvent != null && !behaviorsForEvent.isEmpty()) {
        for (ClientBehavior behavior : behaviorsForEvent) {
            behavior.decode(context, component);
        }
        return behaviorEvent;
    }
}
{code}

In the case of the above autocomplete tag:
{code}
clientId = 'myForm:autocompleteNameId'
{code}
and
{code}
behaviorSource = 'myForm:autocompleteNomeIdInput'
{code}

They don't match, and so the event isn't decoded.

This is exactly the issue uncovered in RF-10862, and discussed in the dev forum thread: 
https://community.jboss.org/thread/172831
                
> Richfaces 4.2 rich:autocomplete don't fire ajax on blur event
> -------------------------------------------------------------
>
>                 Key: RF-12114
>                 URL: https://issues.jboss.org/browse/RF-12114
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: base functionality , component-a4j-core, component-input
>    Affects Versions: 4.2.0.Final
>         Environment: Richfaces 4.2 Final, Mojarra 2.1.7, Tomcat 7.0.26
>            Reporter: Ivan Costa
>            Assignee: Brian Leathem
>              Labels: richfaces
>             Fix For: 4.3.0.Milestone1
>
>
> rich:autocomplete don´t call actionListener on blur event

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the richfaces-issues mailing list