Hi,

I am newbie to MyFaces and have a slight problem with the tree2 component.

In my JSP I have tree2 component with checkboxes (selectBooleanCheckbox).
It looks like this:

<t:tree2 id="htmlTree" ...
  <f:facet name="project">
    <h:panelGroup>
      <t:selectBooleanCheckbox id="man" value="#{node.checked}"/>
      <t:graphicImage value="/images/project.gif"
rendered="#{t.nodeExpanded}" border="0"/> ...

Now I want to disable dynamically a checkbox for a tree node.
I can do it in a static way - adding an attribute 'disabled="true"' to
<t:selectBooleanCheckbox/> in the JSP.
But I don't know how to do it on the server in the Java code.
I get tree component with this code:

        private HtmlTree getHtmlTree() {
                FacesContext context = FacesContext.getCurrentInstance();
                UIComponent htmlTree =
context.getViewRoot().findComponent("myForm:htmlTree");
                return (HtmlTree) htmlTree;
        }

With this I can get any node with getHtmlTree().getNode()
However TreeNode class has no property "setDisabled" or something like this.

How do I get UIComponent for selectBooleanCheckbox and change it to
disabled, so that it renders then in the same way as "disabled" attribute in
JSP?

Thank you in advance.
Tomek

-- 
View this message in context: 
http://www.nabble.com/disabling-tree-node-checkbox-for-tree2-tf4354647.html#a12408508
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to