UICellSetTable, Initial Design

Monday, November 28, 2011

The class UICellSetTable will implement the renderer independent part of the cellSetTable Facelet tag. Extends from UIComponentBase and implements NamingContainer.

It must have three children components, one for each cellSetTable area (column axis, row axis and data cells). This class specializes the processDecodes(), processValidators() and processUpdates() methods to call setCurrentArea to establish de proper area before calling the corresponding method on each children.

This class also specializes getClientId to create area independent identifiers for child controls. It specializes queueEvent to wrap any bubbled up event with a wrapper event identifying the area where the event was produced. Specializes broadcastEvent to unwrap any wrapped event and set the current area before dispatching it.

The classes UICellSetAxis and UICellSetCells will implement the renderer independent part of the children of UICellSetTable: the former will implement the components for both query axis (rows and columns) and the later will implement the table of data cells.

Both classes have a setCellIndex method that parallel the setRowIndex method of the standard component UIData; saves the state of the current cell and sets the cell (i,j)  as the current cell. The meaning of cell depends on the component class:

·         For UICellSetCells it’s the CellSet data cell cs.getCell(Arrays.asList(j,i)), where cs is the CellSet bound to the component.

·         For UICellSetAxis it’s the i-esim member at position j csa.getPositions().get(i).getMembers().get(j) where csa is the CellSetAxis instance bound to the component.

As the UIData component these classes specialize the processDecodes, processValidators and processUpdates to iterate over every cell in its bound data set and call setCellIndex before call the corresponding method on its children.

So, our Facelet sample in the previous post must be slightly modified to fit into this design

<olap:cellSetTable value=”…”>

  <olap:cellSetAxis for=”columns” var=”m”>

    <f:facet name=”header”>





  <olap:cellSetAxis for=”rows” var=”m”>

    <f:facet name=”header”>





  <olap:cellSetCells var=”cell”>




1 comment :

  1. Very Helpful And Nice Posted Article. This Is Really Useful And Nice Information. I Am Impressed By Your Given Post Of Your Blog.
    Thank You Very Much For Great Post.

    esim USA