• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

ERROR - ValueBindingImpl.getValue | Cannot get value for expression '#{modelPage

Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am a newbie to JSF.

I have a problem when I am trying to display the results of a select query using JSF. I am using Spring with Hibernate with JSF for the display of the jsp page.

I get this error:

ERROR - ValueBindingImpl.getValue(454) | Cannot get value for expression '#{modelPageBean.modelIds.model}'
javax.faces.el.PropertyNotFoundException: Bean: com.gse.view.ModelPageBean, property: modelIds

I have been trying every combination for the past 3-4 days and am quite at the end of my wits....

Here is my faces-config.xml:


Here is my jsp:
<%@ page language="java" errorPage="/error.jsp" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<head><title>Select a Model to proceed</title></head>
<!--f:loadBundle basename="messages.properties" var="bundle"/-->

<body bgcolor="#EDF0F5">
<h anelGrid columns="1" summary="Models"
<h:selectOneMenu value="#{modelPageBean.modelIds}">
<f:selectItems value="#{modelPageBean.modelIds.model}"/>

And here is the implementation of my ModelPageBean.java:
public class ModelPageBean {
private ServiceLocator serviceLocator;
private List<Model> modelIds;
List<Model> models;

private Log logger = LogFactory.getLog(this.getClass());

public ModelPageBean(){
this.logger.debug("ModelPageBean constructed");

public ServiceLocator getServiceLocator(){
return this.serviceLocator;

public void setServiceLocator(ServiceLocator serviceLocator){
logger.info("Inside setSericeLocator method");
this.serviceLocator = serviceLocator;

private void init() {
try {
this.logger.info(new StringBuffer().append("Inside init: Got Models: ").append(this.modelIds).toString());
} catch (Exception exception) {
logger.error(new StringBuilder().append("Models not initialized: ").append(exception.getMessage()).toString());

public void setModelIds(){
this.modelIds = this.getServiceLocator().getModelService().getModels();
this.logger.info("Setting ModelIds");

public List<Model> getModelIds(){
for(Model model : this.modelIds){
models.add((Model) new SelectItem(model));
logger.info("Models ready for display");
return this.models;

I also have a ModelImpl.java class which implements a Model interface. This class retrieves the ModelId from the database...

All the jsp does is to get the modelIds and show them in a dropdown...

I have the ModelPageBean as a managed-bean of name modelPageBean which contains a getModelIds which returns a list of Models.

I need a bit of help please to understand where I am going wrong...

Anoop V. Kumar
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually this is the complete error that I get:

DEBUG - ModelPageBean.<init>(25) | ModelPageBean constructed
ERROR - PropertyResolverImpl.setValue(202) | com.sikorsky.gse.view.ModelPageBean
javax.faces.el.PropertyNotFoundException: Bean: com.gse.view.ModelPageBean, property: modelIds
at net.sourceforge.myfaces.el.PropertyResolverImpl.setProperty(PropertyResolverImpl.java:407)
at net.sourceforge.myfaces.el.PropertyResolverImpl.setValue(PropertyResolverImpl.java:198)
at net.sourceforge.myfaces.config.ManagedBeanBuilder.initializeProperties(ManagedBeanBuilder.java:133)
at net.sourceforge.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBuilder.java:56)

So the ModelPageBean is being created - but probably my value for the managed-bean property is incorrect.

Yeah. What he said. Totally. Wait. What? Sorry, I was looking at this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic