[jsr-314-open-mirror] [jsr-314-open] [755-cc:attributesSpecialKeys]

Leonardo Uribe lu4242 at gmail.com
Wed Oct 27 12:20:43 EDT 2010


Hi

2010/10/27 Ganesh <ganesh at 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=755include 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jsr-314-open-mirror/attachments/20101027/46eeadd7/attachment-0002.html 


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