#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Posts
    3
    Rep Power
    0

    Passing a paramter in Struts-Tiles framework


    Hi Guys, I'm using Struts-Tiles frame work and trying to pass a variable to the header. For example i want to send a color parameter value to header dynamically in different pages. Means one page header has blue text, second page header has green text and the third page header has red color. That means i want to set a variable with colors and want pass the variable to the header based on the condition. Please suggest me any one of you passed paramters to any part of the page using Struts-Tiles framework.

    Thanks,
    Krishna.
  2. #2
  3. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    http://jakarta.apache.org/struts/use...es.html#insert

    Each <put> tag is an attribute. As for how you access them, read the docs . I've never used struts before, so I can't help you much beyond that.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Posts
    3
    Rep Power
    0
    I read through the documents available on struts-tiles framework. I'm working on struts for a while but this is little complicated as I was using Put tag and insert tags already for page and content loading. Problem is passing parameter inside the navigation.

    Thanks,
    Krishna.
  6. #4
  7. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    Can you post some code? Like what you're using now .
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Posts
    3
    Rep Power
    0
    I'm using struts template right now and the template file includes
    content,header,footer and left navigation. I put several conditions
    in my template to get the relevent header, footer and for the
    relevent content. I have so many sections of pages for the content
    and based on the content selected I change the color of the header
    and footer. ince this is the tidious proces I would like to use the
    Struts-tiles frame work instead of plain strus template framework.
    I'm able to design the template and put the header,footer and content
    successfully.The problem is now i don't know how to pass the parameter
    value tothe header and footer. Please advise me or give me your contact
    number so that I can explain the problem in detail.
  10. #6
  11. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    It looks like you have to use <put> tags to send a value to your tile, and <get> tags to get the value back out (in your tile).

    http://jakarta.apache.org/struts/use...tiles.html#get

IMN logo majestic logo threadwatch logo seochat tools logo