Best bet here is probably to put your component into a block, then
render the block (or else grab the component from the block and
render the component).
Check out the "delegate" component, for example.
Robert
On Aug 17, 2007, at 8/179:26 AM , David Avenante wrote:
Hi,
I'm very disappointed. After some investigation it seem it's not
possible to
instantiate a component in a page on the fly in T5.
I have a page and his template, my component is not defined on the
template
but on a specific event, I want to create and instantiate this
component.
I need something like this :
@Inject
private ComponentClassTransformer componentClassTransformer;
private StreamResponse myEvent() {
Component component =
componentClassTransformer.createInstantiator(
My.class).newInstance( BANGGGG !!!!);
....
}
I can find a instance of InternalComponentResources. This class
can't be
injected as service.
The inspection of the Tapestry code watch me that component
creation is very
close coupled with Page instantiation
Is it possible to instantiate a component on the fly ?
Thanks for any informations.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]