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 LeonardoUribe
Date Sun, 16 Mar 2008 20:42:49 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 LeonardoUribe:
http://wiki.apache.org/myfaces/MyfacesBuilderPlugin

------------------------------------------------------------------------------
  = Myfaces Builder Plugin =
  
- The objective of this plugin is:
+ In short, the objectives of this plugin are:
  
   * Generate component classes
   * Generate tag classes
   * Generate faces-config.xml file
   * Generate .tld file
  
- The guidelines for achieving the objectives are:
+ The previous work and thought about this topic can be found here:
  
+ [http://wiki.apache.org/myfaces/Code_Generation Code Generation]
-  * Use annotations on the javadoc (use Qdox for read this data) 
-  * java15 annotations are not used because
-   a. we want to support 1.4
-   b. java15 compile-retention annotations are not nice to work with
-   c. we explicitly want the javadoc comments
  
+ The main guidelines for achieving the objectives are:
+ 
+  1. Use annotations on the javadoc (use Qdox for read this data).
+  2. java15 annotations are not used because
+ {{{
+    a. we want to support 1.4.
+    b. java15 compile-retention annotations are not nice to work with.
+    c. we explicitly want the javadoc comments.
+ }}}
+  3. Use a template tool like velocity to generate the files.
+  4. Simplify the code based on myfaces-faces-plugin.
+ 
+ == Guidelines and relevant points per module ==
+ 
+ === Metadata generation ===
+ 
+  * Use qdox to generate the model and save it on a xml file in a neutral way using Commons
Betwixt.
+  * The component should follow a convention similar to this:
+ 
+ {{{
+ 
+ package org.apache.myfaces.component;
+ 
+ /**
+  * @mfp.component 
+  *   class = "org.apache.myfaces.component.Component"
+  *   superclass = "org.apache.myfaces.component.ComponentParent"
+  *   type = "org.apache.myfaces.Component"
+  *   supertype = "org.apache.myfaces.ComponentParent"
+  *   family = "javax.faces.Data"
+  *   defaultRendererType = "javax.faces.Table"
+  *   desc="tabular data"
+ **/
+ public class Component extends ComponentParent {
+ 
+ 
+ }
+ 
+ }}}
+ 
+ 
+ === Component class generation ===
+ 
+  * There are three possible scenarios for component generation:
+ 
+  1. Annotated class is the same component file:
+ 
+ No component code is generated. All methods are created manually. The annotations are used
in generation of other classes.
+ 
+ {{{
+ 
+ }}}
+ 
+  2. Annotated class is an abstract class, generation of a child component class:
+ 
+ One child class are generated based on the annotations of the parent (getter, setter, save
and restore).
+ 
+ {{{
+ 
+ }}}
+ 
+  3. Annotated class is a private class that is used as template (never instantiated, just
the code is copied inside the generated class)
+ 
+ {{{
+ 
+ }}}
+ 
+ === Component tag generation ===
+ 
+ === faces-config.xml generation ===
+ 
+ === .tld generation ===
+ 

Mime
View raw message