You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Szemere Szemere <sz...@gmail.com> on 2011/12/20 16:55:59 UTC

Grid now displays public static fields of object

I recently upgraded from 5.2.5 to 5.3, which I must say was very straightforward. :)

A minor issue we've just noticed is, that Grid now shows as columns any public static fields of the objects listed by the grid. Is this by design (a change in spec) or a bug?

The workaround is simple, simply use t:exclude, but i don't see the value in automatically including static fields, as they have the same value for each row!

Szemere

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


Re: Grid now displays public static fields of object

Posted by Howard Lewis Ship <hl...@gmail.com>.
On Tue, Dec 20, 2011 at 7:55 AM, Szemere Szemere
<sz...@gmail.com> wrote:
> I recently upgraded from 5.2.5 to 5.3, which I must say was very straightforward. :)
>
> A minor issue we've just noticed is, that Grid now shows as columns any public static fields of the objects listed by the grid. Is this by design (a change in spec) or a bug?

This was intentional, but perhaps needs to be highlighted better in
the release notes.

>
> The workaround is simple, simply use t:exclude, but i don't see the value in automatically including static fields, as they have the same value for each row!

It is true; perhaps there should be a way for Grid to exclude static
fields; basically, it sees normal properties, public instance fields,
and public static fields as properties.

You can add @NonVisual to the static fields to hide them from the Grid as well.

There's a few important use cases where being able to reference a
public static field is very useful in templates; it is unfortunate
that this causes an annoyance with Grid.

https://issues.apache.org/jira/browse/TAP5-1798

>
> Szemere
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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