I saw many questions about how to hide expand button for leaf nodes in treeTable or tree component. So I'll show a simple trick. The idea is to hide it with CSS class which will be assigned to column in the nodeStamp facet if a view object row does not have child records.
In my example treeTable model is based on a static View Object with data shown in the image bellow.
In real life the query for such view object will be like:
To have ability to hide expand button you should add these lines into your application skin:
Then set styleClass for column in the nodeStamp facet.
After theses steps expand buttons for leaf nodes will be hidden.
Sample application you can download here.
In my example treeTable model is based on a static View Object with data shown in the image bellow.
In real life the query for such view object will be like:
To have ability to hide expand button you should add these lines into your application skin:
Then set styleClass for column in the nodeStamp facet.
After theses steps expand buttons for leaf nodes will be hidden.
Sample application you can download here.
No comments:
Post a Comment