Class ComponentAdapterByAnnotationForBeanProperty<BEANCLASS>

java.lang.Object
org.eclnt.jsfserver.elements.adapter.ComponentAdapterByAnnotation
org.eclnt.jsfserver.elements.adapter.ComponentAdapterByAnnotationForBeanProperty<BEANCLASS>
All Implemented Interfaces:
Serializable, IComponentAdapterBinding, IComponentAdapterBinding2, IDynamicContentBindingObject

public class ComponentAdapterByAnnotationForBeanProperty<BEANCLASS> extends ComponentAdapterByAnnotation
Component adapter that is based on reflection AND that binds one dedicated component attribute to a bean property. The bean is either directly passed or indirectly passed using interface IBeanAccess.

The bean property does not have to be implemented (and annotated) in any way but is directly available by #getPropertyValue(Object) and setPropertyValue(Object).

The property can be passed as normal string (e.g. "firstName") - in this it represents a direct property of the bean. Or it can be passed as string sequence (e.g. "address$street"), in this case it is a property that is reached by bean- navigation.
See Also:
  • Constructor Details

    • ComponentAdapterByAnnotationForBeanProperty

      public ComponentAdapterByAnnotationForBeanProperty(String componentAttribute, BEANCLASS bean, String property)
      Parameters:
      componentAttribute - Name of the attribute (e.g. "text" for a FIELD-component) that is served by the bean-property
      bean - Bean instance
      property - Property name
    • ComponentAdapterByAnnotationForBeanProperty

      public ComponentAdapterByAnnotationForBeanProperty(String componentAttribute, IBeanAccess<BEANCLASS> beanAccess, String property)
      Parameters:
      componentAttribute - Name of the attribute (e.g. "text" for a FIELD-component) that is served by the bean-property
      beanAccess - Interface which is passed to access the bean. In this case the bean is not directly passed into this object but "indirectly" accessed only. Advantage: the user of this instance can exchange the bean without having to update the bean in all adapter binding instances.
      property - Property name
    • ComponentAdapterByAnnotationForBeanProperty

      public ComponentAdapterByAnnotationForBeanProperty(BEANCLASS bean, String property)
      Constructor in which the component attribute is not passed. You must make sure that initComponentAttribute(String) is called prior to first access to the adapter binding by the component processing.
    • ComponentAdapterByAnnotationForBeanProperty

      public ComponentAdapterByAnnotationForBeanProperty(IBeanAccess<BEANCLASS> beanAccess, String property)
      Constructor in which the component attribute is not passed. You must make sure that initComponentAttribute(String) is called prior to first access to the adapter binding by the component processing.
  • Method Details