Pure-Essence.Net

Archive for the ‘non php code’ Category

jQuery read only elements

Posted by: pureessence on: September 22, 2011

There is a business requirement on a project I have at work to only allow a certain number of properties editable at a certain stage of the domain object’s life cycle. And like always, the properties defined to be editable could change in the future. I already have a page that allows the user to [...]

QUnit – test your javascript

Posted by: pureessence on: July 24, 2011

After over ten years of javascript programming, I’m finally seriously considering writing at least unit tests for my javascript. Since I’m such a big fan of jQuery, QUnit seems like the obvious choice. It’s sad but better late than never. The truth is, in my opinion, the fact that javascript test frameworks do not yet [...]

Use modal windows for delete confirmations please

Posted by: pureessence on: March 1, 2011

While reviewing an existing project at work, I notice it has many delete confirmation pages. In my opinion, delete confirmation PAGES should really just retire from the face of the earth. Seriously, why do we need to create a http request & html for the mere purpose of asking “Are you sure you wish to [...]

itext page number (page x of y)

Posted by: pureessence on: November 14, 2010

I was looking for a complete example of how to dynamically generate the page numbers when you create the pdf using iText and I couldn’t find one. This is based on the example in the iText in Action book but I added my “refactoring” if you will. I hope this helps someone. If not, it [...]

Java instaniate an abstract class… sort of…

Posted by: pureessence on: August 27, 2010

At work I had to create some test data for a junit test. The function I’m testing expects a super abstract class to be passed in and I need to test the same function for bunch of child classes. I wish I could just pass in the parent class but since it’s abstract I cannot [...]

jQuery session timeout countdown with jQueryUI dialog

Posted by: pureessence on: February 14, 2010

Very nice jQuery session timeout countdown example with the use of the jQuery idleTimer plugin. Here’s my example with the jQueryUI dialog as the warning. Here’s my example with the jQueryUI dialog as the warning.

Stupid IE does it again

Posted by: pureessence on: February 12, 2010

I just learned IE does not support jQuery’s new live (event delegation) binding on the change event. Very nice IE, you did it again.

Creative overlay/popup with jQuery

Posted by: pureessence on: January 15, 2010

While doing a presentation on jQuery at work today, I went over a particular example I put together earlier today. I thought I’d share it with you here. In the past, we have used popups for editing values inside of a input box. The most well known example I can think of is smilies on [...]

Java List/Array syntax

Posted by: pureessence on: December 30, 2009

Something I always forget, a shortcut array syntax for Java:

SpringMVC generic errors

Posted by: pureessence on: December 29, 2009

I was looking around the net for this. Maybe I didn’t look hard enough but I wasn’t able to find it. Finally a coworker told me. If you use the SpringMVC framework and wish to show generic validation error messages at the top of the page, here’s how you do it: Obviously if you wish [...]


My most adorable Pomeranians

Categories

Archives

SocialVibe


Follow

Get every new post delivered to your Inbox.