We have built a Fiori app (Master/Detail) with a tree in the left pane and a table with details in the right pane. The tree is filled based on the Asset hierarchy. Some assets need actions, which I would like to visualize by coloring the background of that asset in the tree red.
Unfortunately the TreeNode has very little attributes/methods, none related to the background color.
Does anyone have a solution for this?
Regards,
John.
Request clarification before answering.
Hi,
Are you looking like this?
In below link you will find tree node with background color red(using css) and another node icon in red color using tree node property icon.
I have changed it with CSS, based on your requirement change it with javascript.
Let me know for any queries.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check this example
I have declared css .test{background-color: #ff0000;} and added style class to node.
Based on your condition, add declared style class to your node.
Hope it helps.
See my previous answer, that's exactly what I have done, but I think because the Fiori apps run in the launchpad the link to the css either doesn't work or get overwritten by the framework?
even with this css definition:
.backgroundred {
background-color: #ff0000;
}
and code like:
| var oNode12 = new sap.ui.commons.TreeNode("node12",{text:"USA"}); | |
| oNode12.addStyleClass("backgroundred"); |
Still no color visible
Regards,
John.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.