hi ronaldlee, you can pass the user name from the UserProfile page to the layout component, something like this:
public class Layout { @parameter private String userName; // getter/setter here } in UserProfile.tml: <t:layout userName ="literal:my name" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> <t:/layout> not tested code. a.c. ronaldlee wrote: > > Hi, > > I am building a page using layout component so that the layout can be > shared among other pages. > > The question I have is that I want my layout component (lets say > "/layout/Basic.tml) to have access to page params/variables. A simple > example would be that I have a UserProfile page which uses a layout to > display the menu. I want that layout to also display the user name as > greeting ("Hi ${username}!). But the "username" is initialized in the > page's function (onActivate if is passed from another page, or other > lifecycle functions, or a "Persist("flash") variable..). So how my > Basic.java can get the username info (to be displayed in its Basic.tml) > from the UserProfile page? Same question for the opposite way (page gets > values from layout component). > > thx! > > Ronald > -- View this message in context: http://www.nabble.com/T5%3A-passing-values-between-layout-component-and-page-tf4740907.html#a13557169 Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]