This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ManagedBean | |
@SessionScoped | |
public class BloggerBean { | |
private MenuModel simpleMenuModel = new DefaultMenuModel(); | |
public BloggerBean() { | |
MenuItem menuItem = new MenuItem(); | |
menuItem.setValue("Computers"); | |
menuItem.setUrl("#"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ManagedBean | |
@SessionScoped | |
public class BloggerBean { | |
private CategoryMenuModel menuModel = new CategoryMenuModel(); | |
public BloggerBean() { | |
menuModel.setCategory(new Category("Computers")); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h:form> | |
<p:menu model="#{bloggerBean.simpleMenuModel}"/> | |
</h:form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='UTF-8' ?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:h="http://java.sun.com/jsf/html" | |
xmlns:gc="http://nz.co.kevindoran/googlecharts"> | |
<h:head> | |
<title>Google Charts with JSF Test</title> | |
</h:head> | |
<h:body> | |
<h2>Google Charts with JSF Test</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ManagedBean | |
public class ChartBackBean { | |
private GoogleChartModel chartModel = new DefaultGoogleChartModel("AnnotatedTimeLine"); | |
public ChartBackBean() { | |
chartModel.addColumn(new Column(Column.JavaScriptType.date, "Date")); | |
chartModel.addColumn(new Column(Column.JavaScriptType.number, "Price")); | |
for(int i=20; i>0; i--) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Category { | |
String getName(); | |
Collection<Category> getChildCategories(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Note: I tried to include these scripts within the composite component XHTML pages | |
(where they belong), but I got JSF errors (apparently, a Bug in latest Mojarra JSF).--> | |
<h:outputScript library="javascript/highcharts/js/" name="highcharts.js" target="head" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script> | |
</h:head> | |
<h:body> | |
<h1>New Zealand National Ethnic Population Projections</h1> | |
<div id="subtitle"> | |
Projections for the New Zealand Population makeup for the year 2026 using | |
data from 2006. For more information, see |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.faces.bean.ManagedBean; | |
import nz.co.tradeintel.highcharts.ColumnChartSeries; | |
@ManagedBean | |
public class NZEthnicPopulation2006 { | |
private ColumnChartSeries nzEuropeanSeries = new ColumnChartSeries(); | |
private ColumnChartSeries maoriSeries = new ColumnChartSeries(); | |
private ColumnChartSeries pacificSeries = new ColumnChartSeries(); | |
private ColumnChartSeries asianSeries = new ColumnChartSeries(); |
OlderNewer