• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

present data in collasible and expandible format.

 
Ranch Hand
Posts: 207
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
  •  
    author & internet detective
    Posts: 41967
    911
    Eclipse IDE VI Editor Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • 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?
     
    Sheriff
    Posts: 67750
    173
    Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
    Sheriff
    Posts: 67750
    173
    Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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.
     
    Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
    We need your help - Coderanch server fundraiser
    https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
    reply
      Bookmark Topic Watch Topic
    • New Topic