File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes scrolling columns (like Excel) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "scrolling columns (like Excel)" Watch "scrolling columns (like Excel)" New topic
Author

scrolling columns (like Excel)

Max Moore
Greenhorn

Joined: Sep 06, 2007
Posts: 10
Hi dudes! I have a big problem now in my app. I'm using datatable (tomahawk) but I wish to have a scroll-horizontal option in my table (similar to Excel for example). In this way I could truncate a big column with a lot of information and if the user wants to see all information about this column, he could use the scroll-horizontal option. I don't know if you understand me requirements but if you have any doubt about my question, let me know please. Thanks in advance!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

Last time I had that problem I ended up embedding an applet in the page and letting Swing handle the scrolling. Not a solution that can be used just anywhere, alas.

To get smooth interactive scrolling, you're going to have to deal with something that can do that sort of work client-side. HTML is too static, and besides, the repeated round trips to/from the server would be awful. That leaves client-interactive things like applets, JavaScript/DHTML, and Flash. PLEASE don't do Flash - until they finally release a 64-bit plugin, Flash-based websites are useless to me.

I think if you do a little searching, you'll probably turn up a few scrollable AJAX grid systems. Whether any of them have yet been neatly bundled into a JSF tag I do not know.


Customer surveys are for companies who didn't pay proper attention to begin with.
Krithika Srinath
Ranch Hand

Joined: Apr 11, 2006
Posts: 52
Hi,

This sounded as an interesting problem for me since I'm also exploring JSF now. I came across this thread and thought might be of help to you.
Max Moore
Greenhorn

Joined: Sep 06, 2007
Posts: 10
thanks! Really sometimes I hate JSF jaja. Krithika thank you but I was reading this thread days before and it's not a practice solution for me. I'm looking for a table like AJAX where you can choose manually the size of each column. I know it's difficult but I think if I don't find a solution quickly I'm gonna build one by myself.

Tim, thanks but I can't use your solution because I can't use any applet in my app (I'm working in a company and there are f*cking rules! :P). By the way thanks!
A. Dusi
Ranch Hand

Joined: Sep 27, 2004
Posts: 114
Did you try using h:panelGroup with a fixed width and setting overflow:auto?
Your h:column data should be enclosed within this h:panelGroup.
I did not try this myself at a column level, but it works for me when used to enclose a table.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

Originally posted by Max Moore:
thanks! Really sometimes I hate JSF jaja. Krithika thank you but I was reading this thread days before and it's not a practice solution for me. I'm looking for a table like AJAX where you can choose manually the size of each column. I know it's difficult but I think if I don't find a solution quickly I'm gonna build one by myself.

Tim, thanks but I can't use your solution because I can't use any applet in my app (I'm working in a company and there are f*cking rules! :P). By the way thanks!


I know about rules - I just carried enough weight to override them in that one case. Some days you're the statue, some days you're the pidgeon.

If all you needed was to be able to explicitly control column widths, you can do that using CSS - I do it often. However, the scrolling is the sticky part, since vanilla HTML can't handle that. You'd definitely need active client-side logic.

I'd be interested in hearing how you handle this.
Krithika Srinath
Ranch Hand

Joined: Apr 11, 2006
Posts: 52
I wonder whether you got to know any solutions for this..! If yes, can you also share with us? - thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: scrolling columns (like Excel)