You are probably running into the fact that Tapestry rewrites your
page/component classes so that there is only one instance of the class used
across all requests. To do this all of the property accesses are
intercepted and replaced with ThreadLocal values. When you are in
development mode tapestry shadows the values in the actual class itself so
that you can see them in the debugger.

Check out this fixed issue for more details
https://issues.apache.org/jira/browse/TAP5-1208

Have you considered using a Mixin?
http://tapestry.apache.org/component-mixins.html

Or possibly you could write your own class transformer :
http://tawus.wordpress.com/2011/04/21/plastic-property/

Josh

On Aug 1, 2012 12:22 AM, "mem" <memcacher+tapes...@gmail.com> wrote:

> Hello,
>
> hope this Thread is still alive.
> I've used a similar approach to figure out if the label is attached to a
> field which renders a required field. The whole thing is a bit complex as
> we're using JSR303 annotations on the DTO so i've to get the parameter of
> the textField and then evaluate the string. Using reflection i'm checking
> if
> the attribute of the DTO has a NotNull annotation and depending on that i'm
> appending a CSS class which then renders an asterisk.
> Funny thing is that this doesn't work when i'm switching on the Tapestry
> Production Mode. When debugging i found out that all fields in my component
> are null whereas they're the expected objects when not using production
> mode.
> I couldn't figure out why that is, does anyone have an explanation for this
> behavior or any clues where/what to search for?
>
> Thanks in advance.
>
> Matt
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Example-of-overriding-the-default-ValidationDecorator-tp2419072p5714940.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to