Posts

Showing posts with the label Remoting in Visualforce page

Javascript remoting in salesforce

Javascript remoting  in salesforce can be useful in making a call to controller method without posting the whole form(<apex:form>) to server but whereas visualforce ajax functions( action function, action support, action poller) post the form. Javascript remoting in salesforce  let’s you pass parameter and it provides a callback function in which its parameter contains result returned back from apex method.  JavaScript remoting  allows you to run asynchronous actions by decoupling the page from the controller and to perform tasks on the page without having to reload the entire page, Apex  @RemoteAction  methods must be static and either global or public and requires you to write some JavaScript Apex Class :- global class JsRemotingExample { Public String name {get;set;} @RemoteAction public static String showText(String name) { return 'Hola '+name +', you did a server request to this method through Javascrip...