Hello all,

First of all i'm using Tapestry 5.0.7.

In a project i have to generate beans for use in grid and beanEditor on the fly because the underlying class ist not a bean. The with javassist generated bean simply delegates all calls. To use this bean as source for the grid component i have written a ClassTransformWorker (contributed as "before:Inject*") which generates getter/setter and a custom beanModel. This works fine. Now i want the current row to get stored in a property to add links etc.

I tried to use my generated bean as return type (the setter works fine):

TransformMethodSignature sig =
                    new TransformMethodSignature(Modifier.PRIVATE,
                        "myGeneratedBean",
                        "getCurrentRow", null, null);
transformation.addMethod(sig, "return row;");

This always throws a ClassNotFoundException for myGeneratedBean. But all class loaders (ClassPool.getDefault().get(), Class.forName()) do find this class. Is this a bug in the ClassTransformWorker or am i missing something?

Is there a other solution? I first though TypeCoerceing could solve this but i do not know how to add a coercer at runtime. I'm open for all suggestions ;)

Thanks in advance

Sascha Tandel


Reply via email to