Thanks, but that has the same problem that using delegate: in the page class I can't make this:
@Component private OnePosibleComponentToPut comp1; @Component private OtherPosibleComponentToPut comp2; because apparently you can only inject components that are already present in the template, and i will have many posible components but only one declaration for all that in the template. If i try the last code, T5 will search for a component on the template with id comp1 and another one with id comp2, but there will be only one component. Anyway, it looks like you can't use expantions there... Chris Lewis-5 wrote: > > Perhaps you could try this. In your template, have a component that > grabs it's id from the page like so: > > <div t:id="${componentId}"/> > > I'm not sure if T5 allows expansions here, but you can try this and > maybe a prop: binding. Assuming you're able, add this in your page class: > > public String getComponentId() { > return componentId; > } > > So you have a page property componentId whose value is decided by > whatever logic you'll need. Lastly you'll need to declare your > components within your page class, using @Component annotations - of > course your componentId property would have to match one of these. > > This all hinges on whether or not T5 will allow prop: or expansions in > the t:id parameter, so give it a try. > > sincerely, > chris > > johnowenatala wrote: >> Hi, i have a place in a page where i wanna put a component, but which >> component is desided in runtime (can be from configuration or from >> request >> parameters). >> I tried to do this by putting a delegate component, but i couldn't inject >> in >> runtime an unknowed component in compilation time. >> What do you think i can do? Is this possible? >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-T5--Choosing-components-at-runtime-tp14933806p14934893.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]