You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Rahul Pilani <rp...@3ptsoft.com> on 2005/06/17 03:18:21 UTC

HtmlTree in org.apache.myfaces.custom.tree2

This component has a default initial state of collapsed. Is it possible to
have an initial state of expanded. Also what is a possible solution to
keeping it always expanded? I tried extending this component, and doing
something like:

 

public class HtmlTreeExpanded extends HtmlTree

{

            // stores initial state

    private boolean initial = true;

 

    public boolean isNodeExpanded()

    {

        if (!super.isNodeExpanded()){

            if (initial){

                        toggleExpanded();

                        initial = false;

            }

        }

        return super.isNodeExpanded();

    }

 

 

} 

 

But this is not working, I get the following error:

18:17:20,828 ERROR [org.apache.myfaces.util.DebugUtils] -
javax.faces.FacesException: Could not get property nodeSelected of component
server-tree

 

Please advise,

 

Thanks

Rahul Pilani