You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "F. Da Costa Gomez" <dc...@fixed.com> on 2003/07/24 22:54:47 UTC

ExpressionTableColumn Factory

Hi all,

After dabbling with the table component (disecting the code etc.) I 
thought it would be quite convenient to create sort of an 
ExpressionTableColumn generator/ factory that creates new 
ExpressionTableColumns on the basis of an Object, its header an property 
and uses a Block definition in the HTML spec to provide it with the 
renderer required.

Basically I am thinking about a structure along the following lines:
HTML spec:
<span jwcid="content$">
 ...
 Block definitions 4 each type of column ala the LocaleList example
Using the @ notation for anything Tapestry
</span>

Java code:
public ExpressionTableColumn createAColumn(Object, "header", other 
required stuff) {
  new column
  get the block
  set the renderer
  return the column
}

jwc spec:
Basically defines the relation of the jwc - html and java files
No additional content (yet)

Usage would be like:
On requiring a column (to add to a TableColumnModel) One calls the 
generatot with a create request with the required attributes.
Handed back is the column which is then used in the table.

What I would like to know is whether this is as such possible.
If so I'm of to create it if not I'm not going to bother persuing this 
avenue and move on to another thought.

TIA,
Fermin DCG