Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

present data in collasible and expandible format.

 
thomas davis
Ranch Hand
Posts: 207
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


OR

  • To Add the Expand collapse functionality in a .jsp to display and hide the data


    Details:

    Here I'm able to get the data from webservices to jsp. While displaying the data there is a provision to show and hide some of its data

    Example:

    If Suppose there are 3 rows(Student data) coming from database, Say each row as Student for instance. and Each student is associated with some courses(Say course1, course2 and course3).

    Appearance should look like this:

    Table1:

    Details S.No S.Name S.Address
    --------------------------------
    + 10 Alex Texas
    + 20 John Dallas
    + 30 Nick Newyork

    Now if we click on + button associated with first record, it should exapand and show the first record details and - button to be displayed as shown below.

    Table2:

    Details S.No S.Name S.Address
    --------------------------------
    - 10 Alex Texas

    course1 : Java
    cpurse2 : j2ee

    - 20 John Dallas

    course1: .Net
    course2: php

    + 30 Nick Newyork


    And when when we click on - button it should hide the data and should display the above data as Table1.


    Here I got all the data dynamically. The only problem is UI arrangement(Displaying it).
  •  
    Jeanne Boyarsky
    author & internet detective
    Marshal
    Posts: 34681
    367
    Eclipse IDE Java VI Editor
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Can you use jQuery? Take a look at the "my profile" page here for an example.
     
    thomas davis
    Ranch Hand
    Posts: 207
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Jeanne Boyarsky wrote:Can you use jQuery? Take a look at the "my profile" page here for an example.


    how do I do that ? Do you have any example? I need to get data ,when user clicks on the link and expand it with data. And more importantly,the screen should not reloaded. Thanks, I appreciate your insights.. cana you please tell me how do I go to your profile?
     
    Bear Bibeault
    Author and ninkuma
    Marshal
    Pie
    Posts: 64988
    86
    IntelliJ IDE Java jQuery Mac Mac OS X
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Please reserve bold for emphasis -- not for your entire post. I have removed it.

    The jQuery UI Accordion widget is described and demoed here.

    "My Profile" is a link near the top of the page.
     
    Bear Bibeault
    Author and ninkuma
    Marshal
    Pie
    Posts: 64988
    86
    IntelliJ IDE Java jQuery Mac Mac OS X
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    P.S. If an accordion is not what you are looking for because the data is hierarchical (like a file system), you can alos find many jQuery tree plugins.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic