File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Another problem with display:table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Another problem with display:table" Watch "Another problem with display:table" New topic

Another problem with display:table

Vijendra Runwal
Ranch Hand

Joined: Apr 17, 2006
Posts: 52
Can anyone please help me in setting the visibility of tables in display:table tag.I want to disable the table when the list/records is empty.I want to use any of the attributes related to display:table tag only.It's not possible for me to use logi:notEmpty or anyother jsp logic tag as i have 8 tables/lists to handle on one jsp.Is there any way out???

[ April 19, 2006: Message edited by: Vijendra Runwal ]

Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I don't understand why having eight tables in one JSP makes it impossible for you to use logic:notEmpty tags. Could you explain your reasoning?

Consultant, Sima Solutions
Vijendra Runwal
Ranch Hand

Joined: Apr 17, 2006
Posts: 52
Actually on the jsp page there are 8 buttons,which on hitting displays one of the 8 tables.All the buttons and tables are there on the same page.On hitting the button Java Script function is called which makes one table visible and other 7 as hidden.I have used decorator for displaying tables with pagesize attribute of display:table set to 4.The problem occurs when the table consist of more than 4 records.Suppose table shows page 1,2,3(in table header) for 12 records,first page(with four records) displayed first time but when i hit 2 or 3 it disappears(i.e action is called which is there in requestURI attribute of display:table).Next time when i hit the same button i get 2 or 3 page that i requested last time.Now there are two options that i think are possible a)go for new action or b)to call a js function inside logic:notEmpty tag.

Solution a) is not feasible , i am working on b) but having problems with javascript.

One condition is there that at any time any of the tables may be empty or may consist of 20-30 records.

I also tried div tag but that's not working.

I am trying to make a js function which will make the table scrollable(with vertical scrollbars).

The problem is calling the js function inside logic:notEmpty tag and passing table id as parameter to the function.

Hope now u get my problem.

[ April 20, 2006: Message edited by: Vijendra Runwal ]
I agree. Here's the link:
subject: Another problem with display:table
It's not a secret anymore!