On Fri, 22 Feb 2013 17:17:10 -0300, mvchris <ch...@mrvoip.com.au> wrote:

Hi Thiago,

Hi!

However, since tidying up and gaining a better understanding, the no
coercion exception only appears on a grid - I made all my pages as similar as possible for this problem since the start of the week to nut it out - so my question is - how do i know my ValueEncoder is registered with tapestry or is passed to the grid - since it clearly exists and has been contribtued?

No every component gets a ValueEncoder automatically from ValueEncoderSource. Even for the ones who do, there may be situations in which ValueEncoderSource isn't enough.

It's as though tapestry can't find it with the grid....and I'm passing it.

Contributing a ValueEncoder to ValueEncoderSource and passing one through a parameter are very different things and maybe you're thinking otherwise. When I ask you if you passed a ValueEncoder to a component, I'm asking about explicitly using the parameter, not contributing to ValueEncoderSource.

Now with the loop component:
Same page class as the last message posted, with this template below, yields cannot cast exception that follows.

Where's the exception? It seems Nabble ate it. By the way, guys, please avoid using Nabble.

So has my ValueEncoder created the coercion between String<->LibraryQueueMemberEvent ?

No. ValueEncoderSource returns a TypeCoercer-backed ValueEncoder when no contributed one is found for the type.

Yet java can't cast between the two for a weird reason?

Cast anything that isn't a String to a String? This isn't expected in Java, a statically typed language, at all.

In one hand (a grid) my value encoder is not recognised, and in the other (a loop) the coercion has been recognised but at some other level java can't
cast between the two?

For the third or else time, have you checked the actual type of the objects returned by your persistence provider? They may be subclasses of your entities.

With regards to the persistence provider, in this case EclipseLink in
Glassfish - I have no idea about returning a subclass.

The session bean method is

Nabble ate it again. :( Anyway, it wouldn't help. You need to get the list and print the class name.

Please print the result of getClass().getName() for each of the

Are you saying you've seen Hibernate return a subclass of
LibraryQueueMemberEvent -

Yes.

and how do you overcome that sort of behaviour?

Explicitly providing a ValueEncoder (i.e through the encoder parameter parameter). I guess you're relying too much on contributions to ValueEncoderSource even when it's clearly not working.

--
Thiago H. de Paula Figueiredo

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

Reply via email to