[jsr-314-open-mirror] [jsr-314-open] composite components: targets attribute revisited

Andy Schwartz andy.schwartz at oracle.com
Tue Nov 2 10:24:03 EDT 2010


On 11/2/10 3:03 AM, Martin Marinschek wrote:
> - I think that all of us should carefully think about David's
> proposition to have only one tag which defines a component as the
> interface implementation.

I agree that we should consider this as well.  (And, thanks for the 
clarifications David - I understand where you are coming from now.)

I am okay with a single tag, though would like to hear from the 
implementation guys as to whether this poses any problems for them.

One question I was wondering about is whether the names that are defined 
in the composite:interface section (eg. via the "name" attribute on 
various tags) are required to be unique within the composite component, 
or whether the name space is partitioned by type.

> Also the names he suggested seem reasonable to me.
>   

Names that we've seen so far in this thread:

- <composite:implements>
- <composite:exposes>
- <composite:references>
- <composite:refersTo>

Another name that keeps popping up in my head is:

- <composite:bind>

I like the idea that we are binding the implementation component to a 
piece of interface metadata via the name that they both reference.  Of 
course, there is possible confusion with the "binding" attribute, though 
even so I like the sound of this:

<composite:interface>
  <composite:actionSource name="loginEvent"/>
</composite:interface>

<composite:implementation>
  <h:commandButton>
    <composite:bind name="loginEvent"/>
  </h:commandButton>
</composite:implementation>

My take is that the context is sufficiently different from the "binding" 
use case that user should not have trouble distinguishing between these 
two.  This name also has the benefit that it is short and sweet: single 
syllable FTW! :-)

Thoughts?  Any other suggestions?

Andy



More information about the jsr-314-open-mirror mailing list