changing the background color of selected directory.

Hi

is there any way to highlight( changing the background) the selected directory in the tree structure.

i am using some combination like scrollbar to handle the overflow of tree data.

the following script is working fine to select the directory for the first time but while selecting the another directory it is changing the background color of recently selected but not re-setting the background color of previous selected directory.

var clientAdvTree = CAF.model(“#{activePageBean.clientIds[‘tree’]}”);
var clientAdvIcon= clientAdvTree.getControlId(“icon”);
var td = Element.up(clientAdvIcon);
td.style.backgroundColor = “#8080FF”;

please share your ideas on how to implement it…

Have you had a chance to look at the Table Listener at: http://ajax-softwareag.com/articles/N7M0TP/DesignerOnlineHelp/caf_model_listeners.html

You can use this for Trees as well as Tables.
Regards,
–mark