8 Replies Latest reply on Apr 3, 2012 9:27 AM by adrianoschmidt

    RF 4.0 bug in a4j:ajax

    ilya40umov

      I'm using the latest SNAPSHOT of RichFaces 4.0

      I had to change

      <a4j:ajax event="change" execute="@this" render="@form" />

      to

      <f:ajax event="change" execute="@this" render="@form" />

      because a4j:ajax didn't worked with h:selectOneRadio (valueChangeListener didn't get a call)

        • 1. RF 4.0 bug in a4j:ajax
          ilya40umov

          Please, don't forget to check this problem. I'm still wondering if it's a bug in RF.

          • 2. RF 4.0 bug in a4j:ajax
            ilya_shaikovsky

            almost the same code used at calendar demo at richfaces-showcase. And I changed it to :

                                <h:selectOneRadio value="en/US"

                                    valueChangeListener="#{calendarBean.selectLocale}">

                                    <a4j:ajax event="change" render="@form" execute="@this"/>

                                    <f:selectItem itemLabel="US" itemValue="en/US" />

                                    <f:selectItem itemLabel="DE" itemValue="de/DE" />

                                    <f:selectItem itemLabel="FR" itemValue="fr/FR" />

                                    <f:selectItem itemLabel="RU" itemValue="ru/RU" />

                                </h:selectOneRadio>

            And it just works for me(Just updated latest code and built locally).. So not sure where the problem is... Do you using myFaces or Mojara JSF impl? Also check maybe there are some warnings in log or messages from component?

            • 3. RF 4.0 bug in a4j:ajax
              ilya40umov

              Ok. Thanks Ilya. I'll check this out. (I'm not using MyFaces and I didn't noticed any messages in log when I tried it.)  But if it works for you it should work for me too. =)

              • 4. Re: RF 4.0 bug in a4j:ajax
                elizeire

                Hello!

                Let me ask...any bug related to IE 8?

                 

                i have a code like that working perfectly at FireFox and Chrome, but for my surprise (not), this event "change" is not being listened when i use IE browser...

                I tried other events and it works, but i really need use the change event...

                 

                any help is welcome!

                 

                Thanx!

                • 5. Re: RF 4.0 bug in a4j:ajax
                  elizeire

                  Ok, i will provide more details:

                   

                   

                  <h:selectBooleanCheckbox value="#{element.enviado}" >
                  <a4j:ajax event="change" execute="@this"
                  listener="#{gerarArquivos.atualizarStatusEnvio}"
                  render=":arquivosGerados" >
                  </a4j:ajax>
                  </h:selectBooleanCheckbox>
                  
                  

                  On the internet explorer browser the behavior is not like "onchange" it is like "onblur", you need click again outside the checkbox to trigger the ajax method...

                   

                  any help?

                  • 6. Re: RF 4.0 bug in a4j:ajax
                    bleathem

                    If you are observing different behaviour between the various browsers for this event, then it looks to me like you've found a bug.  Please file a jira issue and we'll see about getting it resolved.

                    • 7. Re: RF 4.0 bug in a4j:ajax
                      richyclarke

                      Hi,

                      I am also seeing this behavior.

                      I works fine in Google Chrome but inInternet Explorer the change event is not fired until you click away from the component.

                      I have worked around this by using the 'click' event rather than the 'change' event, but this is not ideal for me as I am not sure whether the click is fired in all cases (i.e. when keyboard input is used).

                      I am using RF 4.0.0 final under JBOSS 7.

                      Regards

                      Rich

                      • 8. Re: RF 4.0 bug in a4j:ajax
                        adrianoschmidt

                        Hello,

                         

                        I'm with the same problem, in IE the event "change" works like "onblur". This happens only in IE. When i use Firefox or Chrome the event "change" works like "change" normally.

                         

                        Below is my code:

                         

                             <h:selectOneRadio id="changeImage" layout="pageDirection" value="#{naturalPersonController.imageSelectedRadio}">

                                 <a4j:ajax event="change" oncomplete="renderNaturalPersonImage(#{naturalPersonController.imageSelectedRadio})"/>

                                 <f:selectItem itemLabel="#{i18n.useActualImage}" itemValue="0"/>

                                 <f:selectItem itemLabel="#{i18n.useDefaultImage}" itemValue="1"/>

                                 <f:selectItem itemLabel="#{i18n.searchOnTheComputer}" itemValue="2"/>

                                 <f:selectItem itemLabel="#{i18n.captureWithWebcam}" itemValue="3"/>

                             </h:selectOneRadio>

                         

                        Someone has a solution or a workaround?

                         

                        Thanks!

                        Adriano Schmidt

                        www.localhost8080.com.br