On Tue, Mar 18, 2008 at 9:54 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi Andrew,
>
> Andrew Robinson schrieb:
>
> > One major drawback to the javadoc annotation approach has been left
> > out and that is attribute reuse. The maven-faces-plugin allows you to
> > import XML fragments using XPath. So in Trinidad, onclick,
> > onmouseover, onmouseout, etc. you can import one XML file and not have
> > to re-define all these. But with the javadoc approach, you have to
> > either one, try to hack the code to extend other classes, two have
> > some weird interface usage to import these. Either way, the object
> > hierarchy has to be hacked to get it to work.
> >
>
> Hmm..interesting. So trinidad has cases where a class X is not related
> to A by inheritance, but does want to provide the same properties as A?
>
> Java currently defines "implements" and "extends"; sounds like Trinidad
> has invented a new OO concept, "emulates" :-).
No, it only imports certain attributes, not all of them. Take some
time to look at the trinidad-build project and how it works. It is
better to see than explain.
>
> While I haven't analysed this carefully, I see no reason why there
> couldn't be an extra annotation attribute:
>
> /**
> * @mfp.component emulates="javax.faces.UIData" ...
> */
> class TrinidadData .. {...}
>
> which would cause the plugin to look up the metadata for the
> javax.faces.UIData component then simply copy all the property
> definitions for that class into the metadata for the TrinidadData class.
>
> Would that satisfy the trinidad requirement?
Nope, would definitely not work. It would have to be located outside
of a Java file
-Andrew