• Post Reply Bookmark Topic Watch Topic
  • New Topic

How view of table can be controlled on a Button

 
Dinesh Remje
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • 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.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!