On Sun, Dec 13, 2009 at 11:28 AM, David Geary <clarity.training(a)gmail.com>wrote:
2009/12/13 Dan Allen <dan.j.allen(a)gmail.com>
>
> I'd even like to get rid of the ui:composition there and perhaps have
> something like "cc:component" or "cc:tag" as the wrapper.
>
> We can also leverage the default namespace to cut out the unnecessary
> namespace prefixes:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <component xmlns="jsf:cc">
> <interface>
> <attribute name="name" required="true"/>
> </interface>
> <implementation>
> Hello, #{cc.attr.name}
> </implementation>
> </component>
>
> Notice that I'm not really changing all that much in JSF to get to this
> point. It's really just a shift in thinking (and recommending).
>
It's also a major shift in usability for page authors, so this proposal
gets a hearty +1 from me. My original proposal to simplify the composite
namespace was just the tip of the iceberg--thanks Dan, for carrying that
proposal to its logical conclusion. I'd love to see this in the next
maintenance release.
Yeah!
One thing to keep in mind with the default namespace is that if you want to
use HTML, you would have to prefix it in the case above (which might be
strange to some people):
<?xml version="1.0" encoding="UTF-8"?>
<component xmlns="jsf:cc"
xmlns:html="http://www.w3.org/1999/xhtml">
<interface>
<attribute name="name" required="true"/>
</interface>
<implementation>
Hello, <html:strong>#{cc.attr.name}</html:strong>
</implementation>
</component>
-Dan
p.s. Isn't it strange every time you see 1999/xhtml? ;)
--
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597
http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://www.google.com/profiles/dan.j.allen