You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Vano <Iv...@gmail.com> on 2005/09/13 14:43:29 UTC

once more abot tacos:Tree and Tapestry 4

Hello everybody.

After fail of attempt to use contrib:TreeView component, I try to use tacos:Tree 
component. Tree nodes which are child for root node (child nodes for 
contentProvider) are displayed, but when I try to expand any of this nodes, I'm 
confronted with following exception: 

Failure invoking listener method 'public void net.sf.tacos.tree.Tree.
expansion(org.apache.tapestry.IRequestCycle)' on $Tree_11@16d2378[MenuBuilder/
tree]: Null parameter passed.

More detailed:

java.lang.IllegalArgumentException	
Null parameter passed.	
Stack Trace:	
net.sf.tacos.tree.TreeManager.<init>(TreeManager.java:22) 
net.sf.tacos.tree.Tree.getManager(Tree.java:167) 
net.sf.tacos.tree.Tree.expansion(Tree.java:91) 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.
java:25) 
java.lang.reflect.Method.invoke(Method.java:324) 
org.apache.tapestry.listener.ListenerMethodInvokerImpl.
invokeTargetMethod(ListenerMethodInvokerImpl.java:214)
.............

Can anybody help me to resolve this problem?

Tahks in advance,
Vano


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: once more abot tacos:Tree and Tapestry 4

Posted by Jesse Kuhnert <jk...@gmail.com>.
Sounds like I need to add a better error message, that exception comes from 
this line of code:

public TreeManager(Set state, ITreeContentProvider contentProvider,
IKeyProvider keyProvider)
{
if (state == null || contentProvider == null || keyProvider == null) { throw 
new IllegalArgumentException(
"Null parameter passed."); }
this.state = state;
this.contentProvider = contentProvider;
this.keyProvider = keyProvider;
}

Which means that one of three things that the tree requires ended up being 
null. Either the treeState , IContentProvider, or IKeyProvider parameters 
were null. Double check that you are definitely setting all three of these 
parameters on the tree. If you have doubts check out the demo source code, 
as it has examples of a very very basic tree as well as a rather complicated 
tree.

The basic tree setup in the page specification looks like this:

<property name="item" />

<component id="tree" type="tacos:Tree">
<binding name="contentProvider" value="new 
net.sf.tacos.demo.tree.SimpleTreeContentProvider()"/>
<binding name="value" value="item"/>
</component>

jesse

On 9/13/05, Vano <Iv...@gmail.com> wrote:
> 
> Hello everybody.
> 
> After fail of attempt to use contrib:TreeView component, I try to use 
> tacos:Tree
> component. Tree nodes which are child for root node (child nodes for
> contentProvider) are displayed, but when I try to expand any of this 
> nodes, I'm
> confronted with following exception:
> 
> Failure invoking listener method 'public void net.sf.tacos.tree.Tree.
> expansion(org.apache.tapestry.IRequestCycle)' on 
> $Tree_11@16d2378[MenuBuilder/
> tree]: Null parameter passed.
> 
> More detailed:
> 
> java.lang.IllegalArgumentException
> Null parameter passed.
> Stack Trace:
> net.sf.tacos.tree.TreeManager.<init>(TreeManager.java:22)
> net.sf.tacos.tree.Tree.getManager(Tree.java:167)
> net.sf.tacos.tree.Tree.expansion(Tree.java:91)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
> :39)
> sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.
> java:25)
> java.lang.reflect.Method.invoke(Method.java:324)
> org.apache.tapestry.listener.ListenerMethodInvokerImpl.
> invokeTargetMethod(ListenerMethodInvokerImpl.java:214)
> .............
> 
> Can anybody help me to resolve this problem?
> 
> Tahks in advance,
> Vano
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>