File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Emulating Scrollbar behaviour

 
Satish Gopalakrishnan
Ranch Hand
Posts: 52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has anybody attempted to emulate behaviour of a scrollbar using DHTML.. i know that it is done automatically but i need to emulate the behaviour of a scrollbar so as to avoid loading a page with lots of data...
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it is possible to make a scrollbar with DHTML, but I am not sure what you are trying to accomplish...
Eric
 
Satish Gopalakrishnan
Ranch Hand
Posts: 52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a lot of data to be shown..say for example 100 records..instead of showing 100 records at a time( page loading time is a nightmare), i want to be able to just show one row..emulate a scrollbar using DHTML and control the row to be shown based on position etc....( FYI,i will fetch data using a hidden frame in the page from the session) ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are many UI metaphors that are better suited to this usage than scrolling. The mechanism of "paging" a subset of the rows has been discussed many times in these forums (do a search and you'll find a multitude of info).
The request/response cycle is way too slow for a scroll emulation to be effective. The user is conditioned for scrolling to be fast; going back to the database and server for every scroll position change will not be a satisfying experience. Paging, on the other had, will not befuddle the user as much since a delay between pages is expected.
my 2 cents,
bear
 
Satish Gopalakrishnan
Ranch Hand
Posts: 52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to use the paging paradigm as well..the page i am trying to display might have 100's of records..so i plan to store the first set in session and emulate a scrollbar as well to reduce page loading time...so i guess the delay would not be that bad...or do u think that this might be an overkill ???
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No matter what you do, You are going to have to wait for all the records to load. Either it will be in chuncks or the whole thing at once.
You can not just say download the part that is visible untilk it scrolls, it will do the whole thing.
With the scrollbar, it wiill be choppy and people expect smoothness. Since when it scrolls you are going to have to send information to the server and say you want records X1 - X2. The next time it is scrolled, the request would have to be from X2 - X3. Which means the page has to be rewritten.
I persoannly would do it the way a search egine would do it, or the way this forum does it and break it up into pages.
Eric
 
Satish Gopalakrishnan
Ranch Hand
Posts: 52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help and the suggestions
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic