Re: [T4.1] How to get list of registered components?

2007-11-28 Thread ccmail

Alejandro Scandroli wrote:

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
  



Thanks, currently I've chosen Block/RenderBlock-based solution. But is 
there NO easy way to inject component in purely  programmatical way? 
Without defining it in neither parent's template nor specifiaction XML ?


Regards,
Wojtek

--
Odmienila swoje oblicze a Ty ... ??


http://link.interia.pl/f1c86



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T4.1] How to get list of registered components?

2007-11-27 Thread ccmail

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]



[T4.1] How to get list of registered components?

2007-11-27 Thread ccmail

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?


TIA,

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]



[T 4.1.2] overriding default exception page

2007-07-30 Thread ccmail

Hi all,

I've tried to override default Tapestry as described here 
(http://tapestry.apache.org/tapestry4.1/developmentguide/exceptionpages.html). 
Unfortunately after adding



 


to my hivemodule.xml file I am getting an exception like this:

org.apache.hivemind.ApplicationRuntimeException: Error at 
context:/WEB-INF/hivemodule.xml, line 25, column 66: Infrastructure 
contribution for property 'exceptionPageName' (mode 'null') conflicts with a 
prior contribution (at 
jar:file:/T:/_data/id128.m2.repo/org/apache/tapestry/tapestry-framework/4.1.2/tapestry-framework-4.1.2.jar!/META-INF/tapestry.error.xml,
 line 110, column 59) and has been ignored. [context:/WEB-INF/hivemodule.xml, 
line 25, column 66]

org.apache.hivemind.impl.StrictErrorHandler.error(StrictErrorHandler.java:39)
org.apache.hivemind.impl.ErrorLogImpl.error(ErrorLogImpl.java:40)

org.apache.tapestry.services.impl.InfrastructureImpl.buildMapFromContributions(InfrastructureImpl.java:334)
   ...


What am I doing wrong?

Thanks in advance for any assistance.
Wojtek


---
Ten konkurs jest dla Ciebie ... 
Sprawd¼ >>  http://link.interia.pl/f1b27




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]