org.richfaces.cdk.annotations
Annotation Type JsfComponent


@Retention(value=SOURCE)
@Target(value=TYPE)
public @interface JsfComponent

That annotation marks class as JSF component. The difference with JSF 2.0 @ javax.faces.component.FacesComponent annotation is what this one could marks abstaract class from which a real UI-component implementation will be generated. The value of default type() attribute is taken to be component type. The fully qualified class name becomes a component class unless that class is abstract or final component class is defined by the generate() attribute value.

Author:
asmirnov@exadel.com

Optional Element Summary
 java.lang.String[] attributes
          

defines fragments of faces-config.xml that contain standard attribute definitions.

 RendererSpecificComponent[] components
          

 Description description
          

Description used by IDE.

 Facet[] facets
          

Component facets.

 java.lang.String family
          

Component famili.

 java.lang.Class<? extends javax.faces.event.FacesEvent>[] fires
          

Events fired by the component.

 java.lang.String generate
          

Name of the generated component implementation class.

 java.lang.Class<?>[] interfaces
          

Interfaces that should be implemented in the generated component class.

 JsfRenderer renderer
          

JsfRenderer associated with this component.

 Tag[] tag
          

View Description Language, JSP or Facelets, tags.

 Test test
          

Cenerated Junit test.

 java.lang.String type
          

Type of the component.

 

type

public abstract java.lang.String type

Type of the component. This is mandatory parameter because CDK uses component-type as primary key for components library model.

TODO if this value is an empty, component type will be inferred from class name.

Returns:
component type.
Default:
""

family

public abstract java.lang.String family

Component famili. If this attribute was empty, it is inferred from the COMPONENT_FAMILY constant or by naming conventions.

Returns:
Default:
""

generate

public abstract java.lang.String generate

Name of the generated component implementation class.

Returns:
Default:
""

description

public abstract Description description

Description used by IDE.

Returns:
Default:
@org.richfaces.cdk.annotations.Description

test

public abstract Test test

Cenerated Junit test.

Returns:
Default:
@org.richfaces.cdk.annotations.Test(testClass="")

renderer

public abstract JsfRenderer renderer

JsfRenderer associated with this component.

Returns:
Default:
@org.richfaces.cdk.annotations.JsfRenderer

tag

public abstract Tag[] tag

View Description Language, JSP or Facelets, tags.

Returns:
Default:
{}

fires

public abstract java.lang.Class<? extends javax.faces.event.FacesEvent>[] fires

Events fired by the component.

Returns:
Default:
{}

facets

public abstract Facet[] facets

Component facets.

Returns:
Default:
{}

attributes

public abstract java.lang.String[] attributes

defines fragments of faces-config.xml that contain standard attribute definitions. CDK also tries to read META-INF/cdk/attributes/[classname].xml file for all component superclasses and interfaces, therefore it is not necessary to explicit include definitions for UIComponent and any other standard JSF classes. CDK defines couple of its own "urn" namespaces: "urn:resource:" for classpath resources, "urn:config:" for for project configuration folder and "urn:attributes:" for META-INF/cdk/attributes/ in the annotations library.

Returns:
Default:
{}

interfaces

public abstract java.lang.Class<?>[] interfaces

Interfaces that should be implemented in the generated component class. CDK processes all Attribute and Facet annotations in these interfaces

Returns:
Default:
{}

components

public abstract RendererSpecificComponent[] components

Returns:
Default:
{}


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.