• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Non-scrollable Tile?

 
bryan nelson
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good morning,

I have a web application that I need to display a constant banner at the top of. It needs to be non scrollable as well. Just a solid inch deep banner that stays visible no matter where you go in the site below.

Now I know that I can do this with frames, but I really don't want to go there if I don't have to. I'm assuming that I can do something like this with a tile perhaps? Is there a better way? I'm using Struts 1.1.

Any ideas are appreciated.

Thanks,
b
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tiles get rendered into html before the browser ever sees anything. This means that your solution must come from html or javascript, as tiles do not directly affect how a browser interprets the html.

Frames are one option. Javascript is another option but such a solution with Javascript... let's just say it's difficult to get smooth-scrolling. It might also be possible to put all the rest of the page's content in a scrollable area within the browser window.
 
bryan nelson
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After thinking a little bit more about the nature of tiles, I understand what you're saying. And I've decided to stay away from the JavaScript if I can. I'm trying to use an IFrame to accomplish my goal. Which I can do just fine. However, I'm having trouble using that AND tiles. I'm currently doing something like this (which is failing):

In my tile definition I have this:

<definition name="mySite.default"
path="/web/jsp/layout/defaultIFrame.jsp">
<put name="header" value="/web/jsp/include/header.jsp" />
<put name="menubar" value="/web/jsp/include/menubar.jsp" />
<put name="left-nav" value="/web/jsp/include/leftNavigation.jsp"/>
<put name="body-content" value="/web/jsp/homeBody.jsp" />
<put name="sessionbar" value="/web/jsp/include/sessionbar.jsp" />
<put name="footer" value="/web/jsp/include/footer.jsp" />
</definition>

where I changed the item in gray to point to the IFrame as you can see above (it used to point to the Layout below).

In my new defaultIFrame.jsp I have this:

<html>
<head>
<title>Test</title>
</head>

<body>
<table class="unclassified">
<tr>
<td>Green</td>
</tr>
</table>
<iframe width='100%' height='92%' src='<html:rewrite page="/web/jsp/layout/defaultLayout.jsp" />' frameborder='no' scrolling='yes'></iframe>
</body>
</html>

This works in the sense that it gives me the little unscrollable piece at the top (the table with the "green" TD), but the Iframe below gives a jsp NPE because of the tile attributes being blank. And I understand that too, because I'm not calling the defaultLayout.jsp from the tile-def'n any longer and it has no knowledge of the "puts" (if you will) once I get to the regular jsp page.

So my question is...how do I make it so I can display an entire tiles layout in an Iframe? There has to be a way to do this...

Thanks again!
bryan
[ March 23, 2005: Message edited by: bryan nelson ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have two choices, frame your page

or do a search on google for JavaScript watermark.

Eric
 
bryan nelson
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well the watermark is out.

Looks like I'll have to resort to frames. *wince*
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic