myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Myfaces Wiki] Update of "MyfacesBuilderPlugin" by SimonKitching
Date Tue, 18 Mar 2008 16:24:40 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by SimonKitching:
http://wiki.apache.org/myfaces/MyfacesBuilderPlugin

The comment on the change is:
update annotation examples

------------------------------------------------------------------------------
  
  In short, the objectives of this plugin are:
  
-  * Generate component classes
   * Generate tag classes
   * Generate faces-config.xml file
   * Generate .tld file
+  * Generate facelets-taglib.xml file
+  * Generate component classes (optional)
  
  The previous work and thought about this topic can be found here:
  
@@ -29, +30 @@

  
  === Metadata generation ===
  
-  * Use qdox to generate the model and save it on a xml file in a neutral way using Commons
Betwixt.
+  * Use qdox to generate the model and save it to an xml file in a neutral way.
-  * Posibility of construct a model from several metadata files (tomahawk or sandbox), scanning
all dependencies for myfaces-metadata.xml
+  * Possibility to construct a model from several metadata files (tomahawk or sandbox), scanning
all dependencies for myfaces-metadata.xml
   * There is one special case with tomahawk. Tomahawk contains its own tag class hierarchy
copied from myfaces core. So it's necessary to define a mechanism to generate this hierarchy
(Maybe it's better an option of a mojo or a specific mojo for do that).
   * The component should follow a convention similar to this:
  
@@ -39, +40 @@

  package org.apache.myfaces.component;
  
  /**
+  * Brief desc of component (goes into tld brief desc).
+  *
+  * More desc of component (goes into tld long desc). And some more desc. Whatever.
+  *
   * @mfp.component 
-  *   class = "org.apache.myfaces.component.Component" (the default is this class)
+  *   class = "org.apache.myfaces.component.Component" (optional; the default is this class)
-  *   superClass = "org.apache.myfaces.component.ComponentParent" (the default is javax.faces.component.UIComponentBase)
+  *   superClass = "org.apache.myfaces.component.ComponentParent" (optional; default is parent
class)
   *   type = "org.apache.myfaces.Component" 
   *   supertype = "org.apache.myfaces.ComponentParent" (the default is javax.faces.ComponentBase)
   *   family = "org.apache.myfaces.Component"
   *   rendererType = "org.apache.myfaces.Component"
-  *   desc="tabular data" // Brief description of this component, for tool-tips etc.
-  *    tagClass = "org.apache.myfaces.component.ComponentTag" //Required for generation
+  *   tagClass = "org.apache.myfaces.component.ComponentTag" //Required for generation
-  *    tagSuperClass = "javax.faces.webapp.UIComponentTag" //default is parent by type tagClass.
+  *   tagSuperClass = "javax.faces.webapp.UIComponentTag" //default is parent by type tagClass.
  **/
  public class Component extends ComponentParent {
  
  
    /**
+    * The Foo property does something (short desc).
+    *
+    * An example of declaring a property using a non-abstract method.
+    * Of course, there will normally be a concrete getter method too.
+    *
     * @mfp.property
+    *   jspName = "foo" (optional; by default derived from method name)
-    *   jspName = "property"
-    *   isEnum = "false" //FOR ENUMS
-    *   propertyValues = null //FOR ENUMS
+    *   propertyValues = null //FOR ENUMS (optional)
     *   rtexprvalue = "false" //Used on 1.1 only
     *   tagAttributeExcluded = "true"
     *   literalOnly = "false"
@@ -65, +73 @@

     *   transient = "false"
     *   
    **/
-    public void setProperty(String property){
+    public void setFoo(String foo) {
-      _property = property;
+      _foo = foo;
     }
  
+   /**
+    * The Bar property does something (short desc).
+    *
+    * An example of declaring a property using an abstract method; presumably
+    * a concrete component subclass will be generated by the plugin, and that
+    * will define the real implementation of this method (and the matching
+    * setter).
+    *
+    * @mfp.property
+    *   jspName = "bar" (optional; by default derived from method name)
+    *   propertyValues = null //FOR ENUMS (optional)
+    *   rtexprvalue = "false" //Used on 1.1 only
+    *   tagAttributeExcluded = "true"
+    *   literalOnly = "false"
+    *   required = "false" //Used on tld only
+    *   transient = "false"
+    *   
+    **/
+    public abstract String getBar();
  
-   /** //Only used where there is generated class, so generated properties
+   /**
+    * Don't know what this is demonstrating...Leonardo?
+    * 
+    * Notes:
+    * <ul>
+    * <li>The scope of isSetProperty, getLocalProperty and isLocalProperty is the scope
of
+    * the abstract method that requires.
+    * <li>the inner property is isGetLocalMethodScope and isSetMethodScope
+    * </ul>
+    *
     * @mfp.property
     *   name = "property" 
-    *   fieldName = "property"
+    *   fieldName = "baz"
     *   class = "java.lang.String"
     *   isSetFieldMethod = "false" //Create method isSetProperty
     *   isGetLocalMethod = "false" //Create method getLocalProperty or isLocalProperty
     *   stateHolder = "false"
     *   defaultValue = ""
-    *
-    *   //The scope of isSetProperty, getLocalProperty and isLocalProperty is the scope of
the abstract method that requires
-    *   //the inner property is isGetLocalMethodScope and isSetMethodScope
     **/
+    public abstract String getBaz();
  
+   /**
-   /** //Sometimes this should be used for exclude one unwanted inherited property from the
tld.
+    * Sometimes this should be used for exclude one unwanted inherited property from the
tld.
-    *  //The exclusion only works for the class where is defined.
+    * The exclusion only works for the class where is defined.
+    * 
+    * TODO: Leonardo, please clarify what this is for...
+    *
     * @mfp.property
     *   name = "parentProperty1"
     *   exclude = "true"
     **/
+    public abstract String getBlah();
  
-   /** //Sometimes this should be used for override documentation
+   /**
+    * Override the documentation for this property which was inherited from the
+    * definition on an ancestor class.
     * <p>
     * This property is used here for ..... 
     * </p>
     * 
     * @mfp.property
-    *   name = "parentProperty2"
-    *   desc = "This property is used here for ..... "
     **/
+   public abstract Object getValue();
  
  }
  

Mime
View raw message