I am trying to use this code on my page:
<h:selectOneMenu id="template" value="#{neBean.template}">
    <f:selectItems value="#{templateMap}"/>
</h:selectOneMenu>

The template map coming from TemplaeLogic with this method:
 @Factory("templateMap")
    public Map<String,Long> getTemplateMap(){
        System.out.println("getting the template map");
        Map<String,Long> m = new HashMap();
        Listtps= entityManager.createQuery(" from Template order by 
name").getResultList();
        for(Template t : tps) {
            m.put(t.getName(),t.getId());
        }
        System.out.println("map created count is " + m.size());
        return m;
    }
Strangely rendering the page gives me an error message wich says the 
templateMap is null and after that the log messages of factory method apears! I 
mean it tries to render the page and after that calling the method to create 
the templateMap. I wonder why it is happening in this way.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3939180


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to