Hi Kama,

 

Yes, I did solve the problem by modifying the myfaces src code.

 

In HtmlTree.java

 

add

         public void expandEverything(String parentId, int childCount) {

                  String nodeId = (parentId != null) ? parentId + TreeModel.SEPARATOR

                                   + childCount : "0";

                  setNodeId(nodeId);

                 

                  if (!_expandedNodes.contains(nodeId) && !node.isLeaf()

                                   && !isNodeExpanded()) {

                          _expandedNodes.add(nodeId);

                         

                  }

                  List children = getNode().getChildren();

                  for (int kount = 0; kount < children.size(); kount++) {

                          expandEverything(nodeId, kount);

                  }

         }

 

 

In

 

public void encodeBegin(FacesContext context) throws IOException {

                 

…….

super.encodeBegin(context);

                  setNodeId("0");

                  List children = getNode().getChildren();

                  for (int kount = 0; kount < children.size(); kount++) {

                          expandEverything("0", kount);

                  }

……..

}


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 07, 2006 5:56 AM
To: [EMAIL PROTECTED]
Subject: Your Question "tree2 expand myfaces 1.0.9"

 

Hello Ma,

i have read your "intresting" question in the [email protected] Mail-Archive.
Unfortunately, i have no read any answer on your question from other forum members.

I have that immediately problem like you.
I liked that the tree, by the first call, expands in concrete child-folder automatically. For example: in my home-folder.

Do you have a solution for this problem?

The MyFaces Version is 1.0.9

Thank you very mutch for your help,

Regards,

Stavros

Reply via email to