Hello Denis,

     I am trying to get your example of implementing SelectItems without custom 
annotations. I have included the the following code in my SFSB.



  | 
  | 
  | 
  | @Stateful
  | @Name("companySearch")
  | @Scope(ScopeType.SESSION)
  | @Interceptors(SeamInterceptor.class)
  | 
  | public class CompanySearchBean implements CompanySearch, Serializable {
  | 
  |      
  |       <! -- Bean Specific Code goes here  -->
  | 
  |     public Map<String,Object> model;
  |     
  |     
  |     private void fillMaps(){
  |             model = new TreeMap<String,Object>();
  |             model.put("(Empty)","-1");             // Add EMPTY element if 
needed
  |             for (Object o: yearList) {
  |                     String label = o.toString();
  |                     model.put(label, o );
  |             }
  |     }
  |     
  |     
  |     public Map<String,Object> getModel(){          // f:selectItems value
  |             log.debug("Initializing Model");
  |             log.debug("Model Size = "+model.size());
  |             return model;
  |     }
  |     
  |     
  |     
  |     
  |     public Converter getConverter() {
  |             return new ReferenceConverter(yearList);
  |     }       
  | 


This is my code in the my search.xhtml file

  | 
  |                     <h:selectOneMenu converter="#{companySearch.converter}">
  |                             <f:selectItems value="#{companySearch.model}" />
  |                     </h:selectOneMenu>
  | 



Is this the right approach ??

I am getting a "Cannot get property model" error 

Plz help....and thnx in advance....


Yogesh







View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973547#3973547

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973547
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to