This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page standardStylesheets="false" sidebar="false" showHeader="false" controller="AngularJSDemoCtrl"> | |
<html xmlns:ng="http://angularjs.org" ng-app="hello" lang="en"> | |
<head> | |
<meta charset="utf-8"/> | |
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/css/bootstrap.no-icons.min.css" rel="stylesheet"/> | |
<link href="https://netdna.bootstrapcdn.com/font-awesome/2.0/css/font-awesome.css" rel="stylesheet"/> | |
<apex:includeScript value="{!$Resource.Angularjs}"/> | |
</head> | |
<script type="text/javascript"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global with sharing class AngularJSDemoCtrl { | |
public class Accountwrap { | |
Accountwrap() { | |
Website = ''; | |
AccountSource = ''; | |
Phone = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page controller="MyJSController"> | |
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> | |
<script src="http://code.jquery.com/jquery-1.9.1.js"></script> | |
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> | |
<script type="text/javascript"> | |
$(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Map < Id, List < Contact >> mapAccIdByCntlst = new Map < Id, List < Contact >> (); | |
for (Contact c: [Select Id, name, AccountId from Contact where AccountId != null]) { | |
// AccountId mapping with Contact List | |
if (mapAccIdByCntlst.containsKey(c.AccountId)) { | |
mapAccIdByCntlst.get(c.AccountId).add(c); //tricky part .Here map.get(key) is returning list and we are adding contacts to the list | |
} else { | |
List < Contact > lstcnts = new List < Contact > (); //Initialize list as no key is found before and first time we get key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@HttpPost | |
global static string postwebserviceutil() { | |
//Extracting the data from the JSON HTTP request object sent from Timetrade | |
RestRequest req = RestContext.request; | |
RestResponse res=RestContext.response; | |
Blob body=req.requestBody; | |
String jsonToParse=body.toString(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ublic class TestCallout { | |
public static void TestCallout(){ | |
String clientId = ''; | |
String clientSecret = ''; | |
String reqbody = 'grant_type=password&client_id='+clientId+'&client_secret='+clientSecret+'&username=username&password=password'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global void finish(Database.BatchableContext BC) { | |
// Get the ID of the AsyncApexJob representing this batch job | |
// from Database.BatchableContext. | |
// Query the AsyncApexJob object to retrieve the current job's information. | |
AsyncApexJob a = [Select Id, Status,ExtendedStatus,NumberOfErrors, JobItemsProcessed, | |
TotalJobItems, CreatedBy.Email | |
from AsyncApexJob where Id =:BC.getJobId()]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page controller="winter14Ctrl" docType="html-5.0"> | |
<apex:form > | |
<apex:pageBlock title="Winter 14 Visualforce Explore" > | |
<apex:pageBlockSection > | |
<apex:pageBlockSection > | |
<apex:outputLabel ></apex:outputLabel> | |
<apex:inputText label="Account" value="{!AccountName}" list="{!Accounts}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class winter14Ctrl { | |
public String AccountName{ get; set; } | |
public integer hello{ get; set; } | |
public Date fDate { get; set; } | |
public string email{get;set;} | |
public string phone{get;set;} | |
List<String> lstAccounts; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page controller="googleauthclass"> | |
<apex:form > | |
<apex:commandButton value="Connect To Google" action="{!connect}"/> | |
<apex:commandButton value="Fetch Auth Token" action="{!showtoken}"/> | |
</apex:form> | |
{!bodyprint} | |
</apex:page> |
OlderNewer