0 Replies Latest reply on Jul 1, 2011 7:46 AM by Sukhendu Roy

    File download link not working in dynamic rich:dataTable

    Sukhendu Roy Newbie

      Hi All,


      I am trying to download a file based on a id passed by a link. The link is generated depending on the row I fetched from database in rich:dataTable. I am using a4j:htmlCommandLink



      <a4j:htmlCommandLink value="Download File" action="#{myBean.download}" rendered="#{log.id>0}">

             <f:param name="id" value="#{log.id}"/>



      "log" is the rich:dataTable var.


      Now when I click on this link my table became blank, and download method is not getting called.


      But if put this link outside the table and pass a fixed id value then it's working fine. Even it works in rich:dataTable which is not dynamic. 


      I have already used a4j:commandLink, the file is getting generated and stored in predefined path but not giving the option to user (save or open).


      I have used session as scope.


      So can you please tell me where I am going wrong.


      Thanks in advance..