aspose file tools*
The moose likes Struts and the fly likes Need your help on tiles urgently ~~ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Need your help on tiles urgently ~~" Watch "Need your help on tiles urgently ~~" New topic
Author

Need your help on tiles urgently ~~

Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
hi, good day to all ,

my problem is on tiles :

index.jsp :



layout.jsp :




navbar.jsp :


**in order to post here, so i do some cut on html tag like body, html to avoid posting problem

problem description :
i have navbar.jsp which is navigation menu and contains several link , my question is how to let user click the link and it change my contents or body page ? thank you very much for helping !
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

You'll need another page similar to index that has a different body page.

Tiles do not work like frames. Frames can change just one portion of the screen without affecting everything else because the browser receives it as multiple pages. Tiles get slapped together into one happy page for the browser. So to update one tile, you need to update them all. So you'll need to create a new page.


A good workman is known by his tools.
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
Marc, you means if i click a link, i have to use action to forward to nother index page ? if this is the case, how the page been replace ? using target ? can you provide more details how it should work ? thank you very much for answering !
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

I suppose that is one way of doing it. If the actions don't do anything but act as a link, this might not be the best route. I've used it in a couple places before with SuccessAction, but if your site is not an application that relies on posting forms, then throwing Actions around is probably a waste.

I'm not well versed in using tiles for a site that isn't Struts-centric, but here's my best guess.

Let's assume you want to link to a Contact Us page. All you have to do is make a page similar to index.jsp

contactus.jsp

And then of course you need a contactus-body.jsp
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
hi, marc, thanks for given me idea , i found two way to figure it out , the first one is easy, just make the link to another index.jsp with tiles(as it not work as frame) , this is straight forward. Another way, as you suggest by using action to call another index.jsp, this work as well .. thank you anyway !
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Need your help on tiles urgently ~~