Horizontal Tree

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
roabol
Posts: 34
Joined: 04 Oct 2010, 16:04
Location: Brazil

09 Aug 2021, 21:59

I'm using version 10.0.4 with the Barcelona theme. The HorizontalTree component displays this line when I hover over it. Is it a problem with the new version?

Image
PrimeFaces Elite 12.0.5
Ultima 6.1.0
Apache NetBeans IDE 18
Windows 11
Payara Server Open Source Edition 6.2023.7
FF, Chrome, Edge, Opera

siris
Posts: 322
Joined: 29 Jul 2019, 13:57

10 Aug 2021, 06:54

Hi,

I couldn't find your issue at our demo page:
https://www.primefaces.org/barcelona/tree.xhtml
How can i reproduce your issue?

Best Regards,

roabol
Posts: 34
Joined: 04 Oct 2010, 16:04
Location: Brazil

10 Aug 2021, 14:06

Hi siris,

When I don't use selectionMode = "single", it's working normal. But when I enable this option, the error happens.

Code: Select all

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">


    <div class="p-grid">
        <div class="p-col-12">
            <div class="card">

                <p:tree dynamic="true"
                        id="tree-node"
                        orientation="horizontal"
                        selectionMode="single" 
                        value="#{menuView.root}"
                        var="doc">

                    <p:ajax event="select" listener="#{menuView.onNodeSelect}"  />

                    <p:treeNode expandedIcon="pi pi-folder-open" collapsedIcon="pi pi-folder">
                        <h:outputText value="#{doc.texto}" title="#{doc.ordemMenu}" />
                    </p:treeNode>
                </p:tree>
            </div>
        </div>
    </div>

</ui:composition>
PrimeFaces Elite 12.0.5
Ultima 6.1.0
Apache NetBeans IDE 18
Windows 11
Payara Server Open Source Edition 6.2023.7
FF, Chrome, Edge, Opera

siris
Posts: 322
Joined: 29 Jul 2019, 13:57

11 Aug 2021, 06:55

Hi,

This is a general decision affecting all prime ui libraries. Maybe you can override hover class if you don't want to use with a visible line. Please try below code.

Code: Select all

body .ui-tree.ui-tree-horizontal .ui-treenode-content.ui-state-hover {
	background: #ffffff;
}
Best Regards,

roabol
Posts: 34
Joined: 04 Oct 2010, 16:04
Location: Brazil

11 Aug 2021, 13:53

Thanks Siris, I managed to solve my problem with the code you gave me. Despite being a decision that affects every prime library, this did not happen in the previous version of barcelona/primefaces. Anyway I appreciate your help. I'll post the definitive code if it helps anyone else.

Code: Select all

body .ui-tree.ui-tree-horizontal .ui-treenode-content.ui-state-hover {
    background: #ffffff;
}

body .ui-tree.ui-tree-horizontal .ui-treenode-content.ui-state-highlight {
    background: #a9a9a9;
    color: #000000
}
PrimeFaces Elite 12.0.5
Ultima 6.1.0
Apache NetBeans IDE 18
Windows 11
Payara Server Open Source Edition 6.2023.7
FF, Chrome, Edge, Opera

siris
Posts: 322
Joined: 29 Jul 2019, 13:57

12 Aug 2021, 06:50

You are welcome!

Best Regards,

Post Reply

Return to “Barcelona - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests