TIL About Using Apex Controllers With Lightning Components

More importantly… I learned how to initialize Lightning Components from properties in an Apex Controller. My scenario: I wanted to display the detail page for a Contact in a lightning component.  Essentially the equivalent of “<apex:detail>” tag.  In Lightning, you can achieve this by using the “<force:recordView>” tag instead.  What I learned is that the […]

TIL about @AuraEnabled

When you’re using an <aura:attribute> that is an instance of a custom Apex Class, you need to use the following approach: Any methods in your class that you want to access from client-side logic must be declared as Static the @AuraEnabled annotation must be used on those methods as well Any properties of the class […]


So I’ve decided to start adding a new type of blog post to this site in an effort to stay more consistently engaged with it (I’ve been slacking and not paying as much attention to it as I would like). I’m going to start posting Today I Learned (#TIL) posts in addition to the regular […]

Visualforce Signature Component with HTML5 Canvas

I’ve come across the scenario a number of times where a client would like to have the ability to capture someone’s signature and keep it on a record in Salesforce.  This post describes a simple way to capture signatures in Salesforce using Visualforce, HTML5 Canvas, and Javascript Remoting. First, we start with a visualforce component […]

Add a Spinner on a Visualforce Page

Here’s a quick and easy way to add a spinner to a Visualforce page for when a user invokes an asynchronous action on a page and is waiting for an element to rerender. Add the following snippet to your visualforce page: <apex:actionStatus id=”pageStatus”> <apex:facet name=”start”> <apex:outputPanel > <img src=”/img/loading32.gif” width=”25″ height=”25″ /> <apex:outputLabel value=”Loading…”/> </apex:outputPanel> […]

Use a Fieldset in APEX and Visualforce

There are times where you may need to access fieldsets in APEX to dynamically generate pages in Visualforce.  In Apex, there are 2 main ways to do this, and you can select which approach you need based on what data you have available at runtime. Getting Fieldsets in Visualforce You can access fieldsets directly from a […]