Hi

I have applied component generation for tomahawk core and sandbox and tested
it exhaustively (with generated myfaces core 1.1), so I can say finally that
this feature is ready for apply the changes on myfaces core 1.1 trunk,
tomahawk trunk, and myfaces build tools trunk.

This issue was already voted positively (for core 1.1 and tomahawk), so this
mail is just for inform the community about the changes we want to
implement. The branch where the community can see the work is here:

http://svn.apache.org/repos/asf/myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk_trunk/

The guidelines for generate on tomahawk are the following:

1. Each component has as minimum one public abstract class. In this class
there is defined all properties to be generated and is included in the
component hierarchy (on myfaces core 1.1 this is not possible, so a template
mechanism using a packaged scope abstract class is used). The abstract class
is always plugin for avoid an error present when using reflection on boolean
properties (myfaces and jsf ri uses it for set properties). This does not
have side effects. As suggested on previous discussion, this pollute the api
but it's a low price and use abstract pattern is more clear for users.

2. faces-config and .tld are generated. facelets-taglib.xml is still not
generated, but could be easily done in the near future.

3. Converter, Validators and other tags are just annotated to be included on
the tld, but there are not generated right now.

4. Some inherited properties are included on the components but others are
excluded using the mechanisms described on the wiki. One example can be seen
here:

/**
 * Adds (java)script to the browser
 *
 * @JSFComponent
 *   name = "s:script"
 *   class = "org.apache.myfaces.custom.script.Script"
 *   superClass = "org.apache.myfaces.custom.script.AbstractScript"
 *   tagClass = "org.apache.myfaces.custom.script.ScriptTag"
 *
 * @JSFJspProperty name="value" tagExcluded = "true"
 * @JSFJspProperty name="converter" tagExcluded = "true"
 *
*/
public abstract class AbstractScript extends UIOutput {

The idea in the near future is create a core12 module for tomahawk and
sandbox, and use the plugin to generate 1.2 code.

I'll start to commit this right now, but the changes for tomahawk are
planned to apply this weekend, to give some time for suggestions and
critics. This is a community process so the code finally committed should be
the general consensus.

Suggestions are welcome.

regards

Leonardo Uribe

Reply via email to