AlloyUI Treeview : Single Select (Please Help)
AlloyUI Treeview : Single Select (Please Help)
https://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=119916977
2024-03-29T13:18:11Z
2024-03-29T13:18:11Z
RE: AlloyUI Treeview : Single Select (Please Help)
Koffi AGHOSTO
https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=119919279
2020-09-08T11:56:33Z
2020-09-08T11:56:33Z
Hello Yasin,<br /><br />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<br />helps me a lot.<br /><br />Thank you,<br />Have a nice day,<br />Koffi
Koffi AGHOSTO
2020-09-08T11:56:33Z
RE: AlloyUI Treeview : Single Select (Please Help)
Mohammed Yasin
https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=119918101
2021-07-24T15:55:42Z
2020-09-08T10:56:54Z
Hi,<br />
Have u checked <a href="https://alloyui.com/examples/tree/real-world.html">https://alloyui.com/examples/tree/real-world.html</a>
, this may help you.<br />
Example<br />
<pre><code><div id="myTreeView"></div>
<aui:script>
&nbsp;&nbsp; &nbsp;AUI().use(
&nbsp; 'aui-tree-view',
&nbsp; function(A) {
&nbsp; &nbsp; new A.TreeViewDD(
&nbsp; &nbsp; &nbsp; {
&nbsp; &nbsp; &nbsp; &nbsp; boundingBox: '#myTreeView',
&nbsp; &nbsp; &nbsp; &nbsp; children: [
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; children: [
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {label: 'Watermelon', leaf: true, type: 'check'},
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {label: 'Apricot', leaf: true, type: 'check'},
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {label: 'Pineapple', leaf: true, type: 'check'},
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {label: 'Kiwi', leaf: true, type: 'check'},
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {label: 'Orange', leaf: true, type: 'check'},
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {label: 'Pomegranate', leaf: true, type: 'check'}
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ],
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; expanded: true,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label: 'Checkboxes'
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; },
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; children: [
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {label: 'Watermelon', leaf: true, type: 'radio'},
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {label: 'Apricot', leaf: true, type: 'radio'},
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {label: 'Pineapple', leaf: true, type: 'radio'},
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {label: 'Kiwi', leaf: true, type: 'radio'},
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {label: 'Orange', leaf: true, type: 'radio'},
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {label: 'Pomegranate', leaf: true, type: 'radio'}
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ],
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; expanded: true,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label: 'Radio'
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; },
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; children: [
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {label: 'Watermelon', leaf: true, type: 'task'},
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {label: 'Apricot', leaf: true, type: 'task'},
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {label: 'Pineapple', leaf: true, &nbsp;type: 'task'},
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {label: 'Kiwi', leaf: true, type: 'task'},
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {label: 'Orange', leaf: true, type: 'task'},
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {label: 'Pomegranate', leaf: true, &nbsp;type: 'task'}
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ],
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; expanded: true,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label: 'Task',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; type: 'task'
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; ]
&nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; ).render();
&nbsp; }
);
</aui:script>
</code></pre>
Mohammed Yasin
2020-09-08T10:56:54Z
AlloyUI Treeview : Single Select (Please Help)
Koffi AGHOSTO
https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=119916976
2020-09-08T08:10:31Z
2020-09-08T08:10:31Z
Hello, <br />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<br />any solution to do it. I put 'type=radio' on my treeview