1

I'm working with MVC project with primeface and jboss 5.1 . I had to migrate project to primeface latest version from primeface 3.4. I migrated that to 3.5 and then 4.0 . Now I'm trying to migrate that to primeface 5.0 . Then It gives this error message.

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: /main.xhtml @103,58 itemLabel="#{item.value}": Property 'value' not found on type java.lang.String
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:422)
    org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:696)
    org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:667)
    org.apache.jsp.index_jsp._jspService(index_jsp.java:57)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

and part of my main.xhtml is bellow

                    <p:selectOneMenu id="compType" value="#{authenticateController.userSession.mwtUmUser.companyType}" effect="fold" editable="false" style="width: 180px;">                           
                        <f:selectItems
                            value="#{authenticateController.companyTypeMap}"
                            var="item"
                            itemLabel="#{item.value}"
                            itemValue="#{item.key}"/>
                        <p:ajax listener="#{authenticateController.setUserCompanyType}" update=":loginFrm:loginGrd"/>
                    </p:selectOneMenu>                   

authenticateController

    public Map<String, String> getCompanyTypeMap() {

            try {
                if (null == commonManager) {
                    commonManager = (CommonManager) SpringUtil.getApplicationContext().getBean("commonManager");
                }
                companyTypeMap = commonManager.getCompanyTypeMap(null);
            } catch (Exception e) {
                log.error(e, e);
            }
            return companyTypeMap;
        }


 public String getCompanyType() {
        return companyType;}

I already tried some similar problems in stack-overflow but still not good result. plz help me out..

gaga
  • 63
  • 1
  • 14

1 Answers1

1

Without a code of your authenticateController I could only suppose, that you are trying to use the java.util.Map interface behind the #{authenticateController.companyTypeMap} call. Please read the BalusC answer on how to use maps with selectItems tag.

Community
  • 1
  • 1
olexd
  • 1,360
  • 3
  • 13
  • 26