Skip to main content

George Bridgeman

Member since Dec 11, 2008

Recent Blog Comments By George Bridgeman

  • GetPageContext() Is Template Specific, Not Request Specific

    Posted on Aug 22, 2007 at 12:07 PM

    I wasn't particularly clear :s GetPageContext() returns an object that gives the page the tools it needs to do its job... things like the request, response, scopes, session, etc. Each template will have its own page context as it has its own scopes, attributes, etc, so you get the same object ret... read more »

  • GetPageContext() Is Template Specific, Not Request Specific

    Posted on Aug 22, 2007 at 10:53 AM

    It is indeed page specific. The clue is in the name ;) To get the underlying request object, do GetPageContext().getRequest() The page context is a PageContext java object. Look at the javadoc here: http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/jsp/PageContext.html George.... read more »

  • I Just Can't Understand Object Oriented Programming (OOP) And Join Tables

    Posted on Aug 17, 2007 at 10:59 AM

    You've only got one object. The practice. I don't think you need your join table at all. Just add a parentid column to your practice table. Using that, if you're after all the children records for a given practice, you can do something like: select ... from practice where practice.parentid = <... read more »

  • Selecting Contrasting Text Color Based On Background Color

    Posted on Aug 13, 2007 at 6:19 PM

    I ported a Perl script to CF to generate a colour cube for a specified number of colours. It'll generate a nice gradient of colours for you and use the brightness test on the W3 site to decide whether to colour the text black or white. I needed this to make sure that no two colours on my treemap gra... read more »

  • Selecting Contrasting Text Color Based On Background Color

    Posted on Aug 9, 2007 at 9:56 AM

    Interesting way of solving the problem! I was in a similar scenario a while ago when I needed to generate a colour palette containing potentially any number of colours, each with enough contrast from the others, to fill regions on a treemap. I had the same problem with figuring out the best colour ... read more »

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel