• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

How view of table can be controlled on a Button

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
there are various fields in table like name, gender, addr, college name, college url, college addr, project details etc.
Now i want that only few details should be displayed on page like name, addr, gender, city, coll addr. Above the table i have provided a button whose value is MORE DETAILS.
After clicking the button the table should get expanded to show all the details i mean all the fields.
Right now i have created two jsp pages where 1st JSP page has selected fields and the 2nd JSP page has all the fields which i have achieved through the code shown below




So i want to ask is there any other method through which i can achieve the above functionality by maintaining only one JSP page and not the two JSP page of same contents.
 
Sheriff
Posts: 67598
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
Of course. Use <c:if> to decide whether to include the extra details or not.
 
Dinesh Remje
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply i got it, but how can i check that the button is clicked in <c:if> loop
 
Bear Bibeault
Sheriff
Posts: 67598
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
Have the page controller set a scoped variable in the request that determines whether the summary or detail view is to be shown. The conditional can check that variable.
 
Dinesh Remje
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have done the following changes in my code but its not working



I have checked here that the button is not clicked.
But its not working
 
Dinesh Remje
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
do i need to decalre that param.Submit variable in begining
 
Dinesh Remje
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anybody show me how can make that button working i my JSP page this is what i have done but its not working


But it didnt work out. So what changes should i do in my code so that it will work fine.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic