How to use jtree with radio button for dynamic data

Hello Friends,

I want to use tree view with radio button with dynamic data. I have seen some examples with checkboxes and selectbox and all. But i need radio button. plz help me.

I need the below structure. I have seen an example here…

JavaScript Bs_Tree example 8

But i am not getting the code from it.

Ex:

<radio>File

  • <radio> New
  • <radio> Save
  • <radio> Save as

<radio>Edit

  • <radio> Cut
  • <radio> Copy
  • <radio> Past

Thanks!

I have taken my dynamic value from php. That is in array format.

When you view source of their website, there are four main js files.

<script type=“text/javascript” src=“/_bsJavascript/components/tree/Bs_Tree.class.js”></script>
<script type=“text/javascript” src=“/_bsJavascript/components/tree/Bs_TreeElement.class.js”></script>
<script type=“text/javascript” src=“/_bsJavascript/components/tree/examples/data1.inc.js”></script>
<script type=“text/javascript” src=“/_bsJavascript/core/lang/Bs_Array.class.js”></script>

Download all js files and include in your webpage.
Don’t include init() function and treeDiv1 in your webpage.

/_bsJavascript/components/tree/examples/data1.inc.js - which contains tree nodes in array format. Change based on your requirement.

Hello Sir,

I have seen that as well. But i dont know how to set dynamic value for tree elements. Please help me!

Hello Sir,

I have seen that as well. But i dont know how to set my dynamic value for tree elements of radio button. Please help me!

I can help you out, but i don’t know from where you are getting the data and how your data is represented.