File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes jsf Datatable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "jsf Datatable" Watch "jsf Datatable" New topic
Author

jsf Datatable

Avik Mazunder
Ranch Hand

Joined: Jun 27, 2012
Posts: 39

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

Joined: Jun 25, 2001
Posts: 15952
    
  19

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".


Customer surveys are for companies who didn't pay proper attention to begin with.
Avik Mazunder
Ranch Hand

Joined: Jun 27, 2012
Posts: 39

I resolved my problem. I carelessly forgot to initialize the arraylist.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: jsf Datatable
 
Similar Threads
Why not refresh jsf page
A Very little problem in h:dataTable implementation
Passing parameters with h: link
Problem in stateless session bean with JSF
MyFaces Data Table didn't work