Hi

 After doing component generation for myfaces 1.1 and tomahawk 1.1, one of
my objectives is tomahawk 1.2.

The idea for reach this objective is this:

1. Generate a myfaces-metadata.xml for myfaces 1.2 (my first attempt was use
annotations and generate it using myfaces-faces-plugin)
2. Create a core12 module for tomahawk and sandbox
3. Use the unpack goal of myfaces-builder-plugin to move tomahawk 1.1 code
that does not change. In this way we avoid two trunks problem that has
trinidad (if you made a change, you should commit on both branches).

The work is very, very close to be completed and put into vote (all examples
works), but still I have a problem.

On myfaces core 1.2 it is usual that some properties should be excluded from
the tld, so some inherited components should not have this properties on his
tld too.

One example is this:

@JSFComponent
(clazz="javax.faces.component.UIViewRoot",
name="f:view")
@JSFJspProperties
(properties={
        @JSFJspProperty(name="id",tagExcluded=true),
        @JSFJspProperty(name="binding",tagExcluded=true),
        @JSFJspProperty(name="rendered",tagExcluded=true)
        })
abstract class _UIViewRoot extends UIComponentBase

The previous myfaces-faces-plugin does not have a way to address this, so my
personal conclusion is that if we want tomahawk 1.2, we should convert
myfaces 1.2 to the new plugin, so myfaces-metadata.xml is generated in
proper way.

The problem in few words is simple: I don't like to generate components
inside javax.faces.component package (Components starting with UIXXX). This
components has very few properties and a lot of custom code (this is the
only part where template mechanism of myfaces-faces-plugin is used
(excluding trinidad)). In myfaces core 1.1 the solution was just annotate
this classes, and do not use generation on this part.

The new template pattern on myfaces-builder-plugin has a drawback: do not
resolve imports automatically. The only part where this is used is on
myfaces core 1.1 class _HtmlDataTable, and the code was modified to avoid
any additional import.

In conclusion, the available approaches are this:

1. Just copy and paste the generated code on javax.faces.component and
annotate it correctly, then apply myfaces-builder-plugin normally.
2. Add a property to @JSFComponent called "importList", that could have a
list of imports to be added on the generated component.

If no suggestions, I will implement solution 1.

Suggestions are welcome

regards

Leonardo Uribe

Reply via email to