2 Replies Latest reply on Jun 1, 2009 7:47 PM by gonorrhea

    Open a pop browser window from my Action Class

    akabir77

      Hi guys


      I am fairly new with seam. And need help.


      My task is this:
      After I do a search it gives me back results. within that result I have make one of the column hyper link. and when the user clicks on hyper link it will get the data and show it in a pop window.


      Now i got it working upto getting the data. I have a list variable that is holding the data. now how do i popup a window from my action class, pass the variable List so that I can use the  rich faces tag to loop through my List and populate the table?


      I don't need to use JSF tag. All i need to show the result set in a table in a pop up.


      Please help.

        • 1. Re: Open a pop browser window from my Action Class
          gonorrhea

          You can use @DataModelSelection to inject the current entity of the dataTable when user clicks on the links in rich:dataTable.


          Or when user clicks on the column with the hyper-links, you can pass the row number as a param to the action handler method to populate and outject via @DataModel for the dataTable of the popup window.


          <a4j:commandLink   value="View History"
                 action="{#foo.processSelection(var.getRowIndex())}"                                                             
          oncomplete="Richfaces.showModalPanel('yourModalPanel');" 
          reRender="yourModalPanel"/>



          If you wish to not submit the form (HTTP GET instead) then you can replace a4j:commandLink with s:link.

          • 2. Re: Open a pop browser window from my Action Class
            gonorrhea

            whoops.  just noticed a typo in my code snippet.


            should be:


            action="#{foo.processSelection(var.getRowIndex())}"