Here's the problem.
I want to use primefaces, on server (using Glassfish 3.x) code, seems to be ok, but after running, i get this NPE error.
And cant figure out, where its coming from..
my Bean:
package mybean;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import org.primefaces.model.chart.PieChartModel;
@ManagedBean(name = "chartBean")
@RequestScoped
public class ChartBean {
private PieChartModel model;
public ChartBean() {
model = new PieChartModel();
model.set("Brand 1", 540);
model.set("Brand 2", 325);
model.set("Brand 3", 702);
model.set("Brand 4", 421);
}
public PieChartModel getModel() {
return model;
}
}
And index page:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.prime.com.tr/ui">
<h:head></h:head>
<f:view>
<h:form>
<h:outputText value="Hello My blog!!" />
<h:inputText value="#{helloMyBlog.webFramework}" />
<p:editor />
<p:calendar navigator="true" pages="4"/>
<p:pieChart value="#{chartBean.model}" />
</h:form>
</f:view>
</html>
What can cause NPE? (Note, whole page cant be rendered because of this)
Thank you.

New Topic/Question
Reply


MultiQuote


|