Gregory Murphy wrote:
> Ken Paulsen wrote:
>
>> Adding the @Renderer annotation to a UIComponent class works provided
>> that you use the rendererClass property as well... AND you don't have
>> a @Component annotation. The way the current annotation processor is
>> written, it doesn't support 2 annotations on a single class... or at
>> least I haven't figured out the correct syntax to get that to work.
>> I think the problem is that when you specify both annotations, the
>> first annotation annotates the 2nd annotation instead of both
>> annotating the class. Separating w/ commas didn't seem to help.
>> There's a good change I'm doing something wrong when defining the
>> annotation, though.
>
>
>
> An annotation may use another annotation as the type of one of its
> elements, but you can't annotate an annotation. I don't know enough
> about formal languages to be able to explain why this is.
>
> The current library and processor do support multiple renderer
> annotations, so that one renderer can be assigned to more than one
> component family. For example:
>
> @Renderer({
> @Renders(componentFamily="org.example.input"),
> @Renders(componentFamily="org.example.output")
> })
This is good. I didn't know this was was possible.
But what about renderer-type ?
Isn't the renderer-class bound to renderer-type, more so than
component-family ?
-rick
> public class MyFavoriteRenderer {
> }
>
> So you can use a single template renderer with a whole mess of
> components, but you have to annotate the renderer to create these
> associations, not the components. If users are getting the template
> renderer as part of a third party JAR, they could always extend it,
> and annotate the extension.
>
> // Gregory
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_woodstock.dev.java.net
> For additional commands, e-mail: dev-help_at_woodstock.dev.java.net
>