2 Replies Latest reply on May 28, 2008 6:38 AM by davely

    display a table when clicking a link

    davely

      Hello,


      I am trying to display some rows of a table only if the user clicks on a link in the table. What is the best way to do this ? I need to use s:link on some text, and then some rows of the table would appear kinda similar to a SimpleTogglePanel.


      Any ideas ?


      Thanks very much


        • 1. Re: display a table when clicking a link
          joeviterbo

          Maybe you could try a4j:support and use the reRender-Attibute

          • 2. Re: display a table when clicking a link
            davely

            Thanks Christian,


            hmmm I looked at a4j:support reRender-Attribute, but not sure how to start.


            I tried a



            <a4j:commandButton value="update" reRender="infoBlock"/>
            
            <h:panelGrid id="infoBlock">
            some data to display when user press update
            </h:panelGrid>



            but it didn't work.


            Any sample examples or sites you could refer me to ?


            What I am trying to do is to display rows of a table when a user clicks on a link. Sorta like an explorer tree, when I click on the file, it is expanded and sub files are displayed. So I am trying to do this with rows, when I click on a row, it is expanded and rows are displayed below with information.


            Thanks!