Package org.apache.shale.tiger.register

This package contains Java SE 5 annotations that allow you to register several types of JavaServer Faces artifacts (components, converters, phase listeners, renderers, and validators) without having to define them in a configuration resource.

See:
          Description

Enum Summary
FacesPhaseListener.PhaseId Identifier for the phase that this listener is interested in participating in.
 

Annotation Types Summary
AfterPhase Method-level annotation indicating that this method should be called to process the "after phase" handling for the containing phase listener.
BeforePhase Method-level annotation indicating that this method should be called to process the "before phase" handling for the containing phase listener.
FacesComponent Class-level annotation indicating that this class should be registered as a JavaServer Faces UIComponent under the component type specified by the value attribute.
FacesConverter Class-level annotation indicating that this class should be registered as a JavaServer Faces Converter under the converter id specified by the value attribute.
FacesPhaseListener Class-level annotation indicating that this class should be registered with the current Lifecycle instance as a JavaServer Faces PhaseListener.
FacesRenderer Class-level annotation indicating that this class should be registered as a JavaServer Faces Renderer under the parameters specified by our attributes.
FacesValidator Class-level annotation indicating that this class should be registered as a JavaServer Faces Validator under the validator id specified by the value attribute.
 

Package org.apache.shale.tiger.register Description

This package contains Java SE 5 annotations that allow you to register several types of JavaServer Faces artifacts (components, converters, phase listeners, renderers, and validators) without having to define them in a configuration resource. Because the JavaServer Faces runtime does not support classes with arbitrary inheritance hierarchies to implement particular features, the actual classes themselves must also extend the corresponding JavaServer Faces APIs to be usable (with the exception of annotated phase listeners, in which case an adapter instance will be interposed if necessary.

To declare a JavaServer Faces UIComponent class:

    import javax.faces.component.UIComponentBase;
    import org.apache.shale.tiger.register.FacesComponent;
    
    @FacesComponent("com.mycompany.mytypes.MY_COMPONENT_TYPE")
    public class MyComponent extends UIComponentBase {
      ...
    }

To declare a JavaServer Faces by-id Converter class:

    import javax.faces.convert.Converter;
    import org.apache.shale.tiger.register.FacesConverter;
    
    @FacesConverter("com.mycompany.mytypes.MY_CONVERTER_ID")
    public class MyConverter implements Converter {
      ...
    }

To declare a JavaServer Faces Validator class:

    import javax.faces.convert.Validator;
    import org.apache.shale.tiger.register.Validator;
    
    @FacesValidator("com.mycompany.mytypes.MY_VALIDATOR_ID")
    public class MyValidator implements Validator {
      ...
    }

To declare a JavaServer Faces PhaseListener class (the BeforePhase and AfterPhase event handers are both optional, and need only be specified if you are interested in that event):

    import org.apache.shale.tiger.register.AfterPhase;
    import org.apache.shale.tiger.register.BeforePhase;
    import org.apache.shale.tiger.register.FacesPhaseListener;
    
    @FacesPhaseListener(phaseId=PhaseId.RENDER_RESPONSE)
    public class MyPhaseListener {
      ...

Since:
1.0.1


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.