Originally posted by Michael Rasmussen:
I get a
javax.faces.el.EvaluationException: Error getting property 'wineModel' from a bean of type winetracker.handlers.WineHandler:java.lang.NullPointerException
in my backing bean I have a
getWineModel() method that returns a DataModel
When I use a ListDataModel instead of a ResultSetDataModel and I change the contents of the model from a resultSet to a list of objects this works fine. So the exception provided by faces is IMO misleading. What is really going on is that it cannot find a method in the underlying object called getWineName. Which makes sense since there is no underlying object with a method called getWineName, rather there is a resultSet with an underlying method called getString("wineName"). What I am looking for is how to get the el to recognize that I want it to look at it as a resultset instead of a class. If this can't be done then what is the prupose of the ResultSetDataModel?