You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Mindaugas Genutis <mi...@elinara.ktu.lt> on 2003/08/22 11:17:40 UTC

contrib:Table column header alignment

Hello,

The table column header alignment through CSS is:

.columnsClass table { align: left; width: 100%; }

and it works. However, the "sorting triangle" is displayed in another <TD> 
and there appears a distance between the column title and the sorting 
triangle.

How to put them together? There seems no way to do that - the table is 
always 100% width and the column title and sorting triangle take all the 
space. 

Has anyone done that?

Thanks,

-- 
Kaunas Regional Distance Education Center
Programmer
Phone: +370 674 05232
WWW: http://distance.ktu.lt


RE: contrib:Table column header alignment

Posted by Mind Bridge <mi...@yahoo.com>.
Trying to send this again...

-----Original Message-----
Hi,

	I am not sure you can do what you want using CSS. You should
_theoretically_ be able to do so, but in practice I do not believe it would
work, simply because CSS is not properly supported in the major browsers.

	The current structure of the table headers is far from optimal, but
unfortunately it was pretty much the only one that I had found to work in
the majority of browsers. The handling of td, th, table, and their CSS
styles varies extremely from an implementation to implementation.

	The strategy that was adopted was to allow the columns to define their own
column header appearance. That also should allow you to make the headers
look exactly the way you want them.

	The default implementation is in
org.apache.tapestry.contrib.table.components.inserted.SimpleTableColumnCompo
nent. If you want, have a look at it to see how it works.

	You can substitute the default column header renderer for your own by
creating a TableRendererSource and passing it to setColumnRendererSource()
in your newly created column (similarly to what was described in my previous
email for column value renderers).

	Alternatively, you could also create a subclass of any of the standard
column classes and override the getColumnRenderer() method. I believe the
aggregation method above is better though.

	I don't have a ready example for this at the moment, but I can write one a
bit later if you need it.

Best regards,
-mb




-----Original Message-----
From: Mindaugas Genutis [mailto:mindaugas@elinara.ktu.lt]
Sent: Friday, August 22, 2003 12:18 PM
To: tapestry-user@jakarta.apache.org
Subject: contrib:Table column header alignment



Hello,

The table column header alignment through CSS is:

.columnsClass table { align: left; width: 100%; }

and it works. However, the "sorting triangle" is displayed in another <TD>
and there appears a distance between the column title and the sorting
triangle.

How to put them together? There seems no way to do that - the table is
always 100% width and the column title and sorting triangle take all the
space.

Has anyone done that?

Thanks,

--
Kaunas Regional Distance Education Center
Programmer
Phone: +370 674 05232
WWW: http://distance.ktu.lt


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


RE: contrib:Table column header alignment

Posted by Mind Bridge <mi...@yahoo.com>.
Hi,

	I am not sure you can do what you want using CSS. You should
_theoretically_ be able to do so, but in practice I do not believe it would
work, simply because CSS is not properly supported in the major browsers.

	The current structure of the table headers is far from optimal, but
unfortunately it was pretty much the only one that I had found to work in
the majority of browsers. The handling of td, th, table, and their CSS
styles varies extremely from an implementation to implementation.

	The strategy that was adopted was to allow the columns to define their own
column header appearance. That also should allow you to make the headers
look exactly the way you want them.

	The default implementation is in
org.apache.tapestry.contrib.table.components.inserted.SimpleTableColumnCompo
nent. If you want, have a look at it to see how it works.

	You can substitute the default column header renderer for your own by
creating a TableRendererSource and passing it to setColumnRendererSource()
in your newly created column (similarly to what was described in my previous
email for column value renderers).

	Alternatively, you could also create a subclass of any of the standard
column classes and override the getColumnRenderer() method. I believe the
aggregation method above is better though.

	I don't have a ready example for this at the moment, but I can write one a
bit later if you need it.

Best regards,
-mb




-----Original Message-----
From: Mindaugas Genutis [mailto:mindaugas@elinara.ktu.lt]
Sent: Friday, August 22, 2003 12:18 PM
To: tapestry-user@jakarta.apache.org
Subject: contrib:Table column header alignment



Hello,

The table column header alignment through CSS is:

.columnsClass table { align: left; width: 100%; }

and it works. However, the "sorting triangle" is displayed in another <TD>
and there appears a distance between the column title and the sorting
triangle.

How to put them together? There seems no way to do that - the table is
always 100% width and the column title and sorting triangle take all the
space.

Has anyone done that?

Thanks,

--
Kaunas Regional Distance Education Center
Programmer
Phone: +370 674 05232
WWW: http://distance.ktu.lt


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