• #31909
    Forcetalks

    What is a Javascript remoting for apex controllers in Salesforce? Explain its parts.

    What is a Javascript remoting for apex controllers? Explain its parts.

     

    #31918
     Anjali #8
    Forcetalks

    Hi Madhulika

    JavaScript remoting is a tool that front-end developers can use to make an AJAX request from a Visualforce page directly to an Apex controller. 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.

    JavaScript remoting has three parts:

    • The remote method invocation you add to the Visualforce page, written in JavaScript.
    • The remote method definition in your Apex controller class. This method definition is written in Apex, but there are few differences from normal action methods.
    • The response handler callback function you add to or include in your Visualforce page, written in JavaScript.
    #34843
    Salesforce | shariq shariq #1
    Forcetalks

    Hi,

    Use JavaScript remoting in Visualforce to call methods in Apex controllers from JavaScript. Create pages with complex, dynamic behavior that isn’t possible with the standard Visualforce AJAX components.
    Features implemented using JavaScript remoting require three elements:The remote method invocation you add to the Visualforce page, written in JavaScript.
    The remote method definition in your Apex controller class. This method definition is written in Apex, but there are some important differences from normal action methods.
    The response handler callback function you add to or include in your Visualforce page, written in JavaScript

     

    Hope this helps.

    #36150
    Salesforce | Parul Parul #2
    Forcetalks

    hi

    JavaScript remoting is a tool that front-end developers can use to make an AJAX request from a Visualforce page directly to an Apex controller. 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.

    @RemoteAction
    global static Account getAccount(String accountName)
    {
    account = [select id, name, phone, type, numberofemployees from Account where name = :accountName ];
    return account;
    }
    }

     

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2018 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?