Why ActionSource2 not work in <rich:treeNode> component, in composite
unders10d Dec 20, 2011 2:51 AMI create composite component, and registred composite:actionSource event:
{code:xml}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:a4j="http://richfaces.org/a4j">
<!-- INTERFACE -->
<composite:interface>
<composite:actionSource name="propertyEvent" targets="testForm:propertyEvent"/>
</composite:interface>
<!-- IMPLEMENTATION -->
<composite:implementation>
<h:form id="testForm">
<rich:tree nodeType="#{node.type}"
value="#{treeModelBean.nodes}"
var="node"
toggleType="client">
<rich:treeNode type="root"
expanded="#{true}"
iconLeaf="#{resource['img:root_16.png']}"
iconCollapsed="#{resource['img:root_16.png']}"
iconExpanded="#{resource['img:root_16.png']}">
<a4j:commandLink id="propertyEvent"
value="#{node}"
render="inputTextArea"
disabled="false"/>
</rich:treeNode>
<!-- other nodes... -->
</rich:tree>
</h:form>
</composite:implementation>
</html>
{code}
Then I call f:setPropertyActionListener from my facelet:
{code:xml}
<my:compTree id="compositeTreeId">
<f:setPropertyActionListener for="propertyEvent" value="MyTestValue" target="#{bean.stringField}"/>
</me:compTree>
{code}
Its doesnt work...
But, then I use a4j:commandLink without rich:treeNode, it's work fine)
{code:xml}
<composite:implementation>
<h:form id="testForm">
<a4j:commandLink id="propertyEvent" value="test" render="inputTextArea" disabled="false"/>
</h:form>
</composite:implementation>
{code}