myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1794903 - /myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java
Date Thu, 11 May 2017 23:43:23 GMT
Author: lu4242
Date: Thu May 11 23:43:23 2017
New Revision: 1794903

URL: http://svn.apache.org/viewvc?rev=1794903&view=rev
Log:
MYFACES-4117 No default name for @FacesComponent with createTag=true and no tagName

Modified:
    myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java

Modified: myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java?rev=1794903&r1=1794902&r2=1794903&view=diff
==============================================================================
--- myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java
(original)
+++ myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java
Thu May 11 23:43:23 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));
                     }
                 }
             }



Mime
View raw message