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.