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

Need your help on tiles urgently ~~

 
Alvin chew
Ranch Hand
Posts: 834
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4727
Mac Ruby VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Alvin chew
Ranch Hand
Posts: 834
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4727
Mac Ruby VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 834
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 !
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic