Hi

2010/10/27 Jakob Korherr <jakob.korherr@gmail.com>
Hi,

Just as an example of how badly we need #{cc.attrs.action} or
#{cc.attrs.actionListener} to work in JSF 2.1, here is a mail from the
myfaces-user-list from today (some parts are cut for clarity):

For example imagine a simple component that uses a commandLink and has two
attributes: "action" and "actionListener":

<cc:interface>
 <cc:attribute name="action" method-signature="java.lang.String action()"
default="???" />
 <cc:attribute name="actionListener" method-signature="void
actionListener(javax.faces.event.ActionEvent)" default="???" />
</cc:interface>

<cc:implementation>
 <tr:commandLink action="#{cc.attrs.action}"
actionListener="#{cc.attrs.actionListener}" />
</cc:implementation>

---> The users really expect this to work! Frankly I also do and I
guess everyone else agrees.

I agree with you, just note as it was mentioned before we still need to do something
to allow multiple action attributes for a single composite component, as reported here:

https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=859

The idea of introduce cc:attribute "targetName" sounds good. In theory with this attribute
we don't need add method-signature, because it can be inferred from the value of targetName.
In the example posted by me, since the attribute name is "action", the method-signature
is not required.

regards,

Leonardo Uribe