You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Craig Ziesman <cz...@mac.com> on 2003/11/14 18:07:44 UTC

TableView and TableColumns

Hello. This is my first post to the group.

I am trying to build a TableView component, but I want to control the layout of the column headings. I tried passing the "element" binding to my TableColumns component, but nothing changed in the display. Upon further investigation, I found that the <TH> element that gets rendered ultimately wraps a <TABLE align="center"> tag way down in the guts of SimpleTableColumnFormComponent.html, which doesn't work because I want my headings left-justified.

Before I starting hacking through the underbrush to make this work, has anybody run into this before? If not, any suggestions on how to achieve what I want? I saw the getColumnRender() method in ITableColumn, but it's not clear to me how to subclass these components when all I want to do is change the .html file associated with the component.

Thanks,
Craig Z.

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


Re: TableView and TableColumns

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Friday, November 14, 2003, at 12:07  PM, Craig Ziesman wrote:
> Hello. This is my first post to the group.
>
> I am trying to build a TableView component, but I want to control the 
> layout of the column headings. I tried passing the "element" binding 
> to my TableColumns component, but nothing changed in the display. Upon 
> further investigation, I found that the <TH> element that gets 
> rendered ultimately wraps a <TABLE align="center"> tag way down in the 
> guts of SimpleTableColumnFormComponent.html, which doesn't work 
> because I want my headings left-justified.
>
> Before I starting hacking through the underbrush to make this work, 
> has anybody run into this before? If not, any suggestions on how to 
> achieve what I want? I saw the getColumnRender() method in 
> ITableColumn, but it's not clear to me how to subclass these 
> components when all I want to do is change the .html file associated 
> with the component.

I don't have our code immediately handy, but I disliked the nested 
tables in the headers too (but be aware that the sorting graphic 
appears there too) and overrode the templates used.  Simply copy the 
existing templates to your WEB-INF/classes directory in the same 
directory structure that they live within the contrib JAR and then 
tweak them how you like.  You can do this without touching any Java 
code or anything else.  We've overridden a few of these templates like 
this and it works great.

You can, if you need more programatic control, change the column 
renderer by hacking underneath.

	Erik


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