com.mycompany.controller
Class ChartController
java.lang.Object
com.mycompany.controller.AbstractController
com.mycompany.controller.ChartController
- All Implemented Interfaces:
- java.io.Serializable
public class ChartController
- extends AbstractController
Controller class for charts.
- Author:
- Ian Hlavats (ian@tarantulaconsulting.com)
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChartController
public ChartController()
getBarChartModel
public org.primefaces.model.chart.CartesianChartModel getBarChartModel()
getLivePieModel
public org.primefaces.model.chart.PieChartModel getLivePieModel()
- This method builds a
PieChartModel
of active user click counts.
- Returns:
- A PieChartModel.
getPieChartModel
public org.primefaces.model.chart.PieChartModel getPieChartModel()
init
public void init(javax.faces.event.ComponentSystemEvent event)
- Initializes the pie chart and bar chart models from data in our database.
We can't do this in the constructor because the
EntityManager
is
injected after the object is constructed, so this method handles the
initialization during the pre-render view event.
- Parameters:
event
- The view event.
itemSelect
public void itemSelect(org.primefaces.event.ItemSelectEvent event)
setChartService
public void setChartService(ChartService chartService)
setUserService
public void setUserService(UserService userService)