Hi
2010/10/27 Ganesh <ganesh(a)j4fry.org>
LU> I agree with you, just note as it was mentioned before we
still need to
do something
LU> to allow multiple action attributes for a single composite component,
as reported here:
LU>
LU>
https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=859
LU>
LU> The idea of introduce cc:attribute "targetName" sounds good. In theory
with this attribute
LU> we don't need add method-signature, because it can be inferred from the
value of targetName.
LU> In the example posted by me, since the attribute name is "action", the
method-signature
LU> is not required.
LU>
LU> regards,
LU>
LU> Leonardo Uribe
Wouldn't your patch for
https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=7...
working with other action attribute names? E.g.
<cc:interface>
<cc:attribute name="testAction"/>
<cc:attribute name="label"/>
</cc:interface>
<cc:implementation>
<h:commandButton value="#{cc.attrs.label}"
action="#{cc.attrs.testAction}"/>
</cc:implementation>
or even
<cc:interface>
<cc:attribute name="testAction1"/>
<cc:attribute name="testAction2"/>
<cc:attribute name="label"/>
</cc:interface>
<cc:implementation>
<ez:button value="#{cc.attrs.label}"
action="#{cc.attrs.testAction1}"/>
<h:commandButton value="#{cc.attrs.label}"
action="#{cc.attrs.testAction2}"/>
</cc:implementation>
is what developers expect to work. If it's necessary for the implementation
they will accept a method-signature. I don't like te idea of introducing one
more obscure target family attribute like targetName. Instead I'd prefer to
try and make targets obsolete.
I don't think it is posible to use the previous syntax, because it is
necessary to declare in some
way that the attribute will receive a MethodExpression, otherwise a
ValueExpression will be used
and an error will be thrown. To do that we have two options:
1. use method-signature param, but extend this param to allow multiple
signature definitions.
2. use "targetName" attribute to indicate implicitly the method-signature.
I think use "targetName" attribute is better.
Suggestions are welcome.
best regards,
Leonardo Uribe
Best regards,
Ganesh