Skip to content

Instantly share code, notes, and snippets.

@fayefaye02
fayefaye02 / SimpleProxyClient.page
Created October 20, 2015 22:47 — forked from richardvanhook/SimpleProxyClient.page
Simple VF page that demonstrates how to hit REST API. NOTE: User must have access to Chatter REST API for this exact demo to work.
<apex:page docType="html-5.0" sidebar="false" showHeader="false"
standardStylesheets="false" cache="true">
<!-- TRANSFORM PARTNER URL INTO TRUE PROXY URL -->
<apex:variable var="PARTNER_URL" value="{!$Api.Partner_Server_URL_290}" />
<apex:variable var="PARTNER_URL_SPLIT" value="{!
LEFT(PARTNER_URL,FIND('.visual.force.com',PARTNER_URL)-1)
}"/>
<apex:variable var="POD" value="{!
MID(PARTNER_URL_SPLIT,FIND('.',PARTNER_URL_SPLIT)+1,LEN(PARTNER_URL_SPLIT))
@fayefaye02
fayefaye02 / gist:9b9d08e52e89e2c763ef
Created October 20, 2015 22:47 — forked from henriquez/gist:3146782
Example Javascript that uses ajax proxy to make request to Chatter API
<apex:page controller="CustomerCommunityController" id="customercommunitycontroller" sidebar="false" showHeader="false" standardStylesheets="false" >
<head>
<title>Acme Customer Support</title>
<meta charset="utf-8" />
<apex:includeScript value="{!$Resource.jquery}"/>
</head>
<script type="text/javascript">
var printMap = function(map) {
map.setOptions({
mapTypeControl: false,
zoomControl: false,
streetViewControl: false,
panControl: false
});
var popUpAndPrint = function() {
dataUrl = [];
@abhinavguptas
abhinavguptas / twinBoxMultiSelectList.page.html
Created January 16, 2012 12:53
Using Twin Box MultiSelect Jquery Plugin in Visualforce
<apex:page controller="twinBoxMultiSelectList_Ctlr" showHeader="false" sidebar="false">
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" />
<apex:includeScript value="{!URLFOR($Resource.twinBoxMultiSelectList, 'plugin.js')}"/>
<apex:stylesheet value="{!URLFOR($Resource.twinBoxMultiSelectList, 'plugin.css')}"/>
<style>
.boldLabel {
font-weight : bold;
font-size : 110%;