On 8/24/07, Angelo Chen <[EMAIL PROTECTED]> wrote: > > Hi Josh, > > This works, now if I have this in the Layout.html: > > <head> > <title>${title}</title> > </head> > > Layout.java also has a getTtitle to return 'base page'; > > now how to replace this title with 'somepage' in the somepage.html? I add a > getTitle in the Somepage.java, but it still picks up 'base page', any > solution to this? >
There is no inheritance relationship between Somepage and Layout. Somepage contains a reference to the Layout object. You have options with how you are going to update the layout. You can inject the Layout object into Somepage and manipulate it by: @Component private Layout layout; // add getter/setter protected void beforeRender() { layout.setTitle(title); } or you can add the title parameter to Layout and pass it from Somepage Layout.java: @Parameter // if you want to require a title, add (required=true) private String title; // add getter/setter Somepage.html <t:layout title="'my layout'"> ... </t:layout> Pick the one that makes the most sense for your application.... > A.C. > Josh Canfield-2 wrote: > > > > <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd "> > > > > Could it be as silly as a space after the xsd? > > > > I have run the following successfully > > > > ----- > > <file:///C:/cygwin/workspace/svn/thedailytube/src/main/resources/com/thedailytube/ui/tapestry/pages/SomePage.html>/src/main/resources/com/thedailytube/ui/tapestry/pages/SomePage.html > > ------- > > > > <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> > > <t:parameter name="sidebarContent"> > > SomePage Added Sidebar > > </t:parameter> > > This is the body content > > </t:layout> > > > > ----- > > /src/main/resources/com/thedailytube/ui/tapestry/components/Layout.html > > ------- > > > > > > > > -- > View this message in context: > http://www.nabble.com/T5%3ATiles--tf4310807.html#a12309092 > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]