com.tonbeller.jpivot.table
Class TableComponent

java.lang.Object
  extended by com.tonbeller.wcf.component.ComponentSupport
      extended by com.tonbeller.jpivot.table.TableComponent
All Implemented Interfaces:
ModelChangeListener, com.tonbeller.wcf.bookmarks.Bookmarkable, com.tonbeller.wcf.component.Component, com.tonbeller.wcf.component.Form, com.tonbeller.wcf.component.FormListener, com.tonbeller.wcf.component.LifeCycle, com.tonbeller.wcf.component.Renderable, com.tonbeller.wcf.component.RoleExprHolder, com.tonbeller.wcf.component.Visible, com.tonbeller.wcf.controller.RequestListener, java.util.EventListener, javax.servlet.http.HttpSessionBindingListener

public class TableComponent
extends com.tonbeller.wcf.component.ComponentSupport
implements ModelChangeListener

Contains a reference to the olap data plus additional gui settings. Renders the pivot table


Field Summary
 
Fields inherited from interface com.tonbeller.wcf.bookmarks.Bookmarkable
EXTENSIONAL, INTENSIONAL
 
Constructor Summary
TableComponent()
          for instantiation via reflection api.
TableComponent(java.lang.String id, com.tonbeller.wcf.component.Component parent)
           
TableComponent(java.lang.String id, com.tonbeller.wcf.component.Component parent, OlapModel newOlapModel)
           
 
Method Summary
 void addExtension(TableComponentExtension extension)
          registers an extension.
 org.w3c.dom.Element append(java.lang.String name, org.w3c.dom.Element parent)
          utility - creates an element and appends it
 java.lang.Object cdata(java.lang.String content, org.w3c.dom.Element parent)
          utility - creates a CDATA section
 java.util.Iterator clickableIterator()
           
 void destroy(javax.servlet.http.HttpSession session)
          deferred ctor called once by the creating tag
 org.w3c.dom.Element elem(java.lang.String name)
          utility - creates an element with the given name
 java.lang.Object getBookmarkState(int levelOfDetail)
           
 CellBuilder getCellBuilder()
          Returns the cellBuilder.
 Axis getColumnAxis()
          returns the column axis or null
 ColumnAxisBuilder getColumnAxisBuilder()
          Returns the columnAxisBuilder.
 CornerBuilder getCornerBuilder()
          Returns the cornerBuilder.
 int getDimCount()
          returns the dimension count of the current result
 java.util.Map getExtensions()
          provides access to the extensions thru JSP scripting
 OlapModel getOlapModel()
           
 PropertyConfig getPropertyConfig()
          returns the property config object that allows to adjust visible properties
 Result getResult()
          returns the current result
 org.w3c.dom.Element getRootElement()
          returns the root DOM element that is rendered
 Axis getRowAxis()
          returns the row axis or null
 RowAxisBuilder getRowAxisBuilder()
          Returns the rowAxisBuilder.
 SlicerBuilder getSlicerBuilder()
          Returns the slicerBuilder.
 void initialize(com.tonbeller.wcf.controller.RequestContext context)
          deferred ctor called once by the creating tag
 org.w3c.dom.Element insert(java.lang.String name, org.w3c.dom.Element parent)
          utility - creates an element an inserts it before the first child
 boolean isDirty()
          true means that render() will create a new DOM
 void modelChanged(ModelChangeEvent e)
          model data have changed, e.g. user has navigated
 org.w3c.dom.Document render(com.tonbeller.wcf.controller.RequestContext context)
          main entry point
 void request(com.tonbeller.wcf.controller.RequestContext context)
           
 void setBookmarkState(java.lang.Object state)
           
 void setCellBuilder(CellBuilder cellBuilder)
          Sets the cellBuilder.
 void setColumnAxisBuilder(ColumnAxisBuilder columnAxisBuilder)
          Sets the columnAxisBuilder.
 void setCornerBuilder(CornerBuilder cornerBuilder)
          Sets the cornerBuilder.
 void setDirty(boolean dirty)
           
 void setOlapModel(OlapModel newOlapModel)
           
 void setRowAxisBuilder(RowAxisBuilder rowAxisBuilder)
          Sets the rowAxisBuilder.
 void setSlicerBuilder(SlicerBuilder slicerBuilder)
          Sets the slicerBuilder.
 void structureChanged(ModelChangeEvent e)
          major change, e.g. extensions added/removed
protected  Result updateOlapModel()
           
 
Methods inherited from class com.tonbeller.wcf.component.ComponentSupport
addFormListener, getDispatcher, getForm, getId, getLocale, getNextView, getParent, getRoleExpr, isAutoValidate, isListeningTo, isVisible, removeFormListener, revert, setAutoValidate, setId, setNextView, setParent, setRoleExpr, setVisible, validate, valueBound, valueUnbound
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableComponent

public TableComponent(java.lang.String id,
                      com.tonbeller.wcf.component.Component parent)

TableComponent

public TableComponent(java.lang.String id,
                      com.tonbeller.wcf.component.Component parent,
                      OlapModel newOlapModel)

TableComponent

public TableComponent()
for instantiation via reflection api.

See Also:
setOlapModel(com.tonbeller.jpivot.olap.model.OlapModel)
Method Detail

setOlapModel

public void setOlapModel(OlapModel newOlapModel)

initialize

public void initialize(com.tonbeller.wcf.controller.RequestContext context)
                throws java.lang.Exception
deferred ctor called once by the creating tag

Specified by:
initialize in interface com.tonbeller.wcf.component.LifeCycle
Overrides:
initialize in class com.tonbeller.wcf.component.ComponentSupport
Throws:
java.lang.Exception

destroy

public void destroy(javax.servlet.http.HttpSession session)
             throws java.lang.Exception
deferred ctor called once by the creating tag

Specified by:
destroy in interface com.tonbeller.wcf.component.LifeCycle
Overrides:
destroy in class com.tonbeller.wcf.component.ComponentSupport
Throws:
java.lang.Exception

getBookmarkState

public java.lang.Object getBookmarkState(int levelOfDetail)
Specified by:
getBookmarkState in interface com.tonbeller.wcf.bookmarks.Bookmarkable
Overrides:
getBookmarkState in class com.tonbeller.wcf.component.ComponentSupport

setBookmarkState

public void setBookmarkState(java.lang.Object state)
Specified by:
setBookmarkState in interface com.tonbeller.wcf.bookmarks.Bookmarkable
Overrides:
setBookmarkState in class com.tonbeller.wcf.component.ComponentSupport

clickableIterator

public java.util.Iterator clickableIterator()

request

public void request(com.tonbeller.wcf.controller.RequestContext context)
             throws java.lang.Exception
Specified by:
request in interface com.tonbeller.wcf.controller.RequestListener
Overrides:
request in class com.tonbeller.wcf.component.ComponentSupport
Throws:
java.lang.Exception

render

public org.w3c.dom.Document render(com.tonbeller.wcf.controller.RequestContext context)
                            throws java.lang.Exception
main entry point

Specified by:
render in interface com.tonbeller.wcf.component.Renderable
Throws:
java.lang.Exception

updateOlapModel

protected Result updateOlapModel()
                          throws java.lang.Exception
Throws:
java.lang.Exception

elem

public org.w3c.dom.Element elem(java.lang.String name)
utility - creates an element with the given name


append

public org.w3c.dom.Element append(java.lang.String name,
                                  org.w3c.dom.Element parent)
utility - creates an element and appends it


insert

public org.w3c.dom.Element insert(java.lang.String name,
                                  org.w3c.dom.Element parent)
utility - creates an element an inserts it before the first child


cdata

public java.lang.Object cdata(java.lang.String content,
                              org.w3c.dom.Element parent)
utility - creates a CDATA section


getOlapModel

public OlapModel getOlapModel()

addExtension

public void addExtension(TableComponentExtension extension)
registers an extension. Used at creation time before initialize() is called


getExtensions

public java.util.Map getExtensions()
provides access to the extensions thru JSP scripting


isDirty

public boolean isDirty()
true means that render() will create a new DOM


setDirty

public void setDirty(boolean dirty)

modelChanged

public void modelChanged(ModelChangeEvent e)
Description copied from interface: ModelChangeListener
model data have changed, e.g. user has navigated

Specified by:
modelChanged in interface ModelChangeListener

structureChanged

public void structureChanged(ModelChangeEvent e)
Description copied from interface: ModelChangeListener
major change, e.g. extensions added/removed

Specified by:
structureChanged in interface ModelChangeListener

getCellBuilder

public CellBuilder getCellBuilder()
Returns the cellBuilder.

Returns:
CellBuilder

getColumnAxisBuilder

public ColumnAxisBuilder getColumnAxisBuilder()
Returns the columnAxisBuilder.

Returns:
ColumnAxisBuilder

getCornerBuilder

public CornerBuilder getCornerBuilder()
Returns the cornerBuilder.

Returns:
CornerBuilder

getRowAxisBuilder

public RowAxisBuilder getRowAxisBuilder()
Returns the rowAxisBuilder.

Returns:
RowAxisBuilder

getSlicerBuilder

public SlicerBuilder getSlicerBuilder()
Returns the slicerBuilder.

Returns:
SlicerBuilder

setCellBuilder

public void setCellBuilder(CellBuilder cellBuilder)
Sets the cellBuilder.

Parameters:
cellBuilder - The cellBuilder to set

setColumnAxisBuilder

public void setColumnAxisBuilder(ColumnAxisBuilder columnAxisBuilder)
Sets the columnAxisBuilder.

Parameters:
columnAxisBuilder - The columnAxisBuilder to set

setCornerBuilder

public void setCornerBuilder(CornerBuilder cornerBuilder)
Sets the cornerBuilder.

Parameters:
cornerBuilder - The cornerBuilder to set

setRowAxisBuilder

public void setRowAxisBuilder(RowAxisBuilder rowAxisBuilder)
Sets the rowAxisBuilder.

Parameters:
rowAxisBuilder - The rowAxisBuilder to set

setSlicerBuilder

public void setSlicerBuilder(SlicerBuilder slicerBuilder)
Sets the slicerBuilder.

Parameters:
slicerBuilder - The slicerBuilder to set

getResult

public Result getResult()
returns the current result


getDimCount

public int getDimCount()
returns the dimension count of the current result


getRootElement

public org.w3c.dom.Element getRootElement()
returns the root DOM element that is rendered


getRowAxis

public Axis getRowAxis()
returns the row axis or null


getColumnAxis

public Axis getColumnAxis()
returns the column axis or null


getPropertyConfig

public PropertyConfig getPropertyConfig()
returns the property config object that allows to adjust visible properties