私はリッチツリーの人口のためのコードを持っています。
これは、リッチツリーの最も単純な宣言で構成される mainmenu.xhtml です。
<rich:tree value="#{menu.stationNodes}" var="station">
    <rich:treeNode>
          <h:outputText value="#{station}" />
    </rich:treeNode>
</rich:tree>
と
これが Java マネージド Bean です。
import java.io.Serializable;
import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import zcore.zTreeNode;
import zejb.trees;
@ManagedBean(name="menu")
@SessionScoped
public class Menutree implements Serializable {
    @EJB
    private trees tb;
    private static final long serialVersionUID = 1333L;
    private  zTreeNode<String> stationNodes = new  zTreeNode<String> (); 
    public Menutree(){
     }
    @PostConstruct
    public void postConstruct() {
        **//BLOCK A
        stationNodes.setData("root");
        stationNodes.addChild(0, new zTreeNode<String>("jjhshjssd"));
        stationNodes.addChild(0, new zTreeNode<String>("jsddssdsddd"));
        stationNodes.addChild(1, new zTreeNode<String>("ggggggd"));
        // BLOCK A - END**
        **//BLOCK B
        //stationNodes=tb.LoadTree();
        // BLOCK B - END**
    }
    Getter and Setter here.....
}
ブロック B で呼び出される EJB の一部を次に示します。
public zTreeNode<String> LoadTree() {
        zTreeNode<String> stationNodes =new zTreeNode<String>() ;
        stationNodes.setData("root");
        stationNodes.addChild(0, new zTreeNode<String>("jjhshjssd"));
        stationNodes.addChild(0, new zTreeNode<String>("jsddssdsddd"));
        stationNodes.addChild(1, new zTreeNode<String>("ggggggd"));
        return stationNodes;
} 
ブロック A を使用すれば、すべて問題ありません。ブロック B を使用すると、リッチツリーはページ上で空のままになります。私は何を間違っていますか?
ありがとうございました。