You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Louis Meiring <lo...@gmail.com> on 2005/09/20 12:21:44 UTC
contrib:Table heading alignment
Hi there,
I am using the @contrib:Table component in Tapestry 3.0.3 and would like
to align some of the column headings "left", some "right" and some
"center". The best solution that I could come up with so far is to have
the following @Block component in my table:
<span jwcid="dialledNumberColumnHeader@Block">
<div align="left"><span jwcid="@Insert"
value="message:dialledNumber"/></div>
</span>
But obviously with this solution the "sorting" link is not being
generated. Is there an easy way to align your headings and to keep the
sorting link intact?
Kind regards
Louis Meiring
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: contrib:Table heading alignment
Posted by Louis Meiring <lo...@gmail.com>.
I tried to do that but just couldn't get the styling to left or right
align the headings, the outputted HTML has a Table with an
align="center" in. What I basicly did to solve this for me was to copy
the
org.apache.tapestry.contrib.table.components.inserted.SimpleTableColumnComponent's
.html and .jwc and create my own component. I just took out the
align="center" and replaced it with a width="100%" from the component's
.html.
I also had to write my own
org.apache.tapestry.contrib.table.model.ITableRendererSource to return
the correct component and set this source to each of my ITableColumn
classes... I can now easily align the link inside the table with .css.
(Or the css that I know of)
This probably does not make sense to anybody else and does feel a bit
like a "huge" hack , but I am not a .css expert, and I normally do
things the long hard way, before I find the "right" way. ;-)
Dan Adams wrote:
>Take a look at the generated html. You can use css to style the heading
>to get the look you want for each column.
>
>On Tue, 2005-09-20 at 12:21 +0200, Louis Meiring wrote:
>
>
>>Hi there,
>>
>>I am using the @contrib:Table component in Tapestry 3.0.3 and would like
>>to align some of the column headings "left", some "right" and some
>>"center". The best solution that I could come up with so far is to have
>>the following @Block component in my table:
>>
>><span jwcid="dialledNumberColumnHeader@Block">
>> <div align="left"><span jwcid="@Insert"
>>value="message:dialledNumber"/></div>
>></span>
>>
>>But obviously with this solution the "sorting" link is not being
>>generated. Is there an easy way to align your headings and to keep the
>>sorting link intact?
>>
>>Kind regards
>>Louis Meiring
>>
>>---------------------------------------------------------------------
>>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: contrib:Table heading alignment
Posted by Dan Adams <da...@ifactory.com>.
Take a look at the generated html. You can use css to style the heading
to get the look you want for each column.
On Tue, 2005-09-20 at 12:21 +0200, Louis Meiring wrote:
> Hi there,
>
> I am using the @contrib:Table component in Tapestry 3.0.3 and would like
> to align some of the column headings "left", some "right" and some
> "center". The best solution that I could come up with so far is to have
> the following @Block component in my table:
>
> <span jwcid="dialledNumberColumnHeader@Block">
> <div align="left"><span jwcid="@Insert"
> value="message:dialledNumber"/></div>
> </span>
>
> But obviously with this solution the "sorting" link is not being
> generated. Is there an easy way to align your headings and to keep the
> sorting link intact?
>
> Kind regards
> Louis Meiring
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
--
Dan Adams
Software Engineer
Interactive Factory
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org