I've just started using Adobe CQ5 and am working my way through getting my first custom components rolled... I've found a bug that I can't figure out and was hoping someone could shed some light on it.
Basically, I've defined a custom image and associated drop area, but couldn't figure out how to do a placeholder image. So I did this:
<%
if (leftImage != null && leftImage.hasContent()) { leftImage.draw(out); }
else { leftImage.setSelector(".img"); out.print("<img class=\"" + DropTarget.CSS_CLASS_PREFIX + "panelLeftImage" + "\" src=\"http://placehold.it/300x300\" />"); }
%>
It seems to work properly once you've gone into the component edit dialog and clicked "OK", but when you try to drop an image at page load without having gone into the dialog, the resource doesn't resolve and you get a broken image graphic. The drop target is correctly highlighted though.
Any ideas?