javax.el.PropertyNotFoundException: Property 'ResourceList' not found on type com

javax.el.PropertyNotFoundException: Property 'ResourceList' not found on type com

I don't see the problem here. I'm new at this, probably missing something obvious.

Anybody?

xhtml looks like...

<h:dataTable value="#{bean.ResourceList}" var="r">


bean looks like....


@ManagedBean(name="bean")
@SessionScoped
public class ResourceBean implements Serializable {
private static final long serialVersionUID = 1L;

public List<Resource> getResourceList() throws SQLException{
System.out.println("in the ResourceBean class - getResourceList method");
Connection m_conn = null;
etc...

for some reason it doesn't find it...
HTTP Status 500 - javax.el.PropertyNotFoundException: Property 'ResourceList' not found on type com.xxx.msd.beans.ResourceBean

JSF is based on the JavaBean model. JavaBeans have certain conventions, one of which is that class names begin with an upper-case letter, but instance and property names begin with a lower-case letter.

You have violated this standard by designing a property named "ResourceList". Because the property accessor framework expects standards-compliant property names, your set/get methods aren't resolving and you get a PropertyNotFoundException.

Change the reference to "#{bean.resourceList}" and you'll fare better. Make the resourceList property return a javax.faces.ListDataModel wrapping the actual list and you'll do better still.

  • Back aarticle:
  • Next aarticle: No
  • Copyright © 2007-2012 www.chuibin.com Chuibin Copyright