7 Replies Latest reply on Jan 3, 2012 3:54 AM by ubaid.raja

    a4j:commandButton doesn't perform any action in IE

    ubaid.raja

      I have an a4j command button in my .xhtml page

       

      <a4j:commandButton id="btnUpdate"

           disabled="#{manageCountriesBB.updateButton}"

           value="#{msg.button_update}" styleClass="btnStandard"

           action="#{manageCountriesBB.updateCountries}">

      </a4j:commandButton>

       

      and the taglibs are defined like this,

       

      xmlns:a4j="http://richfaces.org/a4j"

      xmlns:rich="http://richfaces.org/rich"

       

      But this button doesnt perform any action in Internet Explorer, although it works in Mozilla firefox and Google Chrome.

       

      My working environment is,

      My Eclipse 8.6, Apache Tomcat 7.0.22, JSF 2.0 and Rich Faces 4.1.0.20110805-M1 with facelets.

       

      Any help will be highly appreciated.

       

      Thanks

        • 1. Re: a4j:commandButton doesn't perform any action in IE
          sivaprasad9394

          remove disabled attribute in the button or use h:commandButton.....

          • 2. Re: a4j:commandButton doesn't perform any action in IE
            healeyb

            There shouldn't be a problem with disabled=, as long as the bean property evaluates to true at

            click time, of course. A possible cause of the problem is that the default execute= value

            for a4j:commandButton is @form, and one of your form input values is failing validation. You

            could put a h:messages or rich:messages on the page to help diagnose this. Exactly why this

            would differ from browser to browser I'm not entirely sure at this point, unless firefox & chrome

            are filling in default values, which they tend to do better than IE (IMHO).

             

            A couple of other things that might help shed light on the problem:

             

            - is the commandButton inside an h:form?

            - which version of IE?

            - is the commandButton inside a popupPanel?

             

            Regards,

            Brendan.

            • 3. Re: a4j:commandButton doesn't perform any action in IE
              sivaprasad9394

              I have implemented like this,

               

              <a:commandButton  value="Next >>" actionListener="#{feedbackDetailHome.validateFormFieldsFirstPopUp}"

                                  reRender="outputpanelID,feedbackPopUp,categoryFirstField,commentFirst,dateFirst,fromField"                     

                                  style="text-align:center" oncomplete="if(#{feedbackDetailHome.flagshowMSecondPanel})Richfaces.showModalPanel('feedbackPopUp');">  

                               <f:param name="docLibraryDocId"

                                          value="#{feedbackDetailHome.hiddenParamDocdId}"/> 

                              </a:commandButton>

               

               

              popup.bmp

              • 4. Re: a4j:commandButton doesn't perform any action in IE
                ubaid.raja

                @Brendan, Thanks for the reply,

                I have tried it with execute=@form and @component but of no avail. My button is inside a form and also there are no values that are left blank, so i dont think that is the problem.

                My back end bean scope is set to ViewScope and when i click on the button, control is transfered to Constructor of the back end bean rather than the specific method. But this button is working perfectly in mozilla firefox and google chrome.

                I am using IE8.

                • 5. Re: a4j:commandButton doesn't perform any action in IE
                  healeyb

                  All I can think of is to clear the browser cache, I wonder if the server could be returning a 304 not modified

                  response?

                  • 6. Re: a4j:commandButton doesn't perform any action in IE
                    ubaid.raja

                    Thanks for all the answers,

                    I cleared the browser cache and even re install my browser, but still that problem persists.

                    • 7. Re: a4j:commandButton doesn't perform any action in IE
                      ubaid.raja

                      I have searched for this over and over again, and after i came across this thread

                      http://community.jboss.org/message/591419

                      this solved my issue.

                      I was rendering a form within another form which was causing issue and thus i wasn't able to perform any action on first click of a4j:commandButton, and after i click on the button the 2nd time control was transfered to the constructor making my backing bean behave as 'Request Scope'. Now i am rendering id's of the components rather than the form itself and is working for me, although this thing worked for me in RF3.3.

                      Thanks for all the help.