You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2007/01/17 21:11:07 UTC

svn commit: r497149 - in /myfaces/tobago/trunk: core/src/main/java/org/apache/myfaces/tobago/taglib/component/ tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/

Author: bommel
Date: Wed Jan 17 12:11:06 2007
New Revision: 497149

URL: http://svn.apache.org/viewvc?view=rev&rev=497149
Log:
added a description for facets

Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTagDeclaration.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PageTagDeclaration.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTagDeclaration.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ProgressTagDeclaration.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTagDeclaration.java
    myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTagDeclaration.java?view=diff&rev=497149&r1=497148&r2=497149
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTagDeclaration.java Wed Jan 17 12:11:06 2007
@@ -21,6 +21,7 @@
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
 import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.Facet;
 import org.apache.myfaces.tobago.taglib.decl.HasDeprecatedDimension;
 import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
 import org.apache.myfaces.tobago.taglib.decl.HasLabel;
@@ -31,7 +32,10 @@
 @Tag(name = "box")
 @UIComponentTag(
     uiComponent = "org.apache.myfaces.tobago.component.UIBox",
-    rendererType = "Box")
+    rendererType = "Box",
+    facets = {
+    @Facet( name="toolBar", description = "Contains a instance of UIToolBar"),
+    @Facet( name="layout", description = "Contains a instance of UILayout")})
 
 public interface BoxTagDeclaration extends TobagoBodyTagDeclaration,
     HasIdBindingAndRendered, HasDeprecatedDimension, HasLabel {

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PageTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PageTagDeclaration.java?view=diff&rev=497149&r1=497148&r2=497149
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PageTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PageTagDeclaration.java Wed Jan 17 12:11:06 2007
@@ -42,8 +42,9 @@
     uiComponent = "org.apache.myfaces.tobago.component.UIPage",
     rendererType = "Page",
     facets =
-        { @Facet(name = "action", description ="An UICommand (tc:command)"),
-        @Facet(name = "menuBar", description = "Menubar")})
+        { @Facet(name = "action", description ="Contains a instance of UICommand (tc:command) for an auto-action"),
+        @Facet(name = "menuBar", description = "Menubar"),
+        @Facet( name="layout", description = "Contains a instance of UILayout")})
 
 public interface PageTagDeclaration extends TobagoBodyTagDeclaration, HasLabel, HasId, HasDimension, HasBinding,
     HasState {

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTagDeclaration.java?view=diff&rev=497149&r1=497148&r2=497149
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTagDeclaration.java Wed Jan 17 12:11:06 2007
@@ -19,6 +19,7 @@
 
 import org.apache.myfaces.tobago.apt.annotation.Tag;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.apt.annotation.Facet;
 import org.apache.myfaces.tobago.taglib.decl.HasDeprecatedDimension;
 import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
 
@@ -35,7 +36,10 @@
 @Tag(name = "panel")
 @UIComponentTag(
     uiComponent = "org.apache.myfaces.tobago.component.UIPanel",
-    rendererType = "Panel")
+    rendererType = "Panel",
+    facets = {
+    @Facet( name="reload", description = "Contains a instance of UIReload"),
+    @Facet( name="layout", description = "Contains a instance of UILayout")})
 public interface PanelTagDeclaration extends TobagoBodyTagDeclaration,
     HasIdBindingAndRendered, HasDeprecatedDimension {
 }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ProgressTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ProgressTagDeclaration.java?view=diff&rev=497149&r1=497148&r2=497149
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ProgressTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ProgressTagDeclaration.java Wed Jan 17 12:11:06 2007
@@ -21,6 +21,7 @@
 import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.Facet;
 import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
 import org.apache.myfaces.tobago.taglib.decl.HasTip;
 
@@ -35,7 +36,9 @@
 @Tag(name = "progress")
 @UIComponentTag(
     uiComponent = "javax.faces.component.UIOutput",
-    rendererType = "Progress", isComponentAlreadyDefined = true)
+    rendererType = "Progress", isComponentAlreadyDefined = true,
+    facets = {@Facet( name="complete",
+        description = "Contains a instance of UICommand (tc:command). The action is invoked if the full progress has reached")})
 public interface ProgressTagDeclaration extends BeanTagDeclaration, HasIdBindingAndRendered, HasTip {
 
   /**

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTagDeclaration.java?view=diff&rev=497149&r1=497148&r2=497149
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTagDeclaration.java Wed Jan 17 12:11:06 2007
@@ -23,6 +23,7 @@
 import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.Facet;
 import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
 import org.apache.myfaces.tobago.component.UIData;
 
@@ -40,7 +41,8 @@
 @BodyContentDescription(anyTagOf = "<tc:column>* <tc:columnSelector>?")
 @UIComponentTag(
     uiComponent = "org.apache.myfaces.tobago.component.UIData",
-    rendererType = "Sheet")
+    rendererType = "Sheet",
+    facets = {@Facet( name="reload", description = "Contains a instance of UIReload")})
 
 public interface SheetTagDeclaration extends TobagoTagDeclaration, HasIdBindingAndRendered {
   /**

Modified: myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java?view=diff&rev=497149&r1=497148&r2=497149
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java (original)
+++ myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java Wed Jan 17 12:11:06 2007
@@ -33,6 +33,7 @@
 import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
 import org.apache.myfaces.tobago.apt.annotation.Taglib;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.apt.annotation.Facet;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -278,13 +279,23 @@
     }
     UIComponentTag componentTag = decl.getAnnotation(UIComponentTag.class);
     if (componentTag != null) {
-
       description.append("<p>UIComponentClass: ");
       description.append(componentTag.uiComponent());
       description.append("</p><p>");
       description.append(" RendererType: ");
       description.append(componentTag.rendererType());
       description.append("</p>");
+      Facet[] facets = componentTag.facets();
+      if (facets.length > 0) {
+        description.append("<p>Supports following facets:</p>");
+        for (Facet facet: facets) {
+          description.append("<p>Name: ");
+          description.append(facet.name());
+          description.append(" Description: ");
+          description.append(facet.description());
+          description.append("</p>");
+        }
+      }
     }
     if (description.length() > 0) {
       addLeafCDATAElement(description.toString(), "description", element, document);