Re: Benefits of XUL with custom components

Sam Terrell <[email protected]>
Newsgroups gmane.comp.java.luxor-xul.user
Message-ID <[email protected]>
Blake Williams wrote:
> Mozilla xul uses xbl to create or extend components. This allows new 
> tags to be defined and added dynamically without a change to the layout 
> engine. The new tags are "attached" to a document through a stylesheet 
> so the layout engine knows where to find the component definition. I 
> understand there is a difference between mozilla xul and a java 
> implementation as far as how the layout is done, but if the idea is to 
> have a java implementation of xul, then it should stick to the standard 
> as much as possible. My $.02.
> 
> Blake
> 


Isn't XBL what your average DTD references?

My problem is that it would be about the same as manually editing the 
DTD.  Why not just make a special object tag for that?

For instance, lets say I create a new Component that was an extension of 
another.  Lets call it PhoneField in package net.sf.something.

<object class="net.sf.something.PhoneField" name="phone1">
	<set name="color" value="red"/>
</object>

That way we can have setters to set properties on the object as well 
without the messiness of creating multiple objects and regestering them 
manually for use with componentRef.  This will let those wakey people 
that are good at making UI's make the UI, and the rest of us just bridge 
it to the logic.

Of course, I think this would require some reflection, but I hear that's 
not so bad.

The only reason I think this is better other than having a static DTD is 
just the right thing to do, is that editors that verify, and parsers 
that verify, will really freak out if you use tags that aren't in the 
DTD.  Editing the DTD for someone else's spec just seems very wrong to 
me, especially when you could just make a generic tag instead.

-Sam



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.