• sharath T
  • NEWBIE
  • 50 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 20
    Replies
Here is my code:

<apex:page >
    <html>
        <head>
            <base href="https://demos.telerik.com/kendo-ui/treeview/checkboxes"/>
            <style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style>
            <title></title>
            <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.112/styles/kendo.common-material.min.css" />
            <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.112/styles/kendo.material.min.css" />
        
            <script src="https://kendo.cdn.telerik.com/2016.1.112/js/jquery.min.js"></script>
            <script src="https://kendo.cdn.telerik.com/2016.1.112/js/kendo.all.min.js"></script>
        </head>
        <body>
            <div id="example">
            
                <div class="demo-section k-content">
                    <div>
                        <h4>Check nodes</h4>
                        <div id="treeview"></div>
                    </div>
                    <div style="padding-top: 2em;">
                        <h4>Status</h4>
                        <p id="result">No nodes checked.</p>
                    </div>
                    
                </div>
            
                <script>
                    $("#treeview").kendoTreeView({
                      checkboxes: {
                            checkChildren: true
                        },
                        
                        check: function(e) {
        this.expandRoot = e.node;

        this.expand($(this.expandRoot).find(".k-item").addBack());
      },
      
      


                        dataSource: [{
                            
                                    id: 1, text: "All Companies", expanded: false, spriteCssClass: "rootfolder", items: [
                                        { id: 2, text: "Economical",spriteCssClass: "image" },
                                        { id: 3, text: "Perth",spriteCssClass: "folder" },
                                        { id: 4, text: "Waterloo",spriteCssClass: "folder" }
                                    ]
                                
                                
                                
                            
                        }],
                        
          
                    });
            
           // function that gathers IDs of checked nodes
        function checkedNodeIds(nodes, checkedNodes) {
            for (var i = 0; i < nodes.length; i++) {
                if (nodes[i].checked) {
                    checkedNodes.push(nodes[i].id);
                }

                if (nodes[i].hasChildren) {
                    checkedNodeIds(nodes[i].children.view(), checkedNodes);
                }
            }
        }

                </script>
            
                <style>
                    #treeview .k-sprite {
                        background-image: url("../content/web/treeview/coloricons-sprite.png");
                    }
            
                    .rootfolder { background-position: 0 0; }
                    .folder     { background-position: 0 -16px; }
                    .pdf        { background-position: 0 -32px; }
                    .html       { background-position: 0 -48px; }
                    .image      { background-position: 0 -64px; }
            
                </style>
            </div>
        
        
        </body>
    </html>
</apex:page>
Hi Experts,

           I'm pretty new to salesforce. My requirement is that, "In lightning mode , the Company field in the user object is not displayed by mouse hovering the "Assigned to" field(Company Name Subfield) in "My Tasks" tab. While the other two fields under "Assigned to" such as "Title" and "Active" is displaying. Please suggest me a solution.

Thanks 
Sharath T
Hi Experts,

           I'm pretty new to salesforce. My requirement is that, "In lightning mode , the Company field in the user object is not displayed by mouse hovering the "Assigned to" field(Company Name Subfield) in "My Tasks" tab. While the other two fields under "Assigned to" such as "Title" and "Active" is displaying. Please suggest me a solution.

Thanks 
Sharath T
Hi Folks,

Can someone help me,

Am not able to see the line-by-line code coverage in Developer Console, though am able to see the percentage covered.

Is it a known issue or am doing something wrong.

Please suggest.

Many Thanks,
Uday
  • September 26, 2014
  • Like
  • 0

i am having a class

public class region{
public Integer region_id{get;set;}
public String region_name{get;set;}
public List<Integer> country_id{get;set;}
public list<String> country_name{get;set;}
}

 i have given a list of this class

when i tried to generate tree view withpage code

-------------------------

<apex:page Controller="Tree" showHeader="true" tabStyle="account">
<!-- Include the Jquery Script files -->
<link rel="stylesheet" href="{!URLFOR($Resource.Jtreeview,'/jquery.treeview.css')}"/>
<script src="{!URLFOR($Resource.Jtreeview,'/lib/jquery.js')}" type="text/javascript"></script>
<script src="{!URLFOR($Resource.Jtreeview,'/lib/jquery.cookie.js')}" type="text/javascript"></script>
<script src="{!URLFOR($Resource.Jtreeview,'/jquery.treeview.js')}" type="text/javascript"></script>
<!-- End of Javascript files -->
<script type="text/javascript">
        $(function() {
            $("#tree").treeview({
                collapsed: false,
                animated: "medium",
                control:"#sidetreecontrol",
                persist: "location"
            });
        })
</script><apex:form >
<br/> <br/> <br/>
<!-- Tree -->
<div class="treeheader" style="height:0px;">&nbsp;</div>
<div id="sidetreecontrol"><a href="?#"><font style="color:blue;">Collapse All</font></a> | <a href="?#"><font style="color:blue;">Expand All</font></a></div>
<ul id="tree">
    <apex:repeat value="{!Accounts}" var="parent">
        <li><strong><apex:inputCheckbox id="checkedone3">

</apex:inputCheckbox><apex:outputtext style="color:blue;" escape="false" value="{!parent.region_name}"/></strong>
             <ul>
                 <apex:repeat value="{!parent}" var="child">
                    <li><span class="formattextcon"><apex:inputCheckbox id="checkedone3">

</apex:inputCheckbox><apex:outputtext style="color:green;" escape="false" value="{!child.country_name}"/></span>
                 
                    </li>
                 </apex:repeat>  
             </ul>  
        </li>
    </apex:repeat>
</ul></apex:form>
<!-- End of Tree -->       
</apex:page>

-------------------------------------------------------

 i am getting a tree like this

 

 

  • Africa
    • [Algeria, Angola, Benin, Botswana, Burkina Faso, Burundi, Cameroon, Cape Verde, Central African Republic, Chad, Comoros, Congo (Brazzaville), Democratic Republic of the Congo, Djibouti, Egypt, Equatorial Guinea, Eritrea, Ethiopia, Gabon, Gambia, Ghana, Guinea, Guinea-Bissau, Kenya, Lesotho, Liberia, Libya, Madagascar, Malawi, Mali, Mauritania, Mauritius, Morocco, Mozambique, Namibia, Niger, Nigeria, Réunion, Rwanda, São Tomé and Príncipe, Senegal, Seychelles, Sierra Leone, Somalia, South Africa, St. Helena, Sudan, Swaziland, Tanzania, Togo, Tunisia, Uganda, Western Sahara, Zambia, Zimbabwe]
  • Asia
    • [Afghanistan, Bangladesh, Bhutan, Brunei, Cambodia, China, East Timor, Hong Kong, India, Indonesia, Japan, Kazakhstan, Kyrgyzstan, Laos, Macao, Malaysia, Maldives, Mongolia, Myanmar, Nepal, North Korea, Pakistan, Philippines, Singapore, South Korea, Sri Lanka, Taiwan, Tajikistan, Thailand, Turkmenistan, Uzbekistan, Vietnam]
  • Caribbean
    • [Anguilla, Antigua and Barbuda, Aruba, Bahamas, Barbados, British Virgin Islands, Cayman Islands, Cuba, Dominica, Dominican Republic, Grenada, Guadeloupe, Haiti, Jamaica, Martinique, Montserrat, Netherlands Antilles, St. Kitts and Nevis, St. Lucia, St. Vincent and the Grenadines, Trinidad and Tobago, Turks and Caicos]
  • Central America
    • [Belize, Costa Rica, El Salvador, Guatemala, Honduras, Nicaragua, Panama]

 

 

i want in this format

  Central America

         Belize

        Costa rica

        El Salvador

        Guatemala

 what changes should i make to the page code

Regards

Punnoose

 

 

Hai ,

 

How  can I add a checkbox for expanding and collapsing  a treeview ?

 

shine

Hello,

    Is there any way to assign tasks to multiple users besides creating other custom field?

  

 

TIA!!!