incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r499584 - /incubator/adffaces/branches/faces-1_2-070102/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java
Date Wed, 24 Jan 2007 21:58:15 GMT
Author: awiner
Date: Wed Jan 24 13:58:14 2007
New Revision: 499584

URL: http://svn.apache.org/viewvc?view=rev&rev=499584
Log:
Improve JSP 2.1 validity:
- <body-content> is no longer optional
- <description> goes at the top of tags (was wrong for validators)

Modified:
    incubator/adffaces/branches/faces-1_2-070102/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java

Modified: incubator/adffaces/branches/faces-1_2-070102/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070102/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java?view=diff&rev=499584&r1=499583&r2=499584
==============================================================================
--- incubator/adffaces/branches/faces-1_2-070102/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java
(original)
+++ incubator/adffaces/branches/faces-1_2-070102/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java
Wed Jan 24 13:58:14 2007
@@ -56,7 +56,6 @@
    */
   public void execute() throws MojoExecutionException
   {
-    System.out.println("TRINIDAD, is12(): "  + is12());
     try
     {
       processIndex(project, resourcePath);
@@ -352,6 +351,15 @@
     stream.writeCharacters(component.getTagClass());
     stream.writeEndElement();
 
+    // In JSP 2.1, body-content is not optional
+    if (_is12())
+    {
+      stream.writeCharacters("\n    ");
+      stream.writeStartElement("body-content");
+      stream.writeCharacters("jsp");
+      stream.writeEndElement();
+    }
+
     GenerateJspTaglibsMojo.this.writeCustomComponentTagDescriptorContent(stream, component);
 
     Iterator properties = component.properties(true);
@@ -396,6 +404,15 @@
     stream.writeCharacters(converter.getTagClass());
     stream.writeEndElement();
 
+    // In JSP 2.1, body-content is not optional
+    if (_is12())
+    {
+      stream.writeCharacters("\n    ");
+      stream.writeStartElement("body-content");
+      stream.writeCharacters("empty");
+      stream.writeEndElement();
+    }
+
     // converters need an id attribute
     writeTagAttribute(stream, "id", "the identifier for the converter", null, null);
 
@@ -549,6 +566,15 @@
   {
     stream.writeCharacters("\n  ");
     stream.writeStartElement("tag");
+
+    if (validator.getDescription() != null)
+    {
+      stream.writeCharacters("\n    ");
+      stream.writeStartElement("description");
+      stream.writeCData(validator.getDescription());
+      stream.writeEndElement();
+    }
+
     stream.writeCharacters("\n    ");
     stream.writeStartElement("name");
     stream.writeCharacters(validator.getTagName().getLocalPart());
@@ -557,11 +583,13 @@
     stream.writeStartElement("tag-class");
     stream.writeCharacters(validator.getTagClass());
     stream.writeEndElement();
-    if (validator.getDescription() != null)
+
+    // In JSP 2.1, body-content is not optional
+    if (_is12())
     {
       stream.writeCharacters("\n    ");
-      stream.writeStartElement("description");
-      stream.writeCData(validator.getDescription());
+      stream.writeStartElement("body-content");
+      stream.writeCharacters("empty");
       stream.writeEndElement();
     }
 



Mime
View raw message