<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"> <b>SomePage Added Sidebar</b> </t:parameter> This is the body content </t:layout> ----- /src/main/resources/com/thedailytube/ui/tapestry/components/Layout.html ------- <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> <head/> <body> <div id="header">The Header</div> <div id="content-container"> <t:body/> </div> <div id="content-sidebar"> Top of Sidebar <t:delegate to="sidebarContent"/> Bottom of Sidebar </div> <div id="footer">The Footer</div> </body> </html> ------ Layout.java ------- package com.thedailytube.ui.tapestry.components; import org.apache.tapestry.Block; import org.apache.tapestry.annotations.Parameter; public class Layout { @Parameter private Block _sidebarContent; public Block getSidebarContent() { return _sidebarContent; } public void setSidebarContent(Block sidebarContent) { this._sidebarContent = sidebarContent; } } ------- SomePage.java -------- package com.thedailytube.ui.tapestry.pages; public class SomePage { } -------- http://localhost:8080/somepage --------- <html> <head><link href="/assets/tapestry/default.css" rel="stylesheet" type="text/css"></head> <body> <div id="header">The Header</div> <div id="content-container"> This is the body content </div> <div id="content-sidebar"> Top of Sidebar <b>SomePage Added Sidebar</b> Bottom of Sidebar </div> <div id="footer">The Footer</div> </body> </html> Josh On 8/23/07, Angelo Chen <[EMAIL PROTECTED]> wrote: > > > Hi Josh, > > I added that but got another error: > > Component Somepage does not contain an embedded component with id 'html'. > > This is the Somepage.html: > > <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> > > <t:parameter name="sidebarContent"> > Add this additional to the sidebar > </t:parameter> > All of this goes into the content section > > </t:layout> > > > > Josh Canfield-2 wrote: > > > > Sorry, I should have had the Layout.java in there too... What that error > > is > > telling you is that it's looking for the 'sidebarContent' property in > your > > Layout.java class. You can define it as below: > > > > public class Layout { > > @Parameter > > private Block _sidebarContent; > > > > public Block getSidebarContent() { > > return _sidebarContent; > > } > > > > public void setSidebarContent(Block sidebarContent) { > > this._sidebarContent = sidebarContent; > > } > > } > > > > Josh > > > > On 8/23/07, Angelo Chen <[EMAIL PROTECTED]> wrote: > >> > >> > >> Hi Josh, > >> > >> This looks interesting, I tried it with following steps: > >> > >> 1.put Layout.html in the myapp/components, add also a Layout.java > >> 2. put Somepage.html under WEB-INTF, add Somepage.java in myapp/pages > >> > >> when I access it with http://localhost:8080/Somepage.html, I got > >> following > >> error: > >> > >> Could not convert 'sidebarContent' into a component parameter binding: > >> Class > >> org.example.myapp.components.Layout does not contain a property named > >> 'sidebarContent' (within property expression 'sidebarContent'). > >> > >> What I did wrong here? Thanks, > >> > >> A.C. > >> > >> > >> Josh Canfield-2 wrote: > >> > > >> > I love delegate for this type of stuff. If you want to define a > layout > >> and > >> > let the page decide what goes in the layout define a block parameter > >> and > >> > use > >> > delegate to render it: > >> > > >> > (this has been truncated and modified for brevity, so while this may > >> not > >> > work out of the box it's full size cousin does work...) > >> > > >> > ------------ somepage.html ---------------- > >> > <t:layout xmlns:t=" > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd > >> "> > >> > <t:parameter name="sidebarContent"> > >> > Add this additional to the sidebar > >> > </t:parameter> > >> > All of this goes into the content section > >> > > >> > </t:layout> > >> > > >> > > >> > --------- layout.html ------------ > >> > > >> > <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> > >> > <head>...</head> > >> > <body> > >> > > >> > <div id="header">...</div> > >> > <div id="content-container"> > >> > <t:body/> > >> > </div> > >> > <div id="content-sidebar"> > >> > <!-- Let the page decide what goes in the sidebar --> > >> > <t:delegate to="sidebarContent"/> > >> > </div> > >> > <div id="footer">...</div> > >> > > >> > </body> > >> > </html> > >> > > >> > Enjoy, > >> > Josh > >> > > >> -- > >> View this message in context: > >> http://www.nabble.com/T5%3ATiles--tf4310807.html#a12305428 > >> 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. > > > > > > -- > View this message in context: > http://www.nabble.com/T5%3ATiles--tf4310807.html#a12306516 > 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.