aspose file tools*
The moose likes JSF and the fly likes How to allow scrolling on only part of a page? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "How to allow scrolling on only part of a page?" Watch "How to allow scrolling on only part of a page?" New topic
Author

How to allow scrolling on only part of a page?

Darrin Smith
Ranch Hand

Joined: Aug 04, 2003
Posts: 276
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!
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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.


GenRocket - Experts at Building Test Data
Darrin Smith
Ranch Hand

Joined: Aug 04, 2003
Posts: 276
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.
Sergey Smirnov
Ranch Hand

Joined: May 29, 2003
Posts: 167
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

Joined: Aug 04, 2003
Posts: 276
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: http://www.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

Joined: May 29, 2003
Posts: 167
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

Joined: Aug 04, 2003
Posts: 276
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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to allow scrolling on only part of a page?