All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ocpsoft.pretty.faces.annotation.URLBeanName Maven / Gradle / Ivy

There is a newer version: 3.3.3
Show newest version
package com.ocpsoft.pretty.faces.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.ocpsoft.pretty.faces.el.BeanNameResolver;

/**
 * 

* Annotation specifying the name that can be used to access instances of this * bean in EL expressions. *

*

* Please not that PrettyFaces is able to auto-detect the name in most * environments. You will only need to place this annotation on your beans, if * you use an uncommon way for declaring your beans or are running in a special * class loading environment that prevents reflection. *

* *

* If your way of declaring beans is not directly supported by PrettyFaces, you * can also create your own bean name resolver. This way you won't need to place * the {@link URLBeanName} annotation on your beans and instead let the resolver * determine the bean name. To create your own resolver, you will have to: *

* *
    *
  • Build your own implementation of the {@link BeanNameResolver} interface.
  • *
  • Create a file * META-INF/services/com.ocpsoft.pretty.faces.el.BeanNameResolver * and put the fully-qualified class name of your implementation class in there. *
  • *
* * @author Christian Kaltepoth */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) @Inherited @Documented public @interface URLBeanName { /** *

* The name of the bean in the EL context. *

*/ String value(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy