1 2 Previous Next 29 Replies Latest reply on Mar 5, 2008 12:40 PM by maxmustang Go to original post
      • 15. Re: TreeNode & selectBooleanCheckbox HOW-to ???
        krasig

        Hi Viggo,
        to work with tomahawk must have this tomahawk.taglib.tld in your WEB-INF

        <?xml version="1.0"?>
        <!DOCTYPE facelet-taglib PUBLIC "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN" "facelet-taglib_1_0.dtd">
        <facelet-taglib>
         <!-- author: thomas.jachmann@mindmatters.de -->
         <namespace>http://myfaces.apache.org/tomahawk</namespace>
         <tag>
         <tag-name>commandButton</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlCommandButton</component-type>
         <renderer-type>org.apache.myfaces.Button</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>commandLink</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlCommandLink</component-type>
         <renderer-type>org.apache.myfaces.Link</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>dataTable</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlDataTable</component-type>
         <renderer-type>org.apache.myfaces.Table</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>inputHidden</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlInputHidden</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>inputSecret</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlInputSecret</component-type>
         <renderer-type>org.apache.myfaces.Secret</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>inputText</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlInputText</component-type>
         <renderer-type>org.apache.myfaces.Text</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>inputTextHelp</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlInputTextHelp</component-type>
         <renderer-type>org.apache.myfaces.TextHelp</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>inputTextarea</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlInputTextarea</component-type>
         <renderer-type>org.apache.myfaces.Textarea</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>graphicImage</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlGraphicImage</component-type>
         <renderer-type>org.apache.myfaces.Image</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>message</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlMessage</component-type>
         <renderer-type>org.apache.myfaces.Message</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>messages</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlMessages</component-type>
         <renderer-type>org.apache.myfaces.Messages</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>outputLabel</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlOutputLabel</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>outputText</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlOutputText</component-type>
         <renderer-type>org.apache.myfaces.Text</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>panelGrid</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlPanelGrid</component-type>
         <renderer-type>org.apache.myfaces.Grid</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>panelGroup</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlPanelGroup</component-type>
         <renderer-type>org.apache.myfaces.Group</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>selectOneMenu</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlSelectOneMenu</component-type>
         <renderer-type>org.apache.myfaces.Menu</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>selectManyMenu</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlSelectManyMenu</component-type>
         <renderer-type>org.apache.myfaces.Menu</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>selectOneRadio</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlSelectOneRadio</component-type>
         <renderer-type>org.apache.myfaces.Radio</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>selectBooleanCheckbox</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlSelectBooleanCheckbox</component-type>
         <renderer-type>org.apache.myfaces.Checkbox</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>selectManyCheckbox</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlSelectManyCheckbox</component-type>
         <renderer-type>org.apache.myfaces.Checkbox</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>selectOneListbox</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlSelectOneListbox</component-type>
         <renderer-type>org.apache.myfaces.Listbox</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>selectManyListbox</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlSelectManyListbox</component-type>
         <renderer-type>org.apache.myfaces.Listbox</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>inputCalendar</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlInputCalendar</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>jsValueChangeListener</tag-name>
         <component>
         <component-type>org.apache.myfaces.JsValueChangeListener</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>jsValueSet</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlJsValueSet</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>checkbox</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlCheckbox</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>commandNavigation</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlCommandNavigation</component-type>
         <renderer-type>org.apache.myfaces.Navigation</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>commandNavigation2</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlCommandNavigationItem</component-type>
         <renderer-type>org.apache.myfaces.NavigationMenu</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>commandSortHeader</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlCommandSortHeader</component-type>
         <renderer-type>org.apache.myfaces.SortHeader</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>dataList</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlDataList</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>dataScroller</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlDataScroller</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>inputDate</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlInputDate</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>inputFileUpload</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlInputFileUpload</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>inputHtml</tag-name>
         <component>
         <component-type>org.apache.myfaces.InputHtml</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>navigationMenuItem</tag-name>
         <component>
         <component-type>org.apache.myfaces.NavigationMenuItem</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>navigationMenuItems</tag-name>
         <component>
         <component-type>javax.faces.SelectItems</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>jscookMenu</tag-name>
         <component>
         <component-type>org.apache.myfaces.JSCookMenu</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>panelLayout</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlPanelLayout</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>panelNavigation</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlPanelNavigation</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>panelNavigation2</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlPanelNavigationMenu</component-type>
         <renderer-type>org.apache.myfaces.NavigationMenu</renderer-type>
         </component>
         </tag>
         <tag>
         <tag-name>panelTab</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlPanelTab</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>panelTabbedPane</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlPanelTabbedPane</component-type>
         </component>
         </tag>
         <!-- deactivated since there's no component! tag>
         <tag-name>tabChangeListener</tag-name>
         <component>
         <component-type></component-type>
         </component>
         </tag-->
         <tag>
         <tag-name>collapsiblePanel</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlCollapsiblePanel</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>selectOneCountry</tag-name>
         <component>
         <component-type>org.apache.myfaces.SelectOneCountry</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>selectOneLanguage</tag-name>
         <component>
         <component-type>org.apache.myfaces.SelectOneLanguage</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>stylesheet</tag-name>
         <component>
         <component-type>org.apache.myfaces.Stylesheet</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>div</tag-name>
         <component>
         <component-type>org.apache.myfaces.Div</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>htmlTag</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlTag</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>radio</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlRadio</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>tree</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlTree</component-type>
         <renderer-type>org.apache.myfaces.HtmlTree</renderer-type>
         </component>
         </tag>
         <!-- deactivated since there's no component! tag>
         <tag-name>treeSelectionListener</tag-name>
         <component>
         <component-type></component-type>
         </component>
         </tag-->
         <!-- deactivated since there's no component! tag>
         <tag-name>iconProvider</tag-name>
         <component>
         <component-type></component-type>
         </component>
         </tag-->
         <tag>
         <tag-name>treeColumn</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlTreeColumn</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>treeCheckbox</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlTreeCheckbox</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>tree2</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlTree2</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>panelStack</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlPanelStack</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>popup</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlPopup</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>newspaperTable</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlNewspaperTable</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>aliasBean</tag-name>
         <component>
         <component-type>org.apache.myfaces.AliasBean</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>aliasBeansScope</tag-name>
         <component>
         <component-type>org.apache.myfaces.AliasBeansScope</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>buffer</tag-name>
         <component>
         <component-type>org.apache.myfaces.Buffer</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>saveState</tag-name>
         <component>
         <component-type>org.apache.myfaces.SaveState</component-type>
         </component>
         </tag>
         <!-- deactivated since there's no component! tag>
         <tag-name>updateActionListener</tag-name>
         <component>
         <component-type></component-type>
         </component>
         </tag-->
         <tag>
         <tag-name>validateCreditCard</tag-name>
         <validator>
         <validator-id>org.apache.myfaces.validator.CreditCard</validator-id>
         </validator>
         </tag>
         <tag>
         <tag-name>validateEmail</tag-name>
         <validator>
         <validator-id>org.apache.myfaces.validator.Email</validator-id>
         </validator>
         </tag>
         <tag>
         <tag-name>validateEqual</tag-name>
         <validator>
         <validator-id>org.apache.myfaces.validator.Equal</validator-id>
         </validator>
         </tag>
         <tag>
         <tag-name>swapImage</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlSwapImage</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>columns</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlColumns</component-type>
         </component>
         </tag>
         <tag>
         <tag-name>column</tag-name>
         <component>
         <component-type>org.apache.myfaces.HtmlColumn</component-type>
         </component>
         </tag>
         <!-- additional validators (note: not in tld, so no code completion) -->
         <tag>
         <tag-name>validateRegExpr</tag-name>
         <validator>
         <validator-id>org.apache.myfaces.validator.RegExpr</validator-id>
         </validator>
         </tag>
        </facelet-taglib>
        


        and in web.inf add this:

        <context-param>
         <param-name>facelets.LIBRARIES</param-name>
         <param-value>
         /WEB-INF/tomahawk.taglib.xml
         </param-value>
        </context-param>


        try this and if your trouble continue i will create for you simple example.

        Regards.

        • 16. Re: TreeNode & selectBooleanCheckbox HOW-to ???
          viggo.navarsete

          Thanks, I will try this today.

          By the way, what challenges did you have when trying to get the checkboxes working with the Richfaces tree? Perhaps it's possible with the current status of the source code?

          • 17. Re: TreeNode & selectBooleanCheckbox HOW-to ???
            jaydfwtx

            With 3.0.1, the checkbox in the tree was not clickable (unsure why). With 3.1.0-rc2, the checkbox is now clickable. I am unsure however if there are other issues at this point.

            • 18. Re: TreeNode & selectBooleanCheckbox HOW-to ???
              jaydfwtx

              Looks like this works great now with 3.1.0-rc2!

              I added a checkbox to the treenode, with a4j onchange support, and it works like a charm.

              • 19. Re: TreeNode & selectBooleanCheckbox HOW-to ???
                viggo.navarsete

                jaydfwtx: Thanks for reply. Could you provide me some example code, like krasig did, so I understand how to implement the checkbox version of the tree?

                • 20. Re: TreeNode & selectBooleanCheckbox HOW-to ???
                  jaydfwtx

                  If you have a tree with richfaces working, all you need to do is modify the class that represents your tree node to have a boolean value to represent the state of the checkbox. Then you just need to add the selectBooleanCheckbox component to the treeNode component.

                  • 21. Re: TreeNode & selectBooleanCheckbox HOW-to ???
                    viggo.navarsete

                    excellent :)
                    I'll try it tomorrow:)
                    thanx!

                    • 22. Re: TreeNode & selectBooleanCheckbox HOW-to ???
                      viggo.navarsete

                      Hi jaydfwtx: I managed to get a checkbox next to each node in my tree. Here's the code:

                      <r:tree value="#{searchBean.searchResultNode.data}" var="item" nodeFace="#{item.type}">
                       <r:treeNode type="searchResultNode">
                       <h:selectBooleanCheckbox value="#item.selected"/>
                       <h:outputText value="#{item.type}" />
                       </r:treeNode>
                       <r:treeNode type="entityNode" nodeSelectListener="#{searchBean.nodeSelected}">
                       <h:selectBooleanCheckbox value="#item.selected"/>
                       <h:outputText value="#{item.entityId}" />
                       </r:treeNode>
                       <r:treeNode type="organizationNode">
                       <h:selectBooleanCheckbox value="#item.selected"/>
                       <h:outputText value="#{item.organizationName}" />
                       </r:treeNode>
                       <r:treeNode type="stationNode">
                       <h:selectBooleanCheckbox value="#item.selected"/>
                       <h:outputText value="#{item.stationName}" />
                       </r:treeNode>
                       <r:treeNode type="entityNode">
                       <h:selectBooleanCheckbox value="#item.selected"/>
                       <h:outputText value="#{item.entityId}" />
                       </r:treeNode>
                       </r:tree>


                      As you can see, I've got 4 levels of nodes. Each node leve is implemented by a class which implements TreeNode, and to each of those classes I have added a boolean flag called selected (with getter and setter methods).

                      Question nr.1: Will these flags automatically be updated when marking a node as checked, or do I need to add a listener to each of the <h:selectBooleanCheckbox value="#item.selected"/> tags?

                      Question nr.2: I want to autoselect all parent nodes when clicking on a specific node, any input how to do so?

                      • 23. Re: TreeNode & selectBooleanCheckbox HOW-to ???
                        leval

                        is it possible to disappear the conector lines in such tree? i mean the tree will look as hierarchical combobox

                        • 24. Re: TreeNode & selectBooleanCheckbox HOW-to ???
                          viggo.navarsete

                          I'm not sure...

                          • 25. Re: TreeNode & selectBooleanCheckbox HOW-to ???
                            maxleo

                            I made this when you see it its easy dont give up, have you made your class with setChecked() getChecked(), and did you set this class in your treenodes with node.setData(class)? As for selecting parent nodes or just other nodes when selecting a node, i added in the view to the nodes a4j:support which calls a listener, which i added also inside the mentioned class. This method then looks for parents or children nodes as you like, and calls the setChecked. When instantiating this class i deliver in the constructor the node-object as a member, so the class can reach back the node-object to find the children or parents...:-) node. To see immediately the result (all new checked boxes) on page, you add to the a4j:support a rerender to the tree. I for myself realized that when a parent node is selected all subnodes are selected, but i not set the member of the children to true, the children itself just inside getChecked() look for a parent and if this is checked deliver true (so no redundancy). If you want i send you the code.

                            • 26. Re: TreeNode & selectBooleanCheckbox HOW-to ???
                              maxleo

                              sorry just saw you made your own treenode class with setters etc. all fine, looks easyer than my solution with setData! So you can reach children and parents direct fron your class listener and ask them if they are checked or set them also to ckecked.

                              • 27. Re: TreeNode & selectBooleanCheckbox HOW-to ???
                                bradford

                                to maxleo :
                                please send your code... i need it.
                                thanks very very much :)

                                • 28. Re: TreeNode & selectBooleanCheckbox HOW-to ???
                                  viggo.navarsete

                                  bradford: what have you been able to do so far? What code are you missing?

                                  • 29. Re: TreeNode & selectBooleanCheckbox HOW-to ???
                                    maxmustang

                                     

                                    "bradford" wrote:
                                    to maxleo :
                                    please send your code... i need it.
                                    thanks very very much :)


                                    Ok my code here.
                                    I managed to make grayed Checkboxes (used for implizit rights=checked) clickable, by replacing chekckbox by images. ((with stylesheet you cant make ckeckbox gray in ie, onli ff))

                                    <rich:tree switchType="ajax"
                                    componentState="#{adminUserRightsController.reportGroupTreeState}"
                                    value="#{adminUserRightsController.reportGroupTreeNode}"
                                    var="item" id="treeReportGroups"
                                    iconLeaf="/images/iconFolder_gif.gif"
                                    highlightedClass="highlighted">
                                    <rich:treeNode>
                                    <h:graphicImage value="#{item.image}">
                                    <a4j:support event="onclick" reRender="treeReportGroups"
                                    actionListener="#{item.userHasRightChangedListener}" />
                                    </h:graphicImage>
                                    <h:outputText value="#{item.reportGroup.nameD}" />
                                    </rich:treeNode>
                                    </rich:tree>



                                    package ch.hrms.uka.reports.admin;

                                    import java.util.Iterator;
                                    import java.util.LinkedHashMap;
                                    import java.util.Map;
                                    import java.util.Map.Entry;

                                    import org.apache.commons.logging.Log;
                                    import org.apache.commons.logging.LogFactory;
                                    import org.richfaces.model.TreeNode;
                                    import org.richfaces.model.TreeNodeImpl;

                                    import ch.hrms.uka.reports.db.entity.ReportEntity;
                                    import ch.hrms.uka.reports.db.entity.ReportGroupEntity;
                                    import ch.hrms.uka.reports.login.LoginController;
                                    import ch.hrms.uka.reports.login.db.ReportUserEntity;

                                    public class AdminTreeReportGroup
                                    {

                                    private static Log log = LogFactory.getLog( AdminTreeReportGroup.class );

                                    private Boolean userHasRight; // Right
                                    private ReportGroupEntity reportGroup; // All the Data
                                    private TreeNodeImpl nodeImpl;


                                    public AdminTreeReportGroup(ReportGroupEntity reportGroup, TreeNodeImpl nodeImpl)
                                    {
                                    this.reportGroup = reportGroup;
                                    this.nodeImpl = nodeImpl;
                                    }


                                    public Boolean getUserHasRight() {

                                    Boolean ret = false;

                                    ret = this.userHasRight;

                                    return ret;
                                    }



                                    public void setUserHasRight(Boolean userHasRight) {
                                    this.userHasRight = userHasRight;
                                    if (log.isDebugEnabled()) log.debug("setUserHasRight="+userHasRight);
                                    }

                                    public ReportGroupEntity getReportGroup() {
                                    return reportGroup;
                                    }


                                    public void setReportGroup(ReportGroupEntity reportGroup) {
                                    this.reportGroup = reportGroup;
                                    }

                                    public void userHasRightChangedListener(javax.faces.event.ActionEvent ae)
                                    {
                                    if (log.isDebugEnabled()) log.debug("userHasRightChangedListener");

                                    AdminUserRightsController.getManagedBean().setDataChanged();


                                    if (this.getUserHasRight())
                                    this.setUserHasRight(false);
                                    else
                                    {
                                    Boolean isParentWithImplizitRight=false;
                                    // Allen Children explizite Rechte wegnehmen
                                    Iterator children = this.getNodeImpl().getChildren();
                                    if (children != null)
                                    {
                                    while (children.hasNext())
                                    {
                                    Map.Entry entry = (Map.Entry) children.next ();

                                    TreeNodeImpl child = (TreeNodeImpl) entry.getValue();
                                    AdminTreeReportGroup item = (AdminTreeReportGroup)child.getData();
                                    if (item.getUserHasRight()==true)
                                    isParentWithImplizitRight=true;
                                    item.setUserHasRight(false);
                                    }
                                    }

                                    // If Parent has explizit right, lets give all 'Brothers' - except myself - explizit Right
                                    TreeNodeImpl parent = (TreeNodeImpl)this.getNodeImpl().getParent();
                                    AdminTreeReportGroup parentItem = (AdminTreeReportGroup)parent.getData();
                                    if (parentItem != null && parentItem.getUserHasRight())
                                    {
                                    children = parentItem.getNodeImpl().getChildren();
                                    if (children != null)
                                    {
                                    while (children.hasNext())
                                    {
                                    Map.Entry entry = (Map.Entry) children.next ();

                                    TreeNodeImpl child = (TreeNodeImpl) entry.getValue();
                                    AdminTreeReportGroup childItem = (AdminTreeReportGroup)child.getData();
                                    if (!(childItem.equals(this)))
                                    childItem.setUserHasRight(true);
                                    }
                                    }
                                    else
                                    this.setUserHasRight(true);
                                    }
                                    else
                                    {
                                    if (!isParentWithImplizitRight)
                                    this.setUserHasRight(true);
                                    }

                                    // Give the Parent only implizites Right
                                    parent = (TreeNodeImpl)this.getNodeImpl().getParent();
                                    AdminTreeReportGroup item2 = (AdminTreeReportGroup)parent.getData();
                                    if (item2 != null)
                                    {
                                    item2.setUserHasRight(false);
                                    }

                                    }
                                    }

                                    public TreeNodeImpl getNodeImpl() {
                                    return nodeImpl;
                                    }

                                    public void setNodeImpl(TreeNodeImpl nodeImpl) {
                                    this.nodeImpl = nodeImpl;
                                    }

                                    public Boolean getUserRightDisabled() {
                                    Boolean ret = false;
                                    TreeNodeImpl parent = (TreeNodeImpl)this.getNodeImpl().getParent();
                                    AdminTreeReportGroup item = (AdminTreeReportGroup)parent.getData();
                                    if (item != null)
                                    ret = item.getUserHasRight();
                                    return false;
                                    }


                                    // The Checkbox is replaces by images (simple printscreens of selected and unselected checkbox, this way a grayed can also be checked)
                                    public String getImage() {
                                    String ret = "";
                                    // Explizites Recht
                                    if (this.getUserHasRight())
                                    ret = "images/checked.jpg";
                                    else
                                    {
                                    // Implizites Right
                                    // 1. If Parent has right
                                    TreeNodeImpl parent = (TreeNodeImpl)this.getNodeImpl().getParent();
                                    AdminTreeReportGroup item = (AdminTreeReportGroup)parent.getData();
                                    if (item != null && item.getUserHasRight())
                                    ret = "images/checked_disabled.jpg";
                                    else
                                    {
                                    // 2. If at least 1 Child has Right
                                    // Children abfragen, ob Wert gesetzt
                                    Boolean found = false;
                                    Iterator children = this.getNodeImpl().getChildren();
                                    if (children != null)
                                    {
                                    while (children.hasNext() && !found)
                                    {
                                    Map.Entry entry = (Map.Entry) children.next ();

                                    TreeNodeImpl child = (TreeNodeImpl) entry.getValue();
                                    AdminTreeReportGroup item2 = (AdminTreeReportGroup)child.getData();
                                    found = item2.userHasRight==true;
                                    }
                                    if (found)
                                    ret = "images/checked_disabled.jpg";
                                    else
                                    ret = "images/unchecked.jpg";
                                    }
                                    else
                                    // No right (No Parent and no Childs)
                                    ret = "images/unchecked.jpg";
                                    }
                                    }

                                    return ret;
                                    }





                                    }







                                    1 2 Previous Next