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

Jakob Korherr jakob.korherr at gmail.com
Thu Nov 4 07:34:24 EDT 2010


Hi guys,

I also kinda like the idea of having only one tag. For the
implementation, this will most certainly be no problem, because this
would only mean removing an instanceof check in my prototype-patch on
the spec issue 901 and it should work.

However I don't know if this will be a problem for our users, because
of the naming problems mentioned by Andy. I see two possible problems:

1) it may confuse some users, because they don't know for which
interface-tags this tag applies (actionSource, editableValueHolder,
valueHolder are clear - but also clientBehavior, facet??)
2) we forbid the following scenario:

<cc:interface>
    <cc:actionSource name="event" />
    <cc:valueHolder name="event" />
</cc:interface>
<cc:implementation>
    <h:inputText value="..">
        <cc:references source="event" />
    </h:inputText>
    <h:commandButton>
        <cc:references source="event" />
    </h:commandButton>
</cc:implementation>

In a few words: using the same name for valueHolder as for
actionSource. Actually I really don't know if this would make much
sense, but I guess some users would definitely wanna use it and will
fail here.

Thus in my personal opinion it is still better to have multiple tags
for actionSource, editableValueHolder and valueHolder (and also facet
and clientBehavior), because it separates the duties more clearly.

@David:
>Is it just possible to do this with component ids, and forgo the extra tag altogether?
>
><composite:interface>
>  <composite:actionSource name="loginButton"/>
> </composite:interface>
>
> <composite:implementation>
>  <h:commandButton id="loginButton">
>  </h:commandButton>
> </composite:implementation>

Actually, this is already possible in JSF 2.0, but - as Andy pointed
out earlier - it packs a lot of information into the name attribute
and furthermore you can't apply the same actionSource (or valueHolder
or..) multiple times.

In the meantime I got the following mail from Hanspeter Dünnenberger
from Credit Suisse:

>I think a <cc:wireActionSource name="myActionSource" /> would be a nice name to wire or link the implementation to the interface definition.

Yes, this is also a good name for the tag!

To wrap this up again, we have had the following ideas for tag names already:

- cc:insertXXX
- cc:implementsXXX
- cc:exposesXXX
- cc:referencesXXX
- cc:refersToXXX
- cc:bindXXX
- cc:wireXXX

I still like "implements" best, but I guess every tag of the above
will do the job.

Regards,
Jakob

2010/11/4 Matthias Wessendorf <matzew at apache.org>:
> Hey Hey Martin,
>
> congrats to the lovely couple!
>
> -Matthias
>
> On Thu, Nov 4, 2010 at 9:49 AM, Martin Marinschek
> <mmarinschek at apache.org> wrote:
>> Hi guys,
>>
>> yes, wedding bells. Thank you!
>>
>> best regards,
>>
>> Martin
>>
>> On 11/3/10, Andy Schwartz <andy.schwartz at oracle.com> wrote:
>>> On 11/3/10 3:18 PM, David Geary wrote:
>>>> 2010/11/2 Martin Marinschek <mmarinschek at apache.org
>>>> <mailto:mmarinschek at apache.org>>
>>>>
>>>>     Hi guys,
>>>>
>>>>     after a long weekend (and my marriage ;) ...
>>>>
>>>>
>>>> Congratulations, Martin! (I trust things are still going well :)
>>>
>>> Oh, hey... I just assumed that Martin meant that his marriage needed
>>> some attention after a long week of work. ;-)  Wedding bells?  If so,
>>> congratulations!!!
>>>
>>> Andy
>>>
>>>>
>>>>
>>>> david
>>>
>>>
>>
>>
>> --
>>
>> http://www.irian.at
>>
>> Your JSF powerhouse -
>> JSF Consulting, Development and
>> Courses in English and German
>>
>> Professional Support for Apache MyFaces
>>
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>



-- 
Jakob Korherr

blog: http://www.jakobk.com
twitter: http://twitter.com/jakobkorherr
work: http://www.irian.at




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