• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to allow scrolling on only part of a page?

 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd like to have a page where the left side contains a few components that stay put no (do not scroll) as well as an area in the top center of the page that also stays put, but have the right side hold components that allow vertical scrolling (this are will contain several large images).

For example, let the # symbol denote data that does not scroll and the % symbol denote data that can. The page would then be represented with something that looks like this:


####### #####
####### %%% <--scroll bar here
####### %%% <--scroll bar here
####### %%% <--scroll bar here
####### %%% <--scroll bar here



How might this be done? Would you have to use frames (which I'm not familiar with, and not so sure the user will like anyway) or can something like a page fragment do the job?

If this were Swing, you could just drop the components that you need to scroll inside of another component, but I don't know of any JSF components that Sun provides that would support something like this other than maybe a page fragment.

Any ideas?

Thanks!
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is nothing in JSF that does this. Look up iframes or scrolling divs on google. If you have questions about those, they should be asked in the HTML and Javascript forum.
 
Darrin Smith
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gregg Bolinger:
There is nothing in JSF that does this. Look up iframes or scrolling divs on google. If you have questions about those, they should be asked in the HTML and Javascript forum.



I was afraid of that.

Thanks.
 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Probably, It sounds funny, but my first jsf tutorial was about creating such JSF component.
URL: http://www.jsftutorials.net/components/step1.html

Actually, I am agree with Gregg. There is no practical reason to have a special component if scrolling the content is only one issue there. This might be accomplished with just CSS. For example:


P.S. iframe is less sutable here because of the problems in JSF 1.0 and JSF 1.1.

--
Sergey : jsfTutorials.net
 
Darrin Smith
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the input.

I tried this but it looks nothing at all like I expected.

As Gregg suggested, I have placed my question as to what I am doing wrong in another forum here: https://coderanch.com/t/116059/HTML-JavaScript/divs

In short, you just can't stick <div..../div> and have it work from what I can tell...not by a long shot. My guess is that that I will have to place everything that I want in the scrollable area into a page fragement and then place that inside the <div.../div> tags.
 
Sergey Smirnov
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK. You use JSC that puts everything in the absolute positions. It changes something. Are you going to scroll the whole content of the panelGrid? BWT, there is no /panelGrid in your snippet. Where it is closed in your real code?

--
Sergey : jsfTutorials.net
[ June 07, 2005: Message edited by: Sergey Smirnov ]
 
Darrin Smith
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sergey Smirnov:
OK. You use JSC that puts everything in the absolute positions. It changes something. Are you going to scroll the whole content of the panelGrid? BWT, there is no /panelGrid in your snippet. Where it is closed in your real code?

--
Sergey : jsfTutorials.net

[ June 07, 2005: Message edited by: Sergey Smirnov ]



Yes, I think the asbolute positions (as I mentioned in the other thread and someone else confirmed) is probably the root of the problem.

The panelGrid is in there, just snipped out.

Let me play with this (removing the abs positions, etc.) and see if that helps out.

Thanks!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic