Hi Simon

The cases (a) and (b) are used on tomahawk, (b) seems like an abstract
pattern (all classes implementing b on tomahawk starts with AbstractXXXX).

The cases (a) and (c) are used on myfaces core.

One example of (b) is this:

/*
 * @JSFComponent
 *   name = "t:checkbox"
 *   class = "org.apache.myfaces.custom.checkbox.HtmlCheckbox"
 *   superClass = "org.apache.myfaces.custom.checkbox.AbstractHtmlCheckbox"
 *   tagClass = "org.apache.myfaces.custom.checkbox.HtmlCheckboxTag"
 */
public abstract class AbstractHtmlCheckbox
    extends UIComponentBase implements UserRoleAware
{
}

Please look that the superclass is the hand written class. The attribute
class (or clazz on annotations) refers the class to be generated. This
plugin checks on the paths defined by the user (max 2 default src/main/java)
if the file exists. If this is true, then not generate, if is true generate.

regards

Leonardo Uribe

On Sat, May 31, 2008 at 2:43 PM, simon <[EMAIL PROTECTED]> wrote:

> Hi Leonardo,
>
> I'm working on improving the documentation for the builder plugin.
>
> AUIA, there were planned to be three modes for defining a component:
> (a) hand-writing a component class
> (b) auto-generating a subclass of a hand-written class
> (c) auto-generating a class that used a hand-written class as a
> "template".
>
> For implementing myfaces-core, (c) is needed as we all agreed that we
> cannot use a package-scoped parent, and the TCK forbids a public parent.
>
> I see that the annotations on the classes in myfaces-core-1.1.x look
> like this:
>  * @JSFComponent
>  *   name = "h:graphicImage"
>  *   class = "javax.faces.component.html.HtmlGraphicImage"
>  *   tagClass = "org.apache.myfaces.taglib.html.HtmlGraphicImageTag"
>  *   desc = "h:graphicImage"
>
> So clearly this set of attributes is triggering mode (c):
> "template-based generation".
>
> How can (b) be triggered?
>
> Regards,
> Simon
>
>

Reply via email to