+ Start a Discussion
Money Care 7Money Care 7 

record not display in my vf page

Hi have develop a vf page for lead object to display and search record dynamically.but problem is record is not displaying .
<apex:page sidebar="false" standardController="lead" recordSetVar="items">
<apex:form >



    <apex:composition template="DhamaniTemplate" >
        <apex:define name="title">
            Leads
        </apex:define>
        <apex:define name="content">
            <style>
                 .es-wws-lead{
                     background:transparent url("{!URLFOR($Resource.Resource,'Resources/css/img/leads-hover.png')}") no-repeat -1px -1px;
                }
                .es-wws-lead-active{
                    background-color:#079FD0;
                    color:#fff;
                    border-color:#079FD0;
                }
            </style>
            
             <div ng-app="myApp">
                <div ng-controller="customersCtrl" ng-init="showData()">
                    <div class="es-wws-filters">
                        <input type="text" placeholder="Search" ng-model="query" class="es-wws-search" ng-keyup="showData()"/>
                        <div class="es-wws-filter-float-right">
                            <label for="es-wws-records" class="es-wws-select-records-label">Records per page :&nbsp;</label>
                            <select id="es-wws-records" class="es-wws-select-records" 
                                ng-options="option.name for option in recordsPerpage.availableOptions track by option.id"
                                ng-model="recordsPerpage.selectedOption" ng-change="showData()">
                            </select>
                            <a href="/00Q/e" target="_blank" class="es-wws-add"></a>
                            <button ng-click="massdelete()" class="ess-wws-delete"></button>
                        </div>
                    </div>
                    <div class="es-wws-table-container">
                        <table class="es-wws-table">
                            <thead>
                                <tr class="es-wws-table-header-row">
                                    <td class="es-wws-table-action"><input type="checkbox" ng-model="selAll" ng-click="chval()"/></td>
                                    <td class="es-wws-table-name" ng-click="orderByMe('Name')"><span>Name &nbsp;</span> <span class="sortorder" ng-show="predicate === 'Name'" ng-class="{reverse:reverse}"></span></td>
                                    <td ng-click="orderByMe('Industry')"><span>Industry &nbsp;</span> <span class="sortorder" ng-show="predicate === 'Industry'" ng-class="{reverse:reverse}"></span></td>
                                    <td ng-click="orderByMe('Phone')"><span>Phone &nbsp;</span> <span class="sortorder" ng-show="predicate === 'Phone'" ng-class="{reverse:reverse}"></span></td>
                                    <td ng-click="orderByMe('leadSource')"><span>Lead Source  &nbsp;</span><span class="sortorder" ng-show="predicate === 'leadSource'" ng-class="{reverse:reverse}"></span></td>
                                    <td ng-click="orderByMe('Company')"><span>Company  &nbsp;</span><span class="sortorder" ng-show="predicate === 'Company'" ng-class="{reverse:reverse}"></span></td>
                                    <td ng-click="orderByMe('Status')"><span>Lead status &nbsp;</span> <span class="sortorder" ng-show="predicate === 'Status'" ng-class="{reverse:reverse}"></span></td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr class="items" ng-repeat="x in (filtered=(allrec=(names |filter:query)| pagination: curPage * pageSize | limitTo: pageSize))">
                                    <td><input type="checkbox" ng-model="x.selected"/></td>
                                    <td><a href="/{{x.ID}}" target="_blank">{{x.Name}}</a></td>
                                    <td>{{x.Industry}}</td>
                                    <td>{{x.Phone}}</td>
                                    <td>{{x.leadSource}}</td>
                                    <td>{{x.Company}}</td>
                                    <td>{{x.Status}}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="es-wws-no-record-warning" ng-show="filtered.length==0">
                        <span> No Records Returned</span>           
                    </div>
                    <div class="es-wws-table-footer">
                        <ul class="es-wws-pagination-list" ng-show="filtered.length>0">
                            <li>
                                <button type="button" class="es-wws-prev es-wws-nav-btn" ng-disabled="curPage == 0" ng-click="pageChange('p')"></button>
                            </li>
                            <li>
                                <span>Page {{curPage + 1}} of {{ numberOfPages() }}</span>  
                            </li>
                            <li>
                            <button type="button" class="es-wws-nav-btn" ng-disabled="curPage >= allrec.length/pageSize - 1" ng-click="pageChange('n')"></button>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            <script>
                   
                    var app = angular.module('myApp', []);
                    app.controller('customersCtrl',function($scope, $filter) {
                    $scope.recordsPerpage={"availableOptions":[{"id":5,"name":"5"},{"id":10, "name":"10"},{"id":20, "name":"20"},{"id":50, "name":"50"},{"id":100, "name":"100"},{"id":1000, "name":"1000"}],"selectedOption":{"id": 10,"name":"10"}};
                        $scope.showData = function( ){
                            $scope.curPage = 0;
                            $scope.pageSize = $scope.recordsPerpage.selectedOption.id;
                            
                            $scope.numberOfPages = function() {
                                return Math.ceil($scope.allrec.length / $scope.pageSize);
                            };
                        };
                        var orderBy = $filter('orderBy');
                            $scope.orderByMe = function(predicate) {
                                $scope.predicate = predicate;
                                $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;
                                $scope.names = orderBy($scope.names, predicate, $scope.reverse);
                            };
                        $scope.orderByMe('Name',true);
                        $scope.massdelete=function(){
                                document.getElementById("es-modal").style.display="block";
                                document.getElementById("es-pop").style.display="block";
                                var data=angular.toJson($scope.filtered, true);
                                lead.processdelete(data, function(result,event){
                                document.getElementById("es-modal").style.display="none";
                                document.getElementById("es-pop").style.display="none";
                                    if(event.status){
                                        if(result=='success')
                                                window.location.reload();
                                        else
                                            
                                            document.getElementById("es-wws-warn").innerHTML ='<div class="es-wws-error">'+result+'</div>';
                                    }
                                    else if (event.type === 'exception') {
                                        document.getElementById("es-wws-warn").innerHTML ='<div class="es-wws-error">'+event.message+'</div>';
                                        
                                    } else {
                                        $scope.showVal=false;
                                       document.getElementById("es-wws-warn").innerHTML ='<div class="es-wws-error">'+event.message+'</div>';
                                    }
                                        
                                });
                        };
                        
                        $scope.chval=function(){
                            for(var i=0;i<$scope.filtered.length;i++){
                                $scope.filtered[i].selected=$scope.selAll;
                            }
                        };
                         $scope.pageChange=function(d){
                            $scope.selAll=false;
                            for(var i=0;i<$scope.names.length;i++){
                                $scope.names[i].selected=$scope.selAll;
                            }
                            if(d=='p')
                                $scope.curPage-=1;
                            if(d=='n')
                                $scope.curPage+=1;
                        };
                        
                });
        
                angular.module('myApp').filter('pagination', function(){
                    return function(input, start)
                    {
                        start = +start;
                        return input.slice(start);
                    };
                });
            </script>
            </apex:define>
             </apex:composition>
    </apex:form>
            
            
        
   
</apex:page>