2 Replies Latest reply on Sep 30, 2011 3:21 AM by leonardo ginting

    h:commandLink doesnt work

    leonardo ginting Newbie

      hi guys i had an issue why h:commandLink it do nothing when the button is clicked

       

      this is my code

       

      <rich:dataTable id="tablePermohonan" value="#{myBean.tableList}"  rows="5" var="item">

      <-- some column -->

      <rich:subTable>

      <---  some column -->                              

      <h:column>

                              <f:facet name="footer">

                                  <h:commandLink value="PRINT" action="#{myBean.print}">

                                      <f:param name="format" value="html"/>

                                    </h:commandLink>

                              </f:facet>

                          </h:column>

                      </rich:subTable>

                  </rich:dataTable>


      so when "PRINT" attribut is clicked it do nothing

      and i do write System.out.println("Succes"); but nothings happen at all,,

       

      by the way this table will come up after i press "SEARCH" button in another form and will reRender this table,,

       

      do have any advice for this guys?

       

      thnks in advance

      gb

        • 1. Re: h:commandLink doesnt work
          Newbie

          Do you have a h:form on your page?

           

          Maybe you have input elements on your page where validation fails. So executing the form does not work.

          You can also try to use ajax tag to execute only the link instead of the complete form:

           

          <h:commandLink value="PRINT" action="#{myBean.print}">

                <f:param name="format" value="html"/>

                <a4j:ajax event="click" execute="@this"/>

          </h:commandLink>

           

          I am using RF4. We use many h:commandButton this way and this works for us.

          • 2. Re: h:commandLink doesnt work
            leonardo ginting Newbie

            hi thom thnks for reply i have solved the problem,,

            the problem i thought the session is lost when pop up comes up and so i use a4j:keepALive to keep the session