myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eduardo B <ebre...@gmail.com>
Subject Re: Issue with injection in ActionListener JSF Artifact
Date Fri, 11 Aug 2017 21:19:45 GMT
In the specs, section 5.4.1 talks about the JSF Artifacts that are eligible
for Injection.

I tried testing it on Mojarra but couldn't get it to work. I couldn't even
get to work other JSF Artifacts on Mojarra, so I'm not sure if they support
all the objects specified in section 5.4.1 or if I'm missing some kind of
configuration.

On Fri, Aug 11, 2017 at 4:57 PM, Thomas Andraschko <
andraschko.thomas@gmail.com> wrote:

> Not sure.
> Does it work in Mojarra or did you check the specs?
>
> 2017-08-11 22:44 GMT+02:00 Eduardo B <ebreijo@gmail.com>:
>
>> I have encountered an issue with injection on a JSF Artifact. The
>> scenario is as follows:
>>
>> When a class implements ActionListener, and that action listener is
>> invoked from a facelet as the snippet below:
>>
>> <h:form >
>>
>>     <h:commandButton value="ActionListener" action="#{bb.action()}">
>>
>>         <f:actionListener type="com.ibm.ws.jsf.listener.TestActionListener"
>> />
>>
>>     </h:commandButton>
>>
>> </h:form>
>>
>> The behavior I’m seeing is that we cannot do @Inject on the class that
>> implements the ActionListener, and @PreDestroy is not being invoked on app
>> shut down. However, if we register the action listener in the
>> faces-config.xml, I can see that injection is possible.
>>
>> Is Injection from a facelet for an ActionListener needs to be supported?
>>
>>
>> Regards,
>>
>> Eduardo M. Breijo-Baullosa
>>
>
>

Mime
View raw message