Coverage Report - org.trails.descriptor.annotation.PossibleValues
 
Classes in this File Line Coverage Branch Coverage Complexity
PossibleValues
N/A 
N/A 
0
 
 1  
 package org.trails.descriptor.annotation;
 2  
 
 3  
 import java.lang.annotation.ElementType;
 4  
 import java.lang.annotation.Retention;
 5  
 import java.lang.annotation.RetentionPolicy;
 6  
 import java.lang.annotation.Target;
 7  
 
 8  
 /**
 9  
  * Annotation used to declare filter options from a select based on
 10  
  * other property.
 11  
  * <p/>
 12  
  * The most common example of this is selecting a State based on the value of
 13  
  * the country property. If the property you want to filter by is named
 14  
  * "countryFilter" and the Country class has a property named "states" you
 15  
  * should annotate the state property in this way:<br>
 16  
  *
 17  
  * @author pruggia
 18  
  * @PossibleValues("countryFilter.states")<br> <br>
 19  
  * Don't forget to add a {@link InitialValue} to the filtering
 20  
  * property.
 21  
  */
 22  
 @Retention(RetentionPolicy.RUNTIME)
 23  
 @Target({ElementType.FIELD, ElementType.METHOD})
 24  
 @DescriptorAnnotation(PossibleValuesAnnotationHandler.class)
 25  
 public @interface PossibleValues
 26  
 {
 27  
 
 28  
         /**
 29  
          * The expression that when executed provides the options to select values
 30  
          * from.
 31  
          */
 32  
         String value();
 33  
 }
 34