com.ocpsoft.pretty.faces.annotation.URLQueryParameter Maven / Gradle / Ivy
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;
/**
*
* Defines a managed query parameter of the form
* http://site.com/url?key=somevalue
, where if the parameter
* exists, the value will be injected into the annotated field. This also
* handles JSF commandLink and AJAX <f:param> values.
*
*
* If the class containing the field is annotated with a {@link URLMapping}
* annotation, the query parameter will automatically be added to this mapping.
* You can also add the parameter to a foreign mapping by referencing it with
* the mappingId
attribute.
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@Inherited
@Documented
public @interface URLQueryParameter {
/**
* This is the request value key
*/
String value();
/**
*
* Optional ID of the mapping to add this query parameter to. If no ID is
* given, the parameter will be added to the mapping specified on the class
* the annotated method belongs to.
*
*/
String mappingId() default "";
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy