Could someone assist me in changing the default background color of a selected element in the tree?
Below is the XHTML code:
<style type="text/css">
.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight
{
background-color: green;
}
</style>
<h:head>
</h:head>
<h:body>
<h:form id="mainform">
<h:panelGrid columns="4" layout="grid">
<p:outputPanel style="width: 100%; height: 400px">
<div id="mainTableDiv">
<p:tree id="tree1" value="#{treeDNDView.root1}" var="node" selectionMode="single"
selection="#{treeDNDView.selectedNode1}"
draggable="true" droppable="true" dragdropScope="demo" scrollable="true"
scrollHeight="630" widgetVar="tree1">
<p:treeNode>
<h:outputText value="#{node}"/>
</p:treeNode>
</p:tree>
</div>
</p:outputPanel>
......
After inspecting, it was found that:
https://i.sstatic.net/pv6Yj.jpg
The selected items currently have a grey background color, but I require it to be green.