Hi These old threads might help: http://www.nabble.com/dynamic-component-injection-tf3845654.html#a11223321 http://www.nabble.com/Question-regarding-Block-RenderBlock-tf2586721.html#a7212396
-- Alejandro Scandroli Amneris: We build process-driven web applications. http://www.amneris.es On Nov 27, 2007 3:24 PM, ccmail <[EMAIL PROTECTED]> wrote: > ccmail wrote: > > Hi, > > > > how can I get list of active components programatically from within > > Tapestry component? What I need to do is to check if a component > > (being a template) with given name exists and use it if so or use some > > default template otherwise. > > > > BTW: is it possible at all? Can I insert ognl within jwcid attribute > > to return custom name of a component? > > To be more specific about a use-case I'm trying to solve... What I need > is to select component template (preferably) or whole component > dynamically depending on a parameter stored in session. How should I > approach this problem? I've already checked that's it impossible to put > OGNL expression into JWCID attribute :-/ > > Let's say that I want to display list of some items but the way of > displaying an entry depends on user-role. I'd like to be able to add new > roles without putting some new @IF into template. The ideal solution > would be to have one component called @MultiRoleEntry having several > templates with names in certain convention reflecting user's role. Like > MultiRoleEntry_DEFAULThtml, MultiRoleEntry_ADMIN.html, > MultiRoleEntry_GUEST.html. If I could hack Tapestry to use certain > template depending on user's role stored in session I would be a happy > man :-) . I could define behaviour in such a way that if there's no > specific template for particular role then DEFAULT would be used, > otherwise that specialized template would come into play. > > Is it possible at all in Tapestry 4.1 programming model? > > I would greatly appreciate any answers > > > With regards, > Wojtek > > ---------------------------------------------------------------------- > "Kup bilet na najlepsze zawody Freestyle Motocross - DIVERSE Night of > the Jumps!" http://link.interia.pl/f1c5f > > > --------------------------------------------------------------------- > 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]