-
Notifications
You must be signed in to change notification settings - Fork 58
Injecting in Converter/Validator requires a JSF 2.3 faces-config.xml file #4270
Comments
In |
@Quix0r You are right. If I add a JSF 2.3 faces-config.xml file, with version=2.3, the above use case works. However, I'm not looking for a quick fix, but merely to point out that a faces-config.xml file should not be required during CDI injection. |
It should indeed not be required, but this is a bug in Mojarra 2.3.2. We should fix this soon. Sorry for the inconvenience! |
@arjantijms Great! I'm just happy to help in any way I can and I will continue testing JSF 2.3. |
#4270 Removed forgotten 2.3 switch based on faces-config
@ConstantinAlin I just pushed a fix and tested it via the already existing tests in the project. It should work now, but would be good if you could double test it. Thx! |
@arjantijms Confirmed. No empty faces-config.xml required. Tested with JSF 2.3.3-SNAPSHOT build from MOJARRA_2_3X_ROLLING. |
\0/ Great that it's fixed now. It was indeed my "fault"; I forgot to update the code at one location. Sorry for all the confusion. |
* MOJARRA_2_3X_ROLLING: Let's start work for release 2.3.4-SNAPSHOT release cut 2.3.3 javaee#4270 Removed forgotten 2.3 switch based on faces-config javaee#4276 Updated pom.xml files so project compiles again with Maven
…le-in-execute-render-rolling * MOJARRA_2_3X_ROLLING: Let's start work for release 2.3.4-SNAPSHOT release cut 2.3.3 javaee#4270 Removed forgotten 2.3 switch based on faces-config javaee#4276 Updated pom.xml files so project compiles again with Maven
Injecting in Converter/Validator requires a JSF 2.3 faces-config.xml file, even if the application uses a JSF 2.3 configuration bean:
ConfigurationBean.java
As pointed by Arjan Tijms in this topic, an empty JSF 2.3 faces-config.xml file is not involved into enabling CDI injection and EL resolution using CDI and switching into a JSF 2.3 mode, thus, it should not be required when using CDI injection into Converter/Validator.
Consider the following example:
index.xhtml
PhoneNumberConverter.java
PhoneNumberValidator.java
PhonePrefixServiceBean.java
Exception thrown
Without a JSF 2.3 faces-config.xml file or with a faces-config.xml version 2.2 file, the application throws the following exception:
Testing environment:
JSF 2.3.2, Payara Server 5.0.0.174
The text was updated successfully, but these errors were encountered: