jQuery Org Chart – a plugin for visualising data in a tree-like structure

jQuery OrgChart is a plugin that allows you to render structures with nested elements in an easy-to-read tree structure. To build the tree all you need is to make a single line call to the plugin and supply the HTML element ID for a nested unordered list element that is representative of the data you’d like to display. Features include: Expected Markup & Example Usage All documentation can be found on GitHub. Demo You can view a demo of this here. Source code The source code with an example is available here.

Salesforce: A better way to work with jQuery selectors and Visualforce Component Ids

I get very sad when discussing this particular topic. There are a variety of ways of get Visualforce component Ids and using them in JavaScript but all of them keep me awake at night. Srsly. A commenter on one of my posts got me thinking about how we can do this better and I’ve come up with a way that I think is great. Hopefully you’ll agree. This post means that my older posts here and here are now retired in favour of this method. If the world was on the brink of nuclear war with no clear path to peace what could you count on to save the day? Regular Expressions of course. If a meteor the size of Pluto was about to crash into Earth and Bruce Willis was too old to land on it and blow it up what could we count on to rid us of …

Read more

Across the Pond with Jason Venable aka TehNrd

Today I start a series of posts that’ll appear here and on the Tquila blog. The series will be in the format of Q&A with some of the finest Salesforce.com and Force.com evangelists, admins and developers. I’m starting with Jason Venable aka TehNrd and I’ll let him introduce himself. Q: Tell me a bit about yourself. How long have you worked with the CRM vs the Force.com Platform? Were you always a developer? A: My name is Jason Venable. I am 27 years old. I live in Seattle, Washington, USA. Oh, wait, you want something more interesting, got it. I’ve been working with salesforce.com CRM for a little over 4 years. Three of these years have also been working with force.com. All of this time has been administering and developing for a large enterprise salesforce.com deployment at F5 Networks. A lot of what I do is merging the two worlds …

Read more

Client-Side VisualForce Pagination with Pajinate

Pajinated DataTable

Pagination is an essential, and not so easy to implement user interface device that allows the developer to break long lists of items, or one very long item into sub-pages. I love the challenge that pagination brings (who doesn’t really) when developing efficient and reusable server-side code, but this article isn’t about that. Sometimes I need things done quickly, easily, and preferably with as little compromise as possible, and that’s what client-side pagination is all about.

Read more

Pajinate – A jQuery Pagination Plugin

Pajinate is a simple and flexible jQuery plugin that allows you to divide long lists or areas of content into multiple separate pages. Not only is it a simpler alternative to server-side implementations, but the time between paginated-page loads is almost nil (up to a reasonable page size of course).

Pajinate – A pagination plugin the whole family can enjoy!

Usage & Configuration

Read more

Salesforce Form Validation Enhanced

I have a dream, and in this dream form-validation is not a chore. All the nasty work is done client-side, and we – the developers – control what an error message says and where it says it! Server-side validation?! Pah, I spit in it’s general direction (but only if no ladies are present). I don’t need or want client-server round-trips.. I want speed, I want beauty, I want control; and I think you do too.

Our end goal: A neat, realtime, client-side validation technique for VisualForce.

Using either inputFields, Apex exception handling and/or the ‘required’ attribute in VisualForce, we have a number of mechanisms to deal with form-validation, but if we’re honest with ourselves, they’re the ten-thousands-spoons when all we need is a knife. I know you’ve heard me singing it’s praise from the rooftops, but yet again, jQuery is here to save the day.

Read more

VisualForce Element Ids in jQuery selectors

I have retired this approach in favour of a much neater solution that can be found here.

This tricky topic had me puzzled for some time and in earlier posts I went the way of using CSS classes to identify DOM elements; but was always a touch dissatisfied with the solution. Not only is it less efficient – valid XHTML pages should only have one element with any Id, although CSS classes can be shared by many elements – but it also feels all hacky ‘n stuff. I’m a bit older now, a bit more experienced and I RTFM. Without further ado, here is why it’s tricky, and how to fix it.

Read more

Masking Input on VisualForce Pages

I am a developer and (at least as often) a (l)user. UI and UX design are important from both perspectives, and it’s important to bear this in mind whilst creating any application. What is this waffle all about? There are some platforms, based in yonder cloud that could tweak the tiniest of features, and make the lives of their users (and administrators) 1 x shed-load better. Until they do that, we’re gonna have to do it ourselves.

Let’s get specific. Typically, validation error messages provided by Apex and VisualForce are only apparent after form is submitted ( or when we’re on the last page of a 39-page wizard ). Of course some cases require that it be this way, but for other cases it’s like my (very) old professor used to say, “Jus’ don’t let em make the mistake in the first place boy *tongue-click*”. Heeding Prof. Swart’s advice, let’s see how we can easily do this.

Read more

Flickr + jQuery + Salesforce = Awesome^5 [Part 2]

Okay software developing enthusiasts, I’m back from Paris (you didn’t know I was gone did ya?), I’m a year older and culturally, I’m richer (well I’d like to think so at least). It’s time to complete our two-part series on integrating disparate systems using  the most-excellent combination of web services, jQuery and the Force.com platform. In part 1 we learnt how to connect to a third-party endpoint (Flickr in our case), and consume their SOAP-based web services. Now we’re going to jazz it all up with our spiffy jQuery gallery carousel. Let’s have another look at where we want to be at the end of this all,

GalleryView 2.0 Integration

Read more