-
1. Re: treeSelectionChangeListener didn’t work in richFaces 4.2.0
mhn Mar 23, 2012 5:25 AM (in response to pdhung3012)I have the same problem.
I tried two different methods, as described in the VDL docs: "The expression must evaluate to a public method that takes an TreeToggleEvent parameter, with a return type of void, or to a public method that takes no arguments with a return type of void". Both are not called and therefore the nodes cannot be expanded/collapsed via ajax.
BTW:
The vdl docs (http://docs.jboss.org/richfaces/latest_4_2_X/vdldoc/) say treeSelectionChangeListener while the showscase uses selectionChangeListener
-
2. Re: treeSelectionChangeListener didn’t work in richFaces 4.2.0
pdhung3012 Mar 25, 2012 2:05 PM (in response to mhn)Michael Heinen, Perharp we should change like this: https://community.jboss.org/thread/197192?tstart=0
Not so regular, but I think it's the only way to code
-
3. Re: treeSelectionChangeListener didn’t work in richFaces 4.2.0
alex_p Apr 5, 2012 2:11 PM (in response to pdhung3012)"treeSelectionChangeListener" attribute for rich:tree does not work because rich.taglib.xml has
<attribute>
<name>treeSelectionChangeListener</name>
<type>javax.el.MethodExpression</type>
</attribute>but org.richfaces.view.facelets.TreeHandler expects "selectionChangeListener" :
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
if (meta.isTargetInstanceOf(AbstractTree.class)) {
if ("selectionChangeListener".equals(name)) {return new TreeSelectionChangeListenerExpressionMetadata(attribute);
} else if ("toggleListener".equals(name)) {
return new TreeToggleListenerExpressionMetadata(attribute);
}
}
return null;
}
so, we are kinda screwed, because "selectionChangeListener" is not valid attribute in according to taglib, but handler expects it...P.S. it is for RichFaces version 4.2.0.Final
-
4. Re: treeSelectionChangeListener didn’t work in richFaces 4.2.0
pdhung3012 Apr 6, 2012 9:18 PM (in response to alex_p)Thank you about your experience, but I still not know how to fix this problem. Have you got any idea for rich:tree in richFaces 4.2.0?
-
5. Re: treeSelectionChangeListener didn’t work in richFaces 4.2.0
alex_p Apr 9, 2012 10:28 AM (in response to pdhung3012)One of the solutions would be to put modified org.richfaces.view.facelets.TreeHandler into your application classpath. And modification would by:
if ("selectionChangeListener".equals(name) || "treeSelectionChangeListener".equals(name))
in applyRule(String name, TagAttribute attribute, MetadataTarget meta)
P.S. That's what I did (tomcat 6.0.18)...
-
6. Re: treeSelectionChangeListener didn’t work in richFaces 4.2.0
iabughosh Apr 9, 2012 10:43 AM (in response to pdhung3012)1 of 1 people found this helpfulcould you check RF 4.2.1 ?, I've added a related issue to your post.
-
7. Re: treeSelectionChangeListener didn’t work in richFaces 4.2.0
alex_p Apr 9, 2012 2:51 PM (in response to iabughosh)It is fixed in 4.2.1.CR1.
The attribute name in taglib is selectionChangeListener