I can't believe I spent a day and a half without seeing this. The problem was
that I had a component property called page. And, of course, components and
pages already have a page property. I changed it to pageName and it worked
like a charm. The error was throwing me off by making me think the problem was
that item was null.
Thanks anyway,
Rob
-----Original Message-----
From: Rob Dennett
Sent: Wednesday, March 08, 2006 11:18 AM
To: Tapestry users
Subject: BindingException
I am getting a BindingException that says the source is null for
getProperty(null, “page”) when Tapestry tries to parse the jwc that contains
this code:
<property name="item" />
<parameter name="menuItems" required="true" />
<parameter name="cssClass" default-value="literal:menu" />
<component id="menuItemLoop" type="For">
<binding name="source" value="menuItems" />
<binding name="value" value="item" />
</component>
<component id="foo" type="Insert">
<binding name="value" value="item.page" />
</component>
<component id="menuItem" type="MenuItem">
<binding name="title" value="item.title" />
<binding name="page" value="item.page" />
<binding name="pageParams" value="item.pageParams" />
<binding name="subMenu" value="item.subMenu" />
<binding name="subMenuImage" value="item.subMenuImage" />
</component>
It is blowing up at the second binding for menuItem where page is bound to
item.page. If I comment out the menuItem component and the code that
references it in the template, the foo component has no trouble spitting out
all the values for item.page. What gives?
Thanks for your help,
Rob Dennett
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.2.0/276 - Release Date: 3/7/2006
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.2.0/276 - Release Date: 3/7/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.2.0/276 - Release Date: 3/7/2006
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]