Hi Ed,
Am 19.09.2012 um 04:30 schrieb Edward Burns <edward.burns_at_oracle.com>:
>>>>>> On Mon, 17 Sep 2012 10:23:52 +0200, Frank Caputo <frank_at_frankcaputo.de> said:
>
> [... please prune appropriately before replying ...]
I wanted to have it all together.
> FC> Can we have it implement ActionSource2 to make it also act like an
> FC> action component (e.g. for the button tag) and handle it differently
> FC> depending on the attributes (jsf:action or jsf:value)?
>
> Sure, we can do that. But I need to understand that you want this to
> replace what you already have in the Mapper. You already have an entry
> that maps "button" to "h:commandButton". Are you saying we should get
> rid of that in favor of your new suggestion?
The button mapping relies on the overriding of the element name. If we don't support it, we need another solution.
> I suggest we create a new element jsf:commandElement with component-type
> javax.faces.Command and renderer-type javax.faces.passthrough.Command.
> I suggest that if none of the existing mappings match, we look for the
> action or value attribute to determine if we should map it to
> jsf:element or jsf:commandElement.
This is more future safe than my solution, because mine doesn't support new command elements out of the box.
But I still think overriding the element name is a nice feature.
Ciao Frank