File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsf Datatable

 
Avik Mazunder
Ranch Hand
Posts: 39
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Datatable


HomeBean.java



HomeDataListData.java




i am getting this error

Error Rendering View[/WebPagesAdmin/Home.xhtml]: javax.el.ELException: /WebPagesAdmin/Home.xhtml @36,59 value="#{HomeBean.list}": java.lang.NullPointerException

Please help..!
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17616
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot cache the FacesContext. The FacesContext is created and destroyed for each HTTP request. For non-JSF requests, such as requests to Servlets, the FacesContext does not exist at all.

Also, HomeBean is the name of the class The proper capitalization of the instance of that bean is "homeBean".
 
Avik Mazunder
Ranch Hand
Posts: 39
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I resolved my problem. I carelessly forgot to initialize the arraylist.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic