Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

af:tree hide child icon

Alex GrigorApr 20 2015 — edited Apr 22 2015

We are using <af:tree/> component in our application and the tree is populated using a POJO Data Control.

If the tree contains a leaf node (no children) first time when it's displayed, thedisclosecollapsed_ena.pngicon is displayed. After you click on it, it does disappear.

We don't want to show it from the beginning, is this possible? If it is, how can it be done?

Thank you,

Alex

Comments

Alex Grigor

We are using JDeveloper and ADF 12.1.3

Ashish Awasthi
Alex Grigor

I also found that approach, but I would like to know if there is more "classic" one. One provided by the Framework. I consider that one as being a bit of a "hack".

Thank you for the response.

Ashish Awasthi

if you expand all nodes then expand icon will not be visible on nodes that doesn't have any child

try setting initiallyExpanded property of tree to true


Ashish

Alex Grigor

Thank you Ashish,

Yes, I know that, but our requirements says that the tree must not be initially expanded.

Alex

Alex Grigor

I was thinking about a way to apply specific css classes for the each node and then using that class to override/remove the default icon. Something like this:

styleClass="#{node.childrenSize eq 0 ? 'ChildNode' : 'ParentNode'}" the problem is that i could only apply this classes to the <af:outputText /> and the icon is outside this component. Is there way to change the icon based on the css class?

Alex

1 - 6
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 20 2015
Added on Apr 20 2015
6 comments
543 views