Thanks Howard!
Even when didn't understand my explantion ;) your hint for
ClassFactory worked. Before i created the bean class with plain
javassist and so bypassed the tapestry classloader i think. With
ClassFactory it works.
I think i have to take a much deeper look in to the docs then i
thought. ;)
Cheers
Am 20.12.2007 um 20:42 schrieb Howard Lewis Ship:
I'm having trouble getting a handle on what you are trying to
accomplish, and where you have gone wrong. Generally, when creating
entirely new classes, you do this by injecting the @ComponentLayer
ClassFactory service.
On Dec 20, 2007 10:58 AM, Tandel Sascha <[EMAIL PROTECTED]>
wrote:
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
--
Howard M. Lewis Ship
TWD Consulting, Inc.
Creator Apache Tapestry and Apache HiveMind
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]