Message Boards
AlloyUI Treeview : Single Select (Please Help)
Koffi AGHOSTO, modified 3 Years ago.
AlloyUI Treeview : Single Select (Please Help)
Junior Member Posts: 67 Join Date: 5/27/14 Recent Posts
Hello,
I am using Liferay DXP and I use aui treeview for single select (means, I want to check only one checkbox) but I can't find
any solution to do it. I put 'type=radio' on my treeview but it is not working.
Please, help me, any suggestion is welcomed.
Thank you in advanced,
Koffi
I am using Liferay DXP and I use aui treeview for single select (means, I want to check only one checkbox) but I can't find
any solution to do it. I put 'type=radio' on my treeview but it is not working.
Please, help me, any suggestion is welcomed.
Thank you in advanced,
Koffi
Mohammed Yasin, modified 2 Years ago.
RE: AlloyUI Treeview : Single Select (Please Help) (Answer)
Liferay Master Posts: 591 Join Date: 8/8/14 Recent Posts
Hi,
Have u checked https://alloyui.com/examples/tree/real-world.html , this may help you.
Example
Have u checked https://alloyui.com/examples/tree/real-world.html , this may help you.
Example
<div id="myTreeView"></div>
<aui:script>
AUI().use(
'aui-tree-view',
function(A) {
new A.TreeViewDD(
{
boundingBox: '#myTreeView',
children: [
{
children: [
{label: 'Watermelon', leaf: true, type: 'check'},
{label: 'Apricot', leaf: true, type: 'check'},
{label: 'Pineapple', leaf: true, type: 'check'},
{label: 'Kiwi', leaf: true, type: 'check'},
{label: 'Orange', leaf: true, type: 'check'},
{label: 'Pomegranate', leaf: true, type: 'check'}
],
expanded: true,
label: 'Checkboxes'
},
{
children: [
{label: 'Watermelon', leaf: true, type: 'radio'},
{label: 'Apricot', leaf: true, type: 'radio'},
{label: 'Pineapple', leaf: true, type: 'radio'},
{label: 'Kiwi', leaf: true, type: 'radio'},
{label: 'Orange', leaf: true, type: 'radio'},
{label: 'Pomegranate', leaf: true, type: 'radio'}
],
expanded: true,
label: 'Radio'
},
{
children: [
{label: 'Watermelon', leaf: true, type: 'task'},
{label: 'Apricot', leaf: true, type: 'task'},
{label: 'Pineapple', leaf: true, type: 'task'},
{label: 'Kiwi', leaf: true, type: 'task'},
{label: 'Orange', leaf: true, type: 'task'},
{label: 'Pomegranate', leaf: true, type: 'task'}
],
expanded: true,
label: 'Task',
type: 'task'
}
]
}
).render();
}
);
</aui:script>
Koffi AGHOSTO, modified 3 Years ago.
RE: AlloyUI Treeview : Single Select (Please Help)
Junior Member Posts: 67 Join Date: 5/27/14 Recent Posts
Hello Yasin,
Thank you very much, you have helped me a lot. I can't see that each JSON line have a 'type' property, so your answer
helps me a lot.
Thank you,
Have a nice day,
Koffi
Thank you very much, you have helped me a lot. I can't see that each JSON line have a 'type' property, so your answer
helps me a lot.
Thank you,
Have a nice day,
Koffi