Something like this should work I think.
public void renderPage(IMarkupWriter writer, IRequestCycle cycle) { IComponent comp = null; if (choice == foo) comp = cycle.getPage().getComponent("foo"); else if (choice == bar) comp = cycle.getPage().getComponent("foo"); if (comp != null) comp.render(writer,cycle); } > -----Original Message----- > From: Edward Scanzano [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 19, 2005 9:50 PM > To: tapestry-user > Subject: Dynamic component selection > > Hi all, > > I have a situtation where I need to include a > component into a page, however, which component it is > will be selected at runtime in the .java file. How do > I do this? > > Thanks > E > > > > --------------------------------------------------------------------- > 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]