Skip to content
This repository was archived by the owner on Jan 10, 2024. It is now read-only.

Commit 8b18f9b

Browse files
author
Pat Patterson
committed
Corrections
1 parent 19c6d63 commit 8b18f9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.markdown

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Background
88

99
Due to the [same origin policy](http://en.wikipedia.org/wiki/Same_origin_policy), JavaScript running in Visualforce pages may not use [XmlHttpRequest](http://en.wikipedia.org/wiki/XMLHttpRequest) to directly invoke the REST API, since Visualforce pages have hostnames of the form abc.na1.visual.force.com, and the REST API endpoints are of the form na1.salesforce.com.
1010

11-
The RemoteTK Visualforce Component (comprising RemoteTK.component and RemoteTKController.cls) provides an abstraction very similar to the REST API, implemented via `@RemoteAction` methods in the component's controller. The advantage of this mechanism is that no API calls are consumed. A disadvantage is that upsert is not currently implemented.
11+
The RemoteTK Visualforce Custom Component (comprising RemoteTK.component and RemoteTKController.cls) provides an abstraction very similar to the REST API, implemented via `@RemoteAction` methods in the component's controller. The advantage of this mechanism is that no API calls are consumed. A disadvantage is that upsert is not currently implemented.
1212

1313
Alternatively, the ForceTK JavaScript library works around the same origin restriction by using the [AJAX Proxy](http://www.salesforce.com/us/developer/docs/ajax/Content/sforce_api_ajax_queryresultiterator.htm#ajax_proxy) to give full access to the REST API. Since the AJAX proxy is present on all
1414
Visualforce hosts with an endpoint of the form https://abc.na1.visual.force.com/services/proxy, our Visualforce-hosted JavaScript can invoke it, passing the desired resource URL in an HTTP header. A drawback here is that using the REST API, even from a Visualforce page, consumes API calls.
@@ -34,7 +34,7 @@ Using RemoteTK in a Visualforce page
3434

3535
Add RemoteTKController.cls and RemoteTK.component to your org by creating an Apex Class and a Component and pasting in the respective content, pasting the files into a [Force.com IDE](http://wiki.developerforce.com/page/Force.com_IDE) project, or by using the [Force.com Migration Tool](http://wiki.developerforce.com/page/Migration_Tool_Guide).
3636

37-
Your Visualforce page will need to include the component, then create a client object, passing a session ID to the constructor. An absolutely minimal sample is:
37+
Your Visualforce page will need to include the component and create a client object. An absolutely minimal sample is:
3838

3939
<apex:page>
4040
<!-- Include the RemoteTK component -->

0 commit comments

Comments
 (0)