CellTable column text alignment

970 views
Skip to first unread message

Lukas Herman

unread,
Nov 10, 2010, 11:01:47 AM11/10/10
to Google Web Toolkit
Hello,
is there any way to set text-align property on CellTable column? The
current CellTable code allows only static cellStyle to be applied to
tdClasses.
I would expect an optional Column class cellStyle property, which
would be appended to tdClasses during rendering.

John LaBanca

unread,
Nov 10, 2010, 1:36:59 PM11/10/10
to google-we...@googlegroups.com
Can you use CellTable#addColumnStyleName() to add the text-align property to the col element for the column?

Thanks,
John LaBanca
jlab...@google.com



--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


Lukas Herman

unread,
Nov 11, 2010, 9:11:14 AM11/11/10
to Google Web Toolkit
Thanks for pointing this out.
This adds class name to colgroup col, where only limited subset of CSS
properties is allowed (http://www.w3.org/TR/CSS2/tables.html#columns).
Unfortunately text-align is ignored when set on <COL> element.
Anyway, addColumnStyleName() requires additional index over added
columns. A typical use case for this scenario is: create table
displaying row data from the database, displaying first column is ID
number right aligned, next column is NAME text centered etc..
While CellTable API defines addColumn(Column), specifying additional
style properties on added column would require to maintain additional
column index property to reference currently added column.

From my point of view the column style name is clearly a property of
Column class.

With regards
Lukas Herman

On 10 lis, 19:36, John LaBanca <jlaba...@google.com> wrote:
> Can you use CellTable#addColumnStyleName() to add the text-align property to
> the col element for the column?
>
> Thanks,
> John LaBanca
> jlaba...@google.comOn Wed, Nov 10, 2010 at 11:01 AM, Lukas Herman <herni...@gmail.com> wrote:
> > Hello,
> > is there any way to set text-align property on CellTable column? The
> > current CellTable code allows only static cellStyle to be applied to
> > tdClasses.
> > I would expect an optional Column class cellStyle property, which
> > would be appended to tdClasses during rendering.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-we...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsubs cr...@googlegroups.com>
> > .

Pravin

unread,
Nov 17, 2010, 3:06:26 PM11/17/10
to Google Web Toolkit
Any suggestions on text alignment ?

On Nov 11, 9:11 am, Lukas Herman <herni...@gmail.com> wrote:
> Thanks for pointing this out.
> This adds class name to colgroup col, where only limited subset of CSS
> properties is allowed (http://www.w3.org/TR/CSS2/tables.html#columns).
> Unfortunately text-align is ignored when set on <COL> element.
> Anyway, addColumnStyleName() requires additional index over added
> columns. A typical use case for this scenario is: create table
> displaying row data from the database, displaying firstcolumnis ID
> number right aligned, nextcolumnis NAME text centered etc..
> WhileCellTableAPI defines addColumn(Column), specifying additional
> style properties on addedcolumnwould require to maintain additionalcolumnindex property to reference currently addedcolumn.
>
> From my point of view thecolumnstyle name is clearly a property ofColumnclass.
>
> With regards
> Lukas Herman
>
> On 10 lis, 19:36, John LaBanca <jlaba...@google.com> wrote:
>
>
>
> > Can you useCellTable#addColumnStyleName() to add the text-align property to
> > the col element for thecolumn?
>
> > Thanks,
> > John LaBanca
> > jlaba...@google.comOn Wed, Nov 10, 2010 at 11:01 AM, Lukas Herman <herni...@gmail.com> wrote:
> > > Hello,
> > > is there any way to set text-align property onCellTablecolumn? The
> > > currentCellTablecode allows only static cellStyle to be applied to
> > > tdClasses.
> > > I would expect an optionalColumnclass cellStyle property, which
> > > would be appended to tdClasses during rendering.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Google Web Toolkit" group.
> > > To post to this group, send email to google-we...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsubs cr...@googlegroups.com>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-web-toolkit?hl=en.- Hide quoted text -
>
> - Show quoted text -

Klaus

unread,
Nov 19, 2010, 4:38:39 AM11/19/10
to Google Web Toolkit
We have exactly the same problem. Seems this is not possible; same for
vertical alignment (bottom, middle, top). You can only set one style
for all columns.
> > > >http://groups.google.com/group/google-web-toolkit?hl=en.-Hide quoted text -

John LaBanca

unread,
Nov 19, 2010, 10:34:24 AM11/19/10
to google-we...@googlegroups.com
I created an issue to track this:

I'll try to get it into GWT 2.1.1, but we're coming down to the wire.

Thanks,
John LaBanca
jlab...@google.com


To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages