You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jonathan O'Connor <Jo...@xcom.de> on 2004/11/12 14:49:37 UTC

RE: Defining your own table column headers? [auf Viren geprueft]

One of my gripes with table is that the column headers don't have a 
particular style class. This means you can't change the alignment or color 
for the headers.
At least the non-header  cells in a given column have a class="columnName" 
which you can play around with in CSS.

Ciao,
Jonathan O'Connor
XCOM Dublin



"Shawn Church" <sh...@boxity.com> 
12/11/2004 13:36
Please respond to
"Tapestry users" <ta...@jakarta.apache.org>


To
"Tapestry users" <ta...@jakarta.apache.org>
cc

Subject
RE: Defining your own table column headers? [auf Viren geprueft]






Yes, terribly.  I resisted this for a while myself, but contrib:Table is
actually a nice piece of work, and the tradeoff was worthwhile.  You can 
do
a certain amount by specifying styles to apply to certain elements, but I
haven't found a way to alter much beyond that without resorting to the
method I described.

I am by no means an expert with this component, so I hope there are
alternate suggestions to the one I mentioned.

Table seems to be popular enough that eventually, as more people use it 
and
contribute enhancements, I believe it will mature to include some of the
features you mention.

Shawn

-----Original Message-----
From: Andreas Pardeike [mailto:andreas@pardeike.net]
Sent: Thursday, November 11, 2004 11:49 PM
To: Tapestry users
Subject: Re: Defining your own table column headers?


Isn't that one big really ugly hack? If I could wish for a feature of
Tapestry
then I would definitely go for:

- have the ability to define column header html so it's used for all
column
   headers

and also:

- have a way to change the way a cell looks like not only for a
specific column
   but for all columns (maybe using a wildcard before the postfix or
maybe just
   using the postfix without any prefixed column name.

That would give total control over a table without the need to hack it.

Andreas Pardeike

On 12 nov 2004, at 02.49, Shawn Church wrote:

> The easiest way is to provide your own versions of the .html and .jwc
> files.
> Copy all the files from org/apache/tapestry/contrib/table/components
> into
> the same path within your application, and you can change whatever you
> want
> without affecting the implementations.  The simplest way is to just put
> everything into your classes folder (ie -
> WEB-INF/classes/org/apache/tapestry/contrib/table/components).
>
> The only caveat is you may also have to duplicate the corresponding
> java
> source files as well.  I think others have said this shouldn't be
> necessary,
> and I haven't messed with it in a while, but I know this was necessary
> for
> me in the past.  I am not in able to verify at the moment, but I will
> try
> and test it tomorrow and let you know.


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


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



Re: Defining your own table column headers? [auf Viren geprueft]

Posted by Andreas Pardeike <an...@pardeike.net>.
On 12 nov 2004, at 15.11, Mind Bridge wrote:

> Can someone suggest a solution without an inner table that does what is
> needed and works in a wide variety of browsers?
>
> My initial impulse was exactly to find something like that, but I 
> could not
> find a solution that worked correctly everywhere. Different products
> interpreted CSS and other technologies in rather different ways.
>
> If someone can suggest a proper solution, I will incorporate it 
> immediately.

I use this:

<th class="someclass">
	COLUMNTITLE<img src="sortup.gif" class="sorticon">
</th>

and the corresponding css (three alternative versions which the user 
can supply):

// placing the icon right after the title
..sorticon
{
}

// placing the icon in front of the title
..sorticon
{
	float: left;
}

// placing the icon at the end of the cell right aligned
..sorticon
{
	float: right;
}

That would give pretty good freedom for everyone. If you don't like 
this,
you could at least tweak the current code so it looks like this:

<th class="some_specific_header_class">
	<table cellspacing="0" cellpadding="0" border="0">
		<tr>
			<td class="columntitle">COLUMNTITLE</td>
			<td class="columnsorticon"><img src=".."></td>
		</tr>
	</table>
</th>

As you may notice I have taken away the center specifications and made
it possible to address the generic td's with external styles by giving
them some class (the later is easy to fix by the use of td + td in css).

As a result one could use the following styles

tableclass th table {}
tableclass th table tr {}
tableclass th table tr td.columntitle {}
tableclass th table tr td.columnsorticon {}
tableclass th table tr td.columnsorticon img {}
tableclass th. some_specific_header_class table tr td {}
etc...

which gives you ultimate control about alignment etc (still you cannot
influence the order of title and icon but that's why I prefer the first
solution at the top of this email.

I could do all this in the tapestry source but I feel that this isn't a
good idea...

Andreas Pardeike


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


RE: Defining your own table column headers? [auf Viren geprueft]

Posted by Mind Bridge <mi...@yahoo.com>.
> What really bothers me is the inner table of the th tag. Besides being
> unneccessary it is not even XHTML conform...

Can someone suggest a solution without an inner table that does what is
needed and works in a wide variety of browsers?

My initial impulse was exactly to find something like that, but I could not
find a solution that worked correctly everywhere. Different products
interpreted CSS and other technologies in rather different ways.

If someone can suggest a proper solution, I will incorporate it immediately.


-----Original Message-----
From: Markus Wiederkehr [mailto:markus.wiederkehr@gmail.com]
Sent: Friday, November 12, 2004 3:58 PM
To: Tapestry users
Subject: Re: Defining your own table column headers? [auf Viren
geprueft]


On Fri, 12 Nov 2004 13:49:37 +0000, Jonathan O'Connor
<jo...@xcom.de> wrote:
> One of my gripes with table is that the column headers don't have a
> particular style class. This means you can't change the alignment or color
> for the headers.
> At least the non-header  cells in a given column have a class="columnName"
> which you can play around with in CSS.

I don't agree. When I define a column with the id "description" I get
the following HTML output:

<th class="descriptionColumnHeader">
	<table border=0 cellspacing=0 cellpadding=0 align="center">
		...
	</table>
</th>
...
<td class="descriptionColumnValue">
...
</td>

So you can apply styles to th.descriptionColumnHeader and
td.descriptionColumnValue. To gain even more control over the layout
you can use an EvenOdd bean to mark even and odd table rows.

What really bothers me is the inner table of the th tag. Besides being
unneccessary it is not even XHTML conform...


Markus

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

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.794 / Virus Database: 538 - Release Date: 11/10/2004

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.794 / Virus Database: 538 - Release Date: 11/10/2004


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


Re: Defining your own table column headers? [auf Viren geprueft]

Posted by Markus Wiederkehr <ma...@gmail.com>.
On Fri, 12 Nov 2004 13:49:37 +0000, Jonathan O'Connor
<jo...@xcom.de> wrote:
> One of my gripes with table is that the column headers don't have a
> particular style class. This means you can't change the alignment or color
> for the headers.
> At least the non-header  cells in a given column have a class="columnName"
> which you can play around with in CSS.

I don't agree. When I define a column with the id "description" I get
the following HTML output:

<th class="descriptionColumnHeader">
	<table border=0 cellspacing=0 cellpadding=0 align="center">
		...
	</table>
</th>
...
<td class="descriptionColumnValue">
...
</td>

So you can apply styles to th.descriptionColumnHeader and
td.descriptionColumnValue. To gain even more control over the layout
you can use an EvenOdd bean to mark even and odd table rows.

What really bothers me is the inner table of the th tag. Besides being
unneccessary it is not even XHTML conform...


Markus

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