You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2017/05/11 23:45:08 UTC
svn commit: r1794904 -
/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java
Author: lu4242
Date: Thu May 11 23:45:08 2017
New Revision: 1794904
URL: http://svn.apache.org/viewvc?rev=1794904&view=rev
Log:
MYFACES-4117 No default name for @FacesComponent with createTag=true and no tagName
Modified:
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java?rev=1794904&r1=1794903&r2=1794904&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java Thu May 11 23:45:08 2017
@@ -131,9 +131,19 @@ public class AnnotationConfigurator
if (comp.createTag())
{
+ String tagName = comp.tagName();
+ if (tagName != null && tagName.length() > 0)
+ {
+ //Ok
+ }
+ else
+ {
+ tagName = clazz.getSimpleName();
+ tagName = Character.toLowerCase(tagName.charAt(0)) + tagName.substring(1);
+ }
facesConfig.addComponentTagDeclaration(value,
new ComponentTagDeclarationImpl(value,
- comp.namespace(), comp.tagName()));
+ comp.namespace(), tagName));
}
}
}