You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Drew McAuliffe <dr...@gmail.com> on 2005/02/24 21:33:17 UTC

Easily replace column renderers?

Is there an easy way to plug in column renderers to change the way
column output is displayed in tables? I'm using the TableView
component. It appears to me that the SimpleTableColumnComponent is
responsible for outputting column headers. My problem with that is
that the table it generates is set to align to center, so any styles
you try to apply with different alignments won't work. I realize that
I can use custom blocks but I have a lot of tables in my application
and don't want to have to use blocks for every single one. Also, it
looks like even with custom blocks that it would be difficult to
duplicate the natural sorting features because the block is outside of
the table component and would have to point back into it, through
several layers of component references.

Any ideas? I'm looking into a custom global method that can create a
SimpleTableModel in the same way that it is created within the
TableView component (from a columns string) but that will also let you
specify a column renderer. Am I missing something? Is there something
in the way the component is specified that will make this easier? All
I want to do is make my columns left-justified.

Thanks,

Drew

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org