As this waiting for a element is one of biggest headaches in automation, I thought, I should share my experience.
Once of the biggest issues I see with people new to Selenium ( or any number of the other web automation tools ) is the liberal scattering of Thread.sleep(xxx) through out the code. This should be considered a bad smell introducing timing specific code into your script.
In Sizzle.js(of jQuery), there is simple code snippet to check if there is an element present
In ajax, the element may be there, but it is may not be visible to the users. So, checking for length alone wont do. For that, checking for visibility will do.
Call these two snippets in the waitforcondition and see the magic. Selenium can automate any ajax or dynamic element actions.
These tricks for only Selenium 1.0. I think, in Se2, these issues may not be there. I need to check and confirm this.