You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 5, 2023. It is now read-only.
Trying to achieve the same effect with the @FacesConverter annotation does not work:
@FacesConverter(value="com.corejsf.CreditCardId", forClass=CreditCard.class)
public class CreditCardConverter...
The javadoc for FacesConverter accurately tell that only
Application.addConverter(java.lang.String,java.lang.String) is invoked in this
case. But this is not desirable. There is no reason not to call
Application.addConverter(java.lang.Class,java.lang.String) in addition to the
first call--they have entirely different purposes.
In particular, this makes it impossible to implement a custom converter tag that
is also an automatic converter with just using annotations.
The behavior ought to be changed to "The implementation must guarantee that for
each class annotated with FacesConverter, found with the algorithm in section
JSF.11.5, the proper variants of Application.addConverter() are called. If
converter-id is not the empty string,
Application.addConverter(java.lang.String,java.lang.String) is called, passing
the derived converter-id as the first argument and the derived converter-class
as the second argument. If forClass is not java.lang.Object.class,
Application.addConverter(java.lang.Class,java.lang.String) is called, passing
the converter-for-class as the first argument and the derived converter-class as
the second argument. The implementation must guarantee that all such calls to
addConverter() happen during application startup time and before any requests
are serviced."