You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Bill Lear <ra...@zopyra.com> on 2003/04/24 02:20:56 UTC
null listener exception
Oh, the joys of reporting exceptions (mirroring the joys of reading
them, no doubt)...
Now that I understand that 'No value for parameter X' means 'Value of
parameter X is null' (bug duly entered), I have fixed several of these
bugs, but now I'm getting a null listener parameter.
Here are the details:
org.apache.tapestry.BindingException
No value for parameter 'listener' in component Home/treeNodeValue.direct.
binding: ExpressionBinding[Home/treeNodeValue listeners.nodeSelect]
component: net.sf.tacos.tree.components.AnchorDirect$Enhance_36@1248979[Home/treeNodeValue.direct]
location: classpath:/net/sf/tacos/tree/components/TreeNodeView.jwc, line 42
TreeNodeView.jwc looks like this (line 42 binds "listener" to
"listeners.nodeSelect"):
<component-specification class="net.sf.tacos.tree.components.CTreeNodeView"
<!-- ... -->
<component id="direct" type="AnchorDirect">
<binding name="context" expression="nodeContext"/>
<binding name="listener" expression="listeners.nodeSelect"/>
<binding name="stateful" expression="@java.lang.Boolean@FALSE"/>
<binding name="name" expression="selectedID"/>
<binding name="anchorID" expression="cleanSelectedID"/>
</component>
CTreeNodeView.java looks like this:
public class CTreeNodeView extends BaseComponent implements PageDetachListener{
// ...
public void nodeSelect(IRequestCycle cycle){
// ...
}
// ...
AnchorDirect.jwc has a listener parameter declared:
<component-specification class="net.sf.tacos.tree.components.AnchorDirect"
<!-- ... -->
<parameter name="listener" type="org.apache.tapestry.IActionListener"
direction="custom" required="yes"/>
and AnchorDirect.java:
public abstract class AnchorDirect extends DirectLink {
// ...
private IActionListener listener;
public IActionListener getListener() {
return listener;
}
public void setListener(IActionListener listener) {
this.listener = listener;
}
I tried replacing the above in AnchorDirect with:
public abstract class AnchorDirect extends DirectLink {
// ...
public abstract IActionListener getListener();
which compiled just fine, but gave me an exception:
Method 'public abstract org.apache.tapestry.IActionListener net.sf.tacos.tree.components.AnchorDirect.getListener()' (declared in class net.sf.tacos.tree.components.AnchorDirect) has no implementation in class net.sf.tacos.tree.components.AnchorDirect (or enhanced subclass net.sf.tacos.tree.components.AnchorDirect$Enhance_8).
I tried making AnchorDirect a concrete class, but the compiler kept
complaining that it should be abstract because such-and-such a method
had not been implemented. Failing to fully comprehend things, and
having spent quite some time digging, I decided to give up and offer
this report...
Bill
RE: null listener exception
Posted by Bill Lear <ra...@zopyra.com>.
On Wednesday, April 23, 2003 at 21:21:39 (-0400) Howard M. Lewis Ship writes:
>Must have forgotten to specify a parameter's direction attribute. The
>default, "custom", does not create or use a parameter property.
Grovel, scrape, bow ... withdraw.
Thanks a bunch.
Bill
RE: null listener exception
Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
Must have forgotten to specify a parameter's direction attribute. The
default, "custom", does not create or use a parameter property.
--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry
> -----Original Message-----
> From: Bill Lear [mailto:rael@zopyra.com]
> Sent: Wednesday, April 23, 2003 8:21 PM
> To: tapestry-user@jakarta.apache.org
> Subject: null listener exception
>
>
> Oh, the joys of reporting exceptions (mirroring the joys of
> reading them, no doubt)...
>
> Now that I understand that 'No value for parameter X' means
> 'Value of parameter X is null' (bug duly entered), I have
> fixed several of these bugs, but now I'm getting a null
> listener parameter.
>
> Here are the details:
>
> org.apache.tapestry.BindingException
> No value for parameter 'listener' in component
> Home/treeNodeValue.direct.
> binding: ExpressionBinding[Home/treeNodeValue
> listeners.nodeSelect]
> component:
> net.sf.tacos.tree.components.AnchorDirect$Enhance_36@1248979[H
> ome/treeNodeValue.direct]
> location:
> classpath:/net/sf/tacos/tree/components/TreeNodeView.jwc, line 42
>
>
> TreeNodeView.jwc looks like this (line 42 binds "listener" to
> "listeners.nodeSelect"):
>
>
> <component-specification
> class="net.sf.tacos.tree.components.CTreeNodeView"
> <!-- ... -->
>
> <component id="direct" type="AnchorDirect">
> <binding name="context" expression="nodeContext"/>
> <binding name="listener" expression="listeners.nodeSelect"/>
> <binding name="stateful"
> expression="@java.lang.Boolean@FALSE"/>
> <binding name="name" expression="selectedID"/>
> <binding name="anchorID" expression="cleanSelectedID"/>
> </component>
>
>
> CTreeNodeView.java looks like this:
>
>
> public class CTreeNodeView extends BaseComponent implements
> PageDetachListener{
> // ...
> public void nodeSelect(IRequestCycle cycle){
> // ...
> }
> // ...
>
>
> AnchorDirect.jwc has a listener parameter declared:
>
>
> <component-specification
> class="net.sf.tacos.tree.components.AnchorDirect"
> <!-- ... -->
> <parameter name="listener"
> type="org.apache.tapestry.IActionListener"
> direction="custom" required="yes"/>
>
>
> and AnchorDirect.java:
>
>
> public abstract class AnchorDirect extends DirectLink {
> // ...
> private IActionListener listener;
>
> public IActionListener getListener() {
> return listener;
> }
>
> public void setListener(IActionListener listener) {
> this.listener = listener;
> }
>
>
> I tried replacing the above in AnchorDirect with:
>
>
> public abstract class AnchorDirect extends DirectLink {
> // ...
> public abstract IActionListener getListener();
>
>
> which compiled just fine, but gave me an exception:
>
>
> Method 'public abstract org.apache.tapestry.IActionListener
> net.sf.tacos.tree.components.AnchorDirect.getListener()'
> (declared in class net.sf.tacos.tree.components.AnchorDirect)
> has no implementation in class
> net.sf.tacos.tree.components.AnchorDirect (or enhanced
> subclass net.sf.tacos.tree.components.AnchorDirect$Enhance_8).
>
>
> I tried making AnchorDirect a concrete class, but the
> compiler kept complaining that it should be abstract because
> such-and-such a method had not been implemented. Failing to
> fully comprehend things, and having spent quite some time
> digging, I decided to give up and offer this report...
>
>
> Bill
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>