0 Replies Latest reply: Aug 26, 2013 10:42 AM by vasan_kps RSS

    How do I do a partial refresh of a section of a page after I af:fileDownloadActionListener completes ?

    vasan_kps

      Hi Folks,

      I have a use case where I'll have to download some content to the local file system on click of a button.  I've used af:fileDownloadActionListener to accomplish the content download to a file.   Once I complete the download  and my handler completes running,  I want to do a partial refresh of a different section of the page.  I attempted doing a partial refresh  at the end of my fileDownloadActionListener handler method as follows, however it doesn't work.

       

      Code Snippet:-

      -----------------------

      ComponentUI comp =FacesContext.getCurrentInstance().getViewRoot().findComponentId("emT:selectone");

      RequestContext.getCurrentInstance().addPartialTarget(comp);

       

      Can some one explain why the above approach doesn't work?  Also, I'd like to know how the above use case can be achieved?

       

      Javascript way fails as well:

      ---------------------------------------

       

      I wrote a javascript as follows in the .jspx

      function queueValueChangeEvent()

                  {

                      var comp = AdfPage.PAGE.findComponent("emT:request_xml_choice_toggle");

                      AdfChangeEvent.queue(comp, "XML View", "Tree View", true);

                      alert("Hi");

                  }

       

      and I tried invoking the javascript from the fileDownloadActionListener method as follows:-

       

      Service.getRenderKitService(FacesContext.getCurrentInstance(),

                                                 ExtendedRenderKitService.class).addScript((FacesContext.getCurrentInstance(), "queueValueChangeEvent()" );

       

      The above approach fails as well. Please help me to address the said use case..

       

       

      Thanks,

      Vasan

       

      Message was edited by: vasan_kps