WARNING: This blog entry was imported from my old blog on blogs.sun.com (which used different blogging software), so formatting and links may not be correct.
entries I've shown the designer rendering common web pages from the net.
These are great testcases for me to make sure the XHTML and CSS layout
engine is working correctly, at least for common web constructs.
You may wonder how I got the designer to render html pages. No, I didn't
sit and try to replicate the page by dragging JSF components on the page.
There's a hidden feature in the designer called "Page Import", which as of
is not so hidden.
new document about the feature here.
Have you been curious what the little green triangles are? See image on the right -- the little triangular green icons in the top left corners of some components. If so, go read the article!
Note that this is a preview feature, so be careful. I just discovered a
bug the other day: If the html page you're importing has an
attribute on the
<html> tag, Bad StuffTM
happens. Fixed but not in bits that are available yet. For now, remove
the attribute before importing.
There is one really cool aspect of Page Import I've gotta point out though.
Some browsers, like Mozilla and Internet Explorer, can save a "complete"
web page, where they not only save a page but all required images and
stylesheets as well. The problem is that they only save images and other
resources that are referenced in the html page. If the page being saved
has an image (or secondary stylesheet) that is referenced from a
stylesheet or style attribute, the image will not be
imported. The designer page import feature on the other hand does handle
this; it imports all external resources referenced in any reachable
stylesheets as well, and these stylesheets are rewritten to reference
the imported copy.