Hi You can expose message as a parameter for component feedback.
You can then use @Component#publishParameters in the Layout component to publish the message parameter. In Feedback @Parameter private String message; In layout @Component(publishParameters = "feedback") private Feedback feedback; and use can use it as <html t:type='Layout' t:message='myMessage'> </html> regards Taha On Jun 28, 2012, at 3:26 PM, ffred wrote: > Hello, > > I build a common page layout class which contains the html skeleton and a > few common components (navbar, ...) and one of them is dedicated to client > feedback. > > As it was directly in the .tml of my page itself, i simply could have done > something like : > @Component private Feedback feedback ; > feedback.setMessage("Hello client"); > and it worked great. > > But now that i've put it directly in the .tml of my layout, it just doesn't > work anymore and ends logically with something like "FeedBack is not present > in the component template". > > I've imagined multiple way to correct that : > - Use a intermediate pojo "FeedbackData" > - Include the layout itself and use a myLayout.getFeedbackComponent() getter > > Maybe those solution will works but i'm looking for a best practice here. > I guess it's quite a common problem so there must be a "tapestry spirit" > solution for it. > Isn't it ? > > Thanks in advance > > Fred > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/How-to-access-components-inside-layout-from-page-using-the-layout-tp5714142.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org