View Javadoc

1   /*
2    * $Id: SelectItemMappers.java,v 1.18 2011/06/16 09:29:41 jbmeslin Exp $
3    * 
4    */
5   package org.rcfaces.core.internal.tools;
6   
7   import javax.faces.component.UIComponent;
8   import javax.faces.model.SelectItem;
9   
10  import org.rcfaces.core.internal.decorator.ISelectItemMapper;
11  import org.rcfaces.core.item.IImagesItem;
12  
13  /**
14   * @author Olivier Oeuillot (latest modification by $Author: jbmeslin $)
15   * @version $Revision: 1.18 $ $Date: 2011/06/16 09:29:41 $
16   */
17  public class SelectItemMappers {
18      private static final String REVISION = "$Revision: 1.18 $";
19  
20      public static final ISelectItemMapper SEARCH_IMAGE_MAPPER = new ISelectItemMapper() {
21          private static final String REVISION = "$Revision: 1.18 $";
22  
23          public boolean map(SelectItem si) {
24              if (si instanceof IImagesItem) {
25                  return false;
26              }
27              return true;
28          }
29  
30          public void unknownComponent(UIComponent component) {
31          }
32  
33          public boolean acceptCollections() {
34              return true;
35          }
36  
37      };
38  
39  }