You are currently browsing the category archive for the ‘UI Enhancements’ category.
Since loading large numbers of records proved impossible, I’ve updated my jQuery autocomplete integration to perform an Ajax call and retrieve associated records on key press.
Benefits:
(1) Live Ajax autocomplete on any object
(2) Easy to use
(3) Easily themable with jQuery Themeroller
(4) Easily customizable (implementation is open source)
(5) Can provide a filter
Usage:
<c:enhancedLookup pageController="{!this}" fieldName="Test_Lookup_Object__c" objectToLookup="TestLookupObject__c" bigset="true" />
Defaults are:
(1) 2 characters must be typed in before the call
(2) Call with ‘LIKE’ as specified in Abhinav Gupta’s helpful post on the subject
(3) Lookup on 8 elements while the string is under 3 characters and 100 after this
To provide a filter pass a filter string in SOQL format such as the following:
<c:enhancedLookup pageController="{!this}" fieldName="Test_Lookup_Object__c" objectToLookup="TestLookupObject__c" bigset="true" filterString="WHERE type__c != 'Bear'" />
I’ve added this and numerous other enhancements to the jQuery for Salesforce library at Google Code.
I’ve also added the controller to my library on Snipplr for reference.
Probably you were very excited this week to see Chatter go GA. I know I was!
As of today, a library providing enhanced Visualforce components is also available!
Standard functionality works like so:
<c:enhancedText pageController="{!this}" fieldName="Text__c" validateAs="name" />
Why would you want to use this library? Please take a look at this video:
To use this on a standard controller all you need is an extensions class that extends PageControllerBase, which includes all of the extra goodies.
public class myController extends PageControllerBase {
Default functionality includes automatic client side validation. All you need to do is add an action function to run the included save method:
<apex:actionFunction action="{!pageController.ecSave}" name="saveMe"></apex:actionFunction>
Then include the validation code:
<apex:outputText escape="false" value="{!pageController.completeJavascript}"/>
Yep, that’s all you need. Everything else is added automatically (see this article for an explanation of the architecture).
Please read the full instructions here.
A live demo is available here. Please use and contribute!
Complete source is available on Google Code (along with the soon to be launched Formation).


