<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Home</title><link>https://sourceforge.net/p/olap-faces/wiki/Home/</link><description>Recent changes to Home</description><atom:link href="https://sourceforge.net/p/olap-faces/wiki/Home/feed" rel="self"/><language>en</language><lastBuildDate>Mon, 21 Nov 2011 20:43:37 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/olap-faces/wiki/Home/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage Home modified by Cesar Garcia</title><link>https://sourceforge.net/p/olap-faces/wiki/Home/</link><description>&lt;pre&gt;--- v8 
+++ v9 
@@ -89,8 +89,9 @@
 ##Setp 4: The hello managed bean
 
 :::::java
-    @ManagedBean(name="hello")
-    @RequestScoped
+
+@ManagedBean(name="hello")
+@RequestScoped
 public class HelloBean {
 	
 	private OlapConnection cn;
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Cesar Garcia</dc:creator><pubDate>Mon, 21 Nov 2011 20:43:37 -0000</pubDate><guid>https://sourceforge.net319ef34b231a8a9859e412f5d3d02f69159c6edb</guid></item><item><title>WikiPage Home modified by Cesar Garcia</title><link>https://sourceforge.net/p/olap-faces/wiki/Home/</link><description>&lt;pre&gt;--- v7 
+++ v8 
@@ -88,16 +88,9 @@
 
 ##Setp 4: The hello managed bean
 
-#!
-/**
-* Managed bean for hello sample pages.
-* 
-* We manage OlapConnections creating them at &lt;code&gt;@PostConstruct&lt;/code&gt; time and 
-* closing it at &lt;code&gt;@PreDestroy&lt;/code&gt;
-*
-*/
-@ManagedBean(name="hello")
-@RequestScoped
+:::::java
+    @ManagedBean(name="hello")
+    @RequestScoped
 public class HelloBean {
 	
 	private OlapConnection cn;
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Cesar Garcia</dc:creator><pubDate>Mon, 21 Nov 2011 20:43:13 -0000</pubDate><guid>https://sourceforge.net8ec30ca53078e889e30af5dc23cd2aa575c97508</guid></item><item><title>WikiPage Home modified by Cesar Garcia</title><link>https://sourceforge.net/p/olap-faces/wiki/Home/</link><description>&lt;pre&gt;--- v6 
+++ v7 
@@ -88,6 +88,48 @@
 
 ##Setp 4: The hello managed bean
 
+#!
+/**
+* Managed bean for hello sample pages.
+* 
+* We manage OlapConnections creating them at &lt;code&gt;@PostConstruct&lt;/code&gt; time and 
+* closing it at &lt;code&gt;@PreDestroy&lt;/code&gt;
+*
+*/
+@ManagedBean(name="hello")
+@RequestScoped
+public class HelloBean {
+	
+	private OlapConnection cn;
+	private CellSet cs;
+
+	@PostConstruct
+	public void init() throws SQLException, ClassNotFoundException {
+		Class.forName("mondrian.olap4j.MondrianOlap4jDriver");
+		Connection jdbcCn = DriverManager.getConnection("jdbc:mondrian:"
+				+ "JdbcDrivers=com.mysql.jdbc.Driver;"
+				+ "Jdbc=jdbc:mysql://localhost/foodmart;"
+				+ "JdbcUser=root;JdbcPassword=root;"
+				+ "Catalog=file:/users/cesar/FoodMart.xml");
+		cn = jdbcCn.unwrap(OlapConnection.class);
+	}
+	
+	@PreDestroy
+	public void tearDown() throws SQLException {
+		if ( cn != null )
+			cn.close();
+	}
+	
+	public CellSet getCellSet() throws OlapException {
+		if ( cs == null )
+			cs = cn.createStatement().executeOlapQuery(
+				"SELECT {[Measures].[Unit Sales],[Measures].[Store Sales]} ON COLUMNS," +
+				" CrossJoin({[Promotions].[All Promotions],[Promotions].[All Promotions].Children}," +
+				"			{[Promotion Media].[All Media],[Promotion Media].[All Media].Children}) ON ROWS " +
+				"FROM [Sales]");
+		return cs;
+	}
+}
 
 
 
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Cesar Garcia</dc:creator><pubDate>Mon, 21 Nov 2011 20:40:04 -0000</pubDate><guid>https://sourceforge.net53e0dccdae3c45f98f238cc899ef874bf986d5df</guid></item><item><title>WikiPage Home modified by Cesar Garcia</title><link>https://sourceforge.net/p/olap-faces/wiki/Home/</link><description>&lt;pre&gt;--- v5 
+++ v6 
@@ -71,5 +71,23 @@
 &lt;/h:body&gt;
 &lt;/html&gt;
 
+In this page I make a reference to the OLAP Faces taglib, referencing its namespace. And then add a &lt;olap:cellSetTable&gt; tag. This tag has two attributes:
+
+* **value**: that must evaluate to an olap4j CellSet
+* **var**: a variable name that will contain the information about the current cell (like the 'var' attribute for the standard h:dataTable.
+
+The complete use case allows description of the query row axis, the query column axis and the data cells. By now we can only define the row axis (the columns axis is rendered as a single row containing every leaf member in the cellset, and for the data cell, the component draws its "formattedValue".
+
+The axis rendering has a main part and a "header" facet. That facet is used to render the headers of every QueryDimension, and the main part renders every member in the query axis.
+
+For the headers, we are rendering #{cell.hierarchy.caption} the caption property of the hierarchy used for that dimension.
+
+For the members, we are rendering #{cell.member.caption} the caption of each member. #{cell.member} and #{cell.hierarchy} return the standar olap4j objects Member and Hierarchy.
+
+Now we need to implement the "hello" managed bean.
+
+##Setp 4: The hello managed bean
+
+
 
 
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Cesar Garcia</dc:creator><pubDate>Mon, 21 Nov 2011 20:35:26 -0000</pubDate><guid>https://sourceforge.net7fd68d00a8b70efc207ea2c32bf170ac280b9b67</guid></item><item><title>WikiPage Home modified by Cesar Garcia</title><link>https://sourceforge.net/p/olap-faces/wiki/Home/</link><description>&lt;pre&gt;--- v4 
+++ v5 
@@ -50,33 +50,23 @@
     &lt;/h:head&gt;
     &lt;h:body&gt;
  	&lt;!-- 
- 		A table to show a CellSet uses the 'var' EL expression to provide         information 
- 		about the item to be drawn.
+ 		A table to show a CellSet uses the 'var' EL expression to provide
+ 		information about the item to be drawn.
  	--&gt;
  	&lt;olap:cellSetTable value="#{hello.cellSet}" var="cell"&gt;
- 		&lt;!-- Row axis formatting --&gt;
- 		&lt;olap:rowAxis&gt;
- 			&lt;olap:header&gt;
- 				&lt;!-- Content to be drawn as the header of QueryDimension columns: the hierarchy caption --&gt;
- 				&lt;f:facet name="header"&gt;
- 					&lt;h:outputText value="#{cell.hierarchy.caption}" /&gt;
- 				&lt;/f:facet&gt;
- 				&lt;!-- Content to be drawn for the cells showing information about 
+ 	    &lt;!-- Row axis formatting --&gt;
+ 	    &lt;olap:rowAxis&gt;
+ 	      &lt;olap:header&gt;
+	        &lt;!-- Content to be drawn as the header of QueryDimension columns: 
+                      the hierarchy caption --&gt;
+ 		 &lt;f:facet name="header"&gt;
+ 		   &lt;h:outputText value="#{cell.hierarchy.caption}" /&gt;
+ 		 &lt;/f:facet&gt;
+ 		 &lt;!-- Content to be drawn for the cells showing information about 
  				     a member in a hierarchy --&gt;
- 				&lt;h:outputText value="#{cell.member.caption}" /&gt;
- 			&lt;/olap:header&gt;
- 		&lt;/olap:rowAxis&gt;
- 
- 		&lt;!--
- 			TODO: create &lt;olap:columnAxis&gt; to allow column axis personalization paralleling that of row axis  
- 		 --&gt;
- 
- 		&lt;!--
- 			TODO: 
- 		&lt;olap:cell&gt;
- 			&lt;h:outputText value="#{cell.formattedValue}"/&gt;
- 		&lt;/olap:cell&gt; 
-		 --&gt;
+ 		 &lt;h:outputText value="#{cell.member.caption}" /&gt;
+ 	        &lt;/olap:header&gt;
+ 	      &lt;/olap:rowAxis&gt;
  	&lt;/olap:cellSetTable&gt;
 &lt;/h:body&gt;
 &lt;/html&gt;
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Cesar Garcia</dc:creator><pubDate>Mon, 21 Nov 2011 20:24:57 -0000</pubDate><guid>https://sourceforge.net34cb295f8f6c1e4bf4b3403c6e017034156c4ec8</guid></item><item><title>WikiPage Home modified by Cesar Garcia</title><link>https://sourceforge.net/p/olap-faces/wiki/Home/</link><description>&lt;pre&gt;--- v3 
+++ v4 
@@ -1,3 +1,85 @@
-Hello OLAP World
-====
+# Hello OLAP World!!
+
+This tutorial describes the initial setup for the smallest OLAP Faces project. This is the outline of the basic steps:
+
+1. Include the dependencies for JSF 2 (if you do use a Java EE Container), olap4j y OLAP FACES in your WEB-INF/lib.
+* Add to your web.xml the JSF Servlet and configure its mapping.
+* Create a Facelets page containing an OLAP Faces cellSetTable to show a CellSet
+* Create a Managed Bean providing the CellSet to display and bind the cellSetTable to this bean.
+
+## Step 1: Include dependencies in your project
+
+I use Maven to build my projects, so this is the relevant part of my pom.xml
+
+    &lt;dependencies&gt;
+    	&lt;!-- JSF API --&gt;
+       	&lt;dependency&gt;
+       		&lt;groupId&gt;javax.faces&lt;/groupId&gt;
+       		&lt;artifactId&gt;javax.faces-api&lt;/artifactId&gt;
+       		&lt;scope&gt;provided&lt;/scope&gt;
+       	&lt;/dependency&gt;
+       	
+       	&lt;!-- OLAP Faces --&gt;
+       	&lt;dependency&gt;
+       		&lt;groupId&gt;cgalesanco&lt;/groupId&gt;
+        		&lt;artifactId&gt;olap4j-faces&lt;/artifactId&gt;
+       		&lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
+       	&lt;/dependency&gt;
+       	&lt;dependency&gt;
+       		&lt;groupId&gt;cgalesanco&lt;/groupId&gt;
+       		&lt;artifactId&gt;olap4j-query&lt;/artifactId&gt;
+       		&lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
+       	&lt;/dependency&gt;
+         ...
+    &lt;/dependencies&gt;
+
+## Step 3 Create a Facelts page with a cellSetTable
+
+This is the sample page (hello.xhtml)
+
+    &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
+         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
+     
+    &lt;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:olap="http://cgalesanco.es/faces/olap4j"&gt;
+ 
+    &lt;h:head&gt;
+     	&lt;title&gt;OLAP Faces Hello World page&lt;/title&gt;
+    &lt;/h:head&gt;
+    &lt;h:body&gt;
+ 	&lt;!-- 
+ 		A table to show a CellSet uses the 'var' EL expression to provide         information 
+ 		about the item to be drawn.
+ 	--&gt;
+ 	&lt;olap:cellSetTable value="#{hello.cellSet}" var="cell"&gt;
+ 		&lt;!-- Row axis formatting --&gt;
+ 		&lt;olap:rowAxis&gt;
+ 			&lt;olap:header&gt;
+ 				&lt;!-- Content to be drawn as the header of QueryDimension columns: the hierarchy caption --&gt;
+ 				&lt;f:facet name="header"&gt;
+ 					&lt;h:outputText value="#{cell.hierarchy.caption}" /&gt;
+ 				&lt;/f:facet&gt;
+ 				&lt;!-- Content to be drawn for the cells showing information about 
+ 				     a member in a hierarchy --&gt;
+ 				&lt;h:outputText value="#{cell.member.caption}" /&gt;
+ 			&lt;/olap:header&gt;
+ 		&lt;/olap:rowAxis&gt;
+ 
+ 		&lt;!--
+ 			TODO: create &lt;olap:columnAxis&gt; to allow column axis personalization paralleling that of row axis  
+ 		 --&gt;
+ 
+ 		&lt;!--
+ 			TODO: 
+ 		&lt;olap:cell&gt;
+ 			&lt;h:outputText value="#{cell.formattedValue}"/&gt;
+ 		&lt;/olap:cell&gt; 
+		 --&gt;
+ 	&lt;/olap:cellSetTable&gt;
+&lt;/h:body&gt;
+&lt;/html&gt;
+
+
 
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Cesar Garcia</dc:creator><pubDate>Mon, 21 Nov 2011 20:22:17 -0000</pubDate><guid>https://sourceforge.net67dfa951d394c58c52d8bcbe26d17902bc4cbc74</guid></item><item><title>WikiPage Home modified by Cesar Garcia</title><link>https://sourceforge.net/p/olap-faces/wiki/Home/</link><description>&lt;pre&gt;--- v2 
+++ v3 
@@ -1,12 +1,3 @@
-Background
+Hello OLAP World
 ====
 
-I initially got in touch with Open Source BI while managing a [Pentaho](http://www.pentaho.com/) deployment (previously I was involved in another project using SAP BI). So when I faced the development of a small utility requiring BI functionallity, I choose to use some of the foundations of this BI suite. Specifically [Mondrian](http://mondrian.pentaho.com/) as the OLAP engine and [JPivot](http://jpivot.sourceforge.net/) for data visualization.
-
-While Mondrian seemed very easy to integrate, JPivot was quite more cumbersome and unwieldy so I started looking for alternatives. I was experimenting with version 2.0 of JSF, at that moment, so I tried to find a JSF components library to provide JPivot like functionality.
-
-I could not find it, and the utility development was finally cancelled.
-
-Anyway, personally, the idea of such a component library seemed appealing, and was a nice path to learn about JSF custom components development. For me, the finall push was the release of version 1.0 of [olap4j](http://www.olap4j.org/).
-
-The vision of a suite of BI presentation-tier components, pluggable to several OLAP providers using an standarized interface (olap4j), and tha could be integrated into an also standard Web framework (JSF 2.0), by **just dropping a *.jar* file into the project's *classpath* ** attracted me more and more.
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Cesar Garcia</dc:creator><pubDate>Mon, 21 Nov 2011 19:55:48 -0000</pubDate><guid>https://sourceforge.net0a554ece38049f75054b336e04810c76eabfcdcd</guid></item><item><title>WikiPage Home modified by Cesar Garcia</title><link>https://sourceforge.net/p/olap-faces/wiki/Home/</link><description>&lt;pre&gt;--- v1 
+++ v2 
@@ -1,5 +1,12 @@
-Welcome to your wiki!
-
-This is the default page, edit it as you see fit. To add a page simply reference it within brackets, e.g.: [SamplePage].
-
-The wiki uses [Markdown](/p/olap-faces/wiki/markdown_syntax/) syntax.
+Background
+====
+
+I initially got in touch with Open Source BI while managing a [Pentaho](http://www.pentaho.com/) deployment (previously I was involved in another project using SAP BI). So when I faced the development of a small utility requiring BI functionallity, I choose to use some of the foundations of this BI suite. Specifically [Mondrian](http://mondrian.pentaho.com/) as the OLAP engine and [JPivot](http://jpivot.sourceforge.net/) for data visualization.
+
+While Mondrian seemed very easy to integrate, JPivot was quite more cumbersome and unwieldy so I started looking for alternatives. I was experimenting with version 2.0 of JSF, at that moment, so I tried to find a JSF components library to provide JPivot like functionality.
+
+I could not find it, and the utility development was finally cancelled.
+
+Anyway, personally, the idea of such a component library seemed appealing, and was a nice path to learn about JSF custom components development. For me, the finall push was the release of version 1.0 of [olap4j](http://www.olap4j.org/).
+
+The vision of a suite of BI presentation-tier components, pluggable to several OLAP providers using an standarized interface (olap4j), and tha could be integrated into an also standard Web framework (JSF 2.0), by **just dropping a *.jar* file into the project's *classpath* ** attracted me more and more.
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Cesar Garcia</dc:creator><pubDate>Mon, 21 Nov 2011 19:45:53 -0000</pubDate><guid>https://sourceforge.net9c9606f4ef7eccde268bd300eabd293b695ec361</guid></item><item><title>WikiPage Home modified by Cesar Garcia</title><link>https://sourceforge.net/p/olap-faces/wiki/Home/</link><description>Welcome to your wiki!

This is the default page, edit it as you see fit. To add a page simply reference it within brackets, e.g.: [SamplePage].

The wiki uses [Markdown](/p/olap-faces/wiki/markdown_syntax/) syntax.
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Cesar Garcia</dc:creator><pubDate>Sat, 19 Nov 2011 12:16:29 -0000</pubDate><guid>https://sourceforge.netdd485dba72127f32ead0240c592b7731248818f2</guid></item></channel></rss>