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 with sharing class BubbleChart2Controller{ | |
public String deafultFromDate { get; set; } | |
public String defaultThroughDate { get; set; } | |
private static final String REPORT_ID = '00Ox0000000hEzq'; | |
public BubbleChart2Controller() { | |
// Default to the current year. | |
// These instance variables are only used to | |
// populate the default values on the inputs. |
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 with sharing class JoinController { | |
// The from and through dates are hard-coded for simplicity's sake. | |
// Should change to parameters or input or something else. | |
public String getPageViewsJson() { | |
List<Page_View_Summary__c> pvs = [ | |
SELECT Date__c, Number_of_Views__c | |
FROM Page_View_Summary__c | |
WHERE Date__c >= 2014-04-01 | |
AND Date__c <= 2014-04-30 |
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
@RestResource(urlMapping='/v1.0/messages') | |
global class MessageService { | |
@HttpGet | |
global static void getMessages() { | |
// buildMessages gets FeedItems | |
List<Message> messages = buildMessages(); | |
RestResponse res = RestContext.response; |
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 with sharing class RerenderNoAction { | |
public RerenderNoAction() { | |
viewMeCnt = 0; | |
} | |
public Integer viewMeCnt { get; set; } | |
public String parentOpt { get; set; } | |
public List<SelectOption> getParentOptions() { | |
List<SelectOption> opts = new List<SelectOption>(); |
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 with sharing class AnalyticsController{ | |
public List<SelectOption> availableReports { get; set; } | |
public Id reportId { get; set; } | |
public Map<String, List<SelectOption>> availableDataTypeFilterOperators { get; set; } | |
public List<ColumnFilter> availableColumnFilters { get; set; } | |
public AnalyticsController() { | |
availableReports = retrieveAvailableReports(); | |
availableDataTypeFilterOperators = retrieveAvailableDataTypeFilterOperators(); |
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 > | |
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/smoothness/jquery-ui.css" /> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script> | |
<apex:remoteObjects > | |
<apex:remoteObjectModel name="Contact" fields="Name,Id,Email,MobilePhone,Phone"/> | |
</apex:remoteObjects> | |
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 with sharing class ContactsController { | |
@RemoteAction | |
public static Map<String, Object> retrieveContacts(String type, List<String> fields, Map<String, Object> criteria) { | |
// Retrieve using the standard retrieve | |
Map<String, Object> result = RemoteObjectController.retrieve(type, fields, criteria); | |
// Add in the total record count for the current user. | |
// This is needed to know when to stop scrolling. |
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 > | |
<!-- download the jstree from jstree.com and upload the dist directory as a static resource --> | |
<link href="{!URLFOR($Resource.jsTree, 'themes/default/style.min.css')}" rel="stylesheet" /> | |
<script src="{!URLFOR($Resource.jsTree, 'libs/jquery.js')}"></script> | |
<script src="{!URLFOR($Resource.jsTree, 'jstree.min.js')}"></script> | |
<script src="{!URLFOR($Resource.jsTree, 'jstree.min.js')}"></script> | |
<!-- | |
Change the remoteObjectModel name="Account and |
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
/** | |
* Everything is pass by value in Apex. | |
* When a method is called the runtime pushes a stackframe on the stack and params | |
* are created as local vars, including ref vars. | |
* The object that the ref var points to lives on the heap and can be modified if not immutable. | |
* The param itself is the ref var and is by value like all params in Apex. | |
*/ | |
public class A { | |
public String val { get; set; } | |
} |
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
<aura:component > | |
<ltng:require scripts="/resource/rating/vendor/jquery.js,/resource/rating/lib/jquery.raty.js" | |
styles="/resource/rating/lib/jquery.raty.css" | |
afterScriptsLoaded="{!c.afterScriptsLoaded}"/> | |
<aura:attribute name="value" type="Integer" required="true"/> | |
<aura:attribute name="ready" type="Boolean" default="false"/> | |
<div aura:id="rating"></div> | |
</aura:component> |
OlderNewer