• 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

Using Tiles and html:img tag

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a tiles layout with three tiles

----------------------
| | | |
| | | |
| 1 | 2 | 3 |
| | | |
----------------------

Tile 1 - is a static navigation page (never changes)
Tile 2 - is a dynamic page that gets its information from the action class and sets properties in the corresponding bean.

I would like to have an image link (html:img) that would pass a bean property to tile 3 to display there, while still being able to have the information originally on tile 2 display with the updated information on tile 3

Tile 3 (intended purpose) - Initially blank when html:img link is pressed information sent from link is displayed on this tile.

Is this at all possible? or does anyone have a suggestion on how to accomplish a similar goal? Thank you in advance for your assistance.
 
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use AJAX
 
Adrian Marrero
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok I learned how to use AJAX to generate information without reloading the entire page. But that information is in tile 2; how can I get the information that I have from tile 2 to be displayed in tile 3?
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you describe what you are trying to accomplish in more detail?

- Brent
 
Adrian Marrero
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure,

I have a page called customize.jsp which is populated by a bean that I call DatabaseItn.

When the initial page of customize.jsp is populated, the information from the bean is present and so the page is populated with the information of the bean; this page/information is located in Tile 2. I have help icons throughout the page that I am displaying with html:img tag.

What I was able to try:

When a user clicks on the help icon, I use struts to process the command and display the information on Tile 3, but all the information from the bean that used to be in Tile 2 is not present anymore. This is because I only selected the property from the bean that referred to the help icon I wanted to thus all other bean information was lost.

What I would like to do is the following:

When a user clicks on the help icon, information is retrieved from the active bean on the page and displayed in Tile 3 while still maintaining all the information that was in the bean initially, so I can display it in Tile 2 with customize.jsp.

I was told to use AJAX, but I have not seen an example of AJAX that updates information to a different page. My understanding of AJAX is that it talks to the servlet and updates information on a page (lets say customize.jsp in Tile 2) without reloading the entire Tile Layout, but I do not know yet of a way to use AJAX to take the information from customize.jsp, talk to the servlet and update that information on the page for Tile 3.

I hope that I have explained myself enough. If I haven't, please let me know and I will try again.
reply
    Bookmark Topic Watch Topic
  • New Topic