function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sudheer achantisudheer achanti 

. , could you please advise the error is :No remoted actions found for 'HotelRemoter.findAll' . Thanks!

<apex:page sidebar="false" showheader="false" controller="HotelRemoter">
<head>
<style type="text/css">
  html { height: 100% }
  body { height: 100%; margin: 0; padding: 0 }
  #map-canvas { height: 100% }
</style>
<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script>
var map;
function initialize() {
    var mapOptions = {
        center: new google.maps.LatLng(37.784173, -122.401557),
        zoom: 15
    };
    map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
}
google.maps.event.addDomListener(window, 'load', initialize);
function loadHotels() {
    Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.HotelRemoter.findAll}',
        function(result, event){
            if (event.status) {
                for (var i=0; i<result.length; i++) {
                    var id = result[i].Id;
                    var name = result[i].Name;
                    var lat = result[i].Location__Latitude__s;
                    var lng = result[i].Location__Longitude__s;
                    addMarker(id, name, lat, lng);
                }
            } else {
                alert(event.message);
            }
        },
        {escape: true}
    );
}
function addMarker(id, name, lat, lng) {
    var marker = new google.maps.Marker({
            position: new google.maps.LatLng(lat, lng),
            map: map,
            title: name
    });
    google.maps.event.addListener(marker, 'click', function(event) {
        window.top.location = '/' + id;
    });
}
 </script>  
</head>
<body>
  <div id="map-canvas"/>
</body>
</apex:page>
 
<- Deepak Rathinavelu -><- Deepak Rathinavelu ->

Hi Sudheer

The line
"Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.HotelRemoter.findAll}',"
The action is not in the controller

https://developer.salesforce.com/forums/?id=906F0000000ADFwIAO

This might help

Regards
RD
 

Dileep KumarDileep Kumar

Hi sudheer achanti

Please write this method in your controller:

public void findAll() {
}

Thanks,

Dileep