2 Replies Latest reply on Sep 19, 2011 10:05 AM by hakan_kisa

    a4j:commandlink not firing in rich:popupPanel

    hakan_kisa

      Hi @all,

       

      I´m quite new in JSF and especially in Richfaces, but I´ve found many helpful answers in this forum.

      Now I´m have a problem since some days and I did´nt find a solution in google and I would now like to turn to you. I hope somebody can help me.

       

      I´m using rich:popupPanel on Richfaces4. It function quite good. In my popupPanel I have a CommanLink.

      If I using h:commandlink, everything is fine. The Action is firing and my popupPanel closing automaticly, after clicking on the link.

      My Problem is, that I did´nt want, that the Panel closing automaticly and I wand to render an other Part of my code (h:datatable)

       

      If I´m using a4j:commandLink, the action does´nt firing without any errors.

       

      A simple example:

       

      <h:form id="form" > 

       

      <div id="content">

         

          <h:commandButton value="Call the popup">

              <rich:componentControl target="popup" operation="show" />   

          </h:commandButton>   

         

          <rich:popupPanel id="popup" modal="true" autosized="true" resizeable="false">

            

              <f:facet name="header">

                  <h:outputText value="Simple popup panel" style="color: white;" />

              </f:facet>

             

              <f:facet name="controls" >

                  <h:outputLink value="#" onclick="#{rich:component('popup')}.hide(); return false;" style="color: white;" >X</h:outputLink>                               

              </f:facet>

             

              <p>Content Content Content Content Content</p>

              <br/><br/>

             

              <h:commandLink value="Click" action="#{testclassbean.testmethod()}" />

              <br/>

             

              <a4j:commandLink value="ajaxClick" action="#{testclassbean.testmethod()}" />           

              <br/>

       

              <h:commandLink value="close" action="#" onclick="#{rich:component('popup')}.hide()" />      

          </rich:popupPanel>

       

      </div>

      </h:form>

       

      The a4j:commandLink does´nt effect anything.

       

      And if I put a <a4j:ajax>-Tag to the h:commandLink like this:

      <h:commandLink value="Click" action="#{testclassbean.testmethod()}" >

           <a4j:ajax event="click" render="dataTable">

      </h:commandLink>

       

      ---the Link does´nt firing the action as same as a4j:commandLink.

       

      Pls, can anybody help me!

       

      Thx a lot!

       

      Hakan