You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2007/12/19 10:37:58 UTC

svn commit: r605483 - /myfaces/trinidad-maven/trunk/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/MyFacesComponentTagGenerator.java

Author: matzew
Date: Wed Dec 19 01:37:58 2007
New Revision: 605483

URL: http://svn.apache.org/viewvc?rev=605483&view=rev
Log:
MYFACES-1790 
overriding writeGetComponentType, to check for HtmlColumn
(only in the MyFaces Tag Generator)

Modified:
    myfaces/trinidad-maven/trunk/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/MyFacesComponentTagGenerator.java

Modified: myfaces/trinidad-maven/trunk/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/MyFacesComponentTagGenerator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/trunk/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/MyFacesComponentTagGenerator.java?rev=605483&r1=605482&r2=605483&view=diff
==============================================================================
--- myfaces/trinidad-maven/trunk/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/MyFacesComponentTagGenerator.java (original)
+++ myfaces/trinidad-maven/trunk/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/MyFacesComponentTagGenerator.java Wed Dec 19 01:37:58 2007
@@ -150,6 +150,26 @@
     out.println("}");
   }
 
+  public void writeGetComponentType(PrettyWriter out,
+                                    ComponentBean component) throws IOException
+  {
+    String componentType = component.getComponentType();
+    if("javax.faces.HtmlColumn".equals(componentType))
+    {
+      componentType = "javax.faces.Column";
+    }
+    out.println();
+
+    // The superclass does not necessarily need to have this method
+    out.println("@Override");
+    out.println("public String getComponentType()");
+    out.println("{");
+    out.indent();
+    out.println("return \"" + componentType + "\";");
+    out.unindent();
+    out.println("}");
+  }
+
   public void writeSetPropertiesMethod(PrettyWriter out,
                                        String componentClass,
                                        ComponentBean component) throws IOException