Skip to content

Commit

Permalink
https://github.com/jakartaee/faces/issues/1819
Browse files Browse the repository at this point in the history
Register UUIDConverter
  • Loading branch information
BalusC committed Jun 18, 2023
1 parent b9ed50b commit cdbb93c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public class InstanceFactory {
}

private final String[] STANDARD_BY_TYPE_CONVERTER_CLASSES = { "java.math.BigDecimal", "java.lang.Boolean", "java.lang.Byte", "java.lang.Character",
"java.lang.Double", "java.lang.Float", "java.lang.Integer", "java.lang.Long", "java.lang.Short", "java.lang.Enum" };
"java.lang.Double", "java.lang.Float", "java.lang.Integer", "java.lang.Long", "java.lang.Short", "java.lang.Enum", "java.util.UUID" };

private Map<Class<?>, Object> converterTypeMap;
private boolean registerPropertyEditors;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,20 @@ public void populateApplicationConfiguration(Document toPopulate) {
}
faces_configElement.appendChild(converterElement);
}
{
Element converterElement = toPopulate.createElementNS(ns, "converter");
{
Element converter_for_classElement = toPopulate.createElementNS(ns, "converter-for-class");
converter_for_classElement.appendChild(toPopulate.createTextNode("java.util.UUID"));
converterElement.appendChild(converter_for_classElement);
}
{
Element converter_classElement = toPopulate.createElementNS(ns, "converter-class");
converter_classElement.appendChild(toPopulate.createTextNode("jakarta.faces.convert.UUIDConverter"));
converterElement.appendChild(converter_classElement);
}
faces_configElement.appendChild(converterElement);
}
{
Element lifecycleElement = toPopulate.createElementNS(ns, "lifecycle");
{
Expand Down

0 comments on commit cdbb93c

Please sign in to comment.