Page pool monitoring
Hello, Is there a way to monitor the size of the various page pool caches? Carl - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Grid sort images override
You could make images with the same name inside the same folder structure inside your code. Your code will be on the classpath first (especially if using Maven) and therefore will override. There may be a less hacky way though! Blšták Peter wrote: Hi Is there any suggested way how to change default images used by GridColumns to indicate sort column state. I would like to use different GIU design. In other words, I need to override usage of these images: org/apache/tapestry5/corelib/components/sortable.png org/apache/tapestry5/corelib/components/sort-asc.png org/apache/tapestry5/corelib/components/sort-desc.png Thanks P. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [Tapestry Central] Next Steps for Tapestry
Agreed: the main thing Tapestry is lacking is a book that explains not just the basics but also concepts that it takes months of working with Tapestry to discover. Things like shadow builders and so on. I don't care who writes one as long as there's a definitive guide! jose luis sanchez wrote: Book ! Book ! Book ! El 07/11/2009, a las 19:11, Howard escribió: I've been consciously letting Tapestry 5.1 sit and stabilize for a while ... a time that's stretched a few months longer than I initially intended. This is due to a number of factors: my return to independent consulting, my desire to write a definitive Tapestry 5 book, and preparations for many trips and speaking engagements. All of these factors have worked on each other: I've been improving and extending my Tapestry Workshop training materials which can be quite time consuming. I've also (over the last several months) been on the road several times, talking about Tapestry or doing Tapestry training. I do want to write a book on Tapestry but if I start writing 5.2 code, I know I'll be sucked right in ... lots of code (that darn Spring Web Flow integration for sure this time) and bug fixes. In addition, I've had an embarassment of riches: two main clients, one regular part time, and the other requesting (but not always getting) all my remaining time. I also have additional clients and training engagements waiting in the wings. I simply have a lot of draws on my time. As usual, working on real-world projects lets me experience the rough edges of Tapestry and fills me with ideas on how to address those in the next release ... often by splitting up Tapestry services into smaller, more easily overridden chunks and carefully moving internal services out into the public APIs. Finally, I've been very pleased by the fact that as I've stepped back temporarily from my normal stream of commits, the other Tapestry developers have stepped in and filled the gap. There's been quite a bit of activity especially from Igor that I've barely had a chance to keep up on. So the question is: do I wait and see if time opens up in Q1 to actually start on a T5 book ... or do I jump into 5.2 coding and leave books to others? It's much, much easier to write code than to write a book ... a book is a large amount of concentrated effort. It's very hard to accomplish anything on a book using an hour here or an evening there ... whereas Tapestry's code base lends itself to that kind of effort quite nicely. -- Posted By Howard to Tapestry Central at 11/07/2009 10:11:00 AM - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5 Random Issue
I have no idea. My vague guess is that the browser isn't unzipping the GZipped content for some reason - perhaps the content type is wrong? That wouldn't explain why it was intermittent though. Perhaps pipe the output through gunzip to see if it decompresses? Norman Franke wrote: Periodically, users get pages full of unicode or something like this the attached. It displays as boxed question marks in safari. This happens in both Safari and Firefox. Refreshing generally displays the page properly. What causes this? It's using Tapestry 5.1.0.5 and Tomcat. ���v7���)bxf��V $��ՃK�n�$��d�W��`2D��̤�B��5t^���vd��X��h�]e�*�Jf`_�occOӋ�U���xX�n?L���z���V~�����.�/vg�n0�ڪ�l�[[ggg�gjs9�z�|�-���l�?��?�߸w�p4�����ⱍ{�{�6���q;k��x4kG�o7f���}�bp�L�� s5�ڟ���˯���I�^�� 45�f��^��ų�xz�f�b�H���x�̺�;�nG�q���Q{~6��O�k�; Norman Franke Answering Service for Directors, Inc. www.myasd.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: ClasspathResource and performance
Also on there is the tapestry.file-check-interval which specifies how long Tapestry should wait before rechecking for changes. In production, I set that to 1y because the files aren't going to change. However I don't know if this affects asset loading or not, but I *think* that once the first hit returns null it won't keep checking? It's worth a try and it certainly won't harm. Ulrich Stärk wrote: Doesn't limiting the supported locales to just the ones you support help? http://tapestry.apache.org/tapestry5.0/guide/conf.html Uli Am 29.10.2009 19:39 schrieb Christiansen Merel: Hello out there, We're running a quite busy website with tapestry 5.0.18 and we're hitting a performance problem with the ClasspathResource class. We're using classpath asset and none of them is localised. For each hit on a page using a classpath asset, we end having 2 missed queries on the ClassLoader for potential localized version of the asset. It does not really slow down the application throughput but we end with an __huge__ CPU consumption. The javacore stack shows numerous threads scanning jar files: 3XMTHREADINFO [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' (TID:0x3700E400, sys_thread_t:0x3393D030, state:B, native ID:0x009AB0B3) prio=5 4XESTACKTRACE at java/util/zip/ZipFile.getEntry(ZipFile.java:287(Compiled Code)) 4XESTACKTRACE at java/util/jar/JarFile.getEntry(JarFile.java:283(Compiled Code)) 4XESTACKTRACE at java/util/jar/JarFile.getJarEntry(JarFile.java:266(Compiled Code)) 4XESTACKTRACE at sun/misc/URLClassPath$JarLoader.getResource(URLClassPath.java:949(Compiled Code)) 4XESTACKTRACE at sun/misc/URLClassPath$JarLoader.findResource(URLClassPath.java:938(Compiled Code)) 4XESTACKTRACE at sun/misc/URLClassPath.findResource(URLClassPath.java:299(Compiled Code)) 4XESTACKTRACE at java/net/URLClassLoader$3.run(URLClassLoader.java:784(Compiled Code)) 4XESTACKTRACE at java/security/AccessController.doPrivileged(AccessController.java:219) 4XESTACKTRACE at java/net/URLClassLoader.findResource(URLClassLoader.java:781(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:420(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:415(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:415(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResourceInternal(GenericClassLoader.java:170(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResource(GenericClassLoader.java:187(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/FilteringClassLoader.getResourceInternal(FilteringClassLoader.java:89(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResourceInternal(GenericClassLoader.java:155(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResource(GenericClassLoader.java:187(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:415(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResource(GenericClassLoader.java:190(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/ChangeAwareClassLoader.getResource(ChangeAwareClassLoader.java:118(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/ioc/internal/util/ClasspathResource.toURL(ClasspathResource.java:59(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/ioc/internal/util/AbstractResource.exists(AbstractResource.java:137(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/ioc/internal/util/AbstractResource.forLocale(AbstractResource.java:100(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/internal/services/AssetSourceImpl.findRelativeAsset(AssetSourceImpl.java:99(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/internal/services/AssetSourceImpl.getAsset(AssetSourceImpl.java:93(Compiled Code)) 4XESTACKTRACE at $AssetSource_124955c0e4c.getAsset($AssetSource_124955c0e4c.java(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/internal/transform/AbstractIncludeAssetWorker$1.perform(AbstractIncludeAssetWorker.java:79(Compiled Code)) 4XESTACKTRACE at fr/poleemploi/d2i/tapestry/navigation/unifiee/components/Bandeau.setupRender(Bandeau.java(Compiled Code)) The stack comes from weblogic/aix run but the problem is the same on other platforms as well. Does anyone has ever experienced such problems ? The performance penalty seems to be located in the AbstractResource.forLocale() method, especially the potential.exists() call. This part of code haven't evolved with the 5.1.x version. Does anybody have any idea on how to get around this problem
End-of-request actions
Hello, Is there a service or chain or something that I can contribute to do perform end-of-request actions? I have an advert server which I use to get adverts using spot IDs. I want to call something once all processing has finished to check that every advert has been used up. Carl - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: End-of-request actions
Brilliant, thanks! - Original Message - From: cordenier christophe christophe.corden...@gmail.com To: Tapestry users users@tapestry.apache.org Sent: Tuesday, 27 October, 2009 4:12:24 PM Subject: Re: End-of-request actions Hello Have a look at EndOfRequestEventHub Regards, Christophe. 2009/10/27 Carl Crowder carl.crow...@taptu.com Hello, Is there a service or chain or something that I can contribute to do perform end-of-request actions? I have an advert server which I use to get adverts using spot IDs. I want to call something once all processing has finished to check that every advert has been used up. Carl - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: javascript assets
There's a configuration variable you can set: tapestry.combine-scripts See http://tapestry.apache.org/tapestry5.1/guide/conf.html Argo Vilberg wrote: hi, In tapestry 5.1.0.5 javascript are combained together in one file: src= /digileping/assets/virtual/H4sIAJXQUWrDMAyAYTPY065RyhjUTrdlawc9S3AcOVOb2MZSRtMz7Wq7w$002bJAAn1J6ZsR3y8b$002f$002f6Jx4sQD1II8SRelCYCJkUmYmBtusZ3pHK5lZnMVYiePfcB5JGEXLZX0$002bSflz1YC4ZHuZok6wDEsZ$002fRNEhqPamy0eZUYqxmNk$002bS29zctmmBSNcwXv41cR2CejfG7t8$002bqizf63L3OvxAYupIypygQvZxPqT2877WeGexTuFuMTS$002bDd6B47GGH4g9f6Mby8MdJUJwtcVzwdhAWd9$002bcYtndKQuw4qiC5VmiMW2yIbwH4zpiYQ3AgAA.jshttps://www.digileping.ee/digileping/assets/virtual/H4sIAJXQUWrDMAyAYTPY065RyhjUTrdlawc9S3AcOVOb2MZSRtMz7Wq7w$002bJAAn1J6ZsR3y8b$002f$002f6Jx4sQD1II8SRelCYCJkUmYmBtusZ3pHK5lZnMVYiePfcB5JGEXLZX0$002bSflz1YC4ZHuZok6wDEsZ$002fRNEhqPamy0eZUYqxmNk$002bS29zctmmBSNcwXv41cR2CejfG7t8$002bqizf63L3OvxAYupIypygQvZxPqT2877WeGexTuFuMTS$002bDd6B47GGH4g9f6Mby8MdJUJwtcVzwdhAWd9$002bcYtndKQuw4qiC5VmiMW2yIbwH4zpiYQ3AgAA.js But in 5.0.14 was: Tapestry Framework (version 5.1.0.5) name=generator/metascript t/javascript/scriptscript src= /digileping/assets/app/62d7a796360dcacf/pages/js/ckeditor/ckeditor.jshttps://localhost/digileping/assets/app/62d7a796360dcacf/pages/js/ckeditor/ckeditor.js type=text/javascript/scriptscript src= /digileping/assets/app/62d7a796360dcacf/pages/js/ckeditorconfig.jshttps://localhost/digileping/assets/app/62d7a796360dcacf/pages/js/ckeditorconfig.js type=text/javascript/scriptscript src= /digileping/assets/app/62d7a796360dcacf/components/js/everything.jshttps://localhost/digileping/assets/app/62d7a796360dcacf/components/js/everything.js type=text/javascript/scriptscript src= /digileping/assets/app/62d7a796360dcacf/components/js/iepngfix_tilebg.jshttps://localhost/digileping/assets/app/62d7a796360dcacf/components/js/iepngfix_tilebg.js type=text/javascript/scriptscript src= /digileping/assets/app/62d7a796360dcacf/mixins/zone_updater_1_0.jshttps://localhost/digileping/assets/app/62d7a796360dcacf/mixins/zone_updater_1_0.js Are there any parameter to tell tapestry leave javascript like in 5.0.14 ? Argo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Context encoding question ....
We're using Tapestry where I work on my recommendation and one question that keeps coming up is this. Can you clarify browser compatibility for me? It's not clear from the Javadocs and I'd like to be able to answer my colleagues satisfactorily :) Howard Lewis Ship wrote: Search engine browser compatibility, plus shorter, more readable, more restful URLs. On Thu, Oct 1, 2009 at 1:38 PM, Gunnar Eketrapp gunnar.eketr...@gmail.com wrote: Hi ! I'm just a little but curious why T5 has choosen to encode the context in the url path and not as url parameters. What is the benifit by doing it this way? Thanks in advance, Gunnar Eketrapp - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Ajax, call javascript function from pagedetached t5
Simply, no, as Thiago previously mentioned. There's no way to execute client side code from the server. cuartz wrote: I want to know if its possible to call a javascript function from the pageDetached() method in tapestry 5 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Securing a the form submission, but no the page.
Perhaps you could move common stuff into a base class and have two pages - the first form page, and the submission page. Set the action to point at the secure one. There's probably a better way though. Richard Bolkey wrote: Hi all, Been trying to figure out the best way to hook up a means to secure the action of a form without securing the page itself (weird requirement I know, but alas). Overriding RequestSecurityManager doesn't seem to be the right approach because getBaseUrl() lacks any context other than the active page name. Referencing a Form in an injected page containing the Secure annotation won't help because the link is generated for the active page and not the containing page. UrlRewriterRules don't seem to work because I don't have access to anything before the server name (can't set https://). Any suggestions or other approaches? Am I missing something? Thanks, Rick - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Comment in .tml file
Without dealing with comments you can't use conditional stylesheets. Xuan Tran Le wrote: I think that the Tapestry should not take care of the comments, it should ignore what reside in the comment notation. Because in the comment there is just the comment for the code of developer or the copyright in the header. There is nothing to be parsed here. On Wed, Sep 9, 2009 at 4:51 PM, Komiwes Robin robin.komi...@atosorigin.comwrote: Because if you do so, you use the XML comment notation and Tapestry will be unable to fully parse your template file. Then, errors can occurs if your java classes reffer to elements in the template (which are commented). -Message d'origine- De : Xuan Tran Le [mailto:lexuanttk...@gmail.com] Envoyé : mercredi 9 septembre 2009 11:34 À : Tapestry users Objet : Re: Comment in .tml file Thanks for Inge Solvoll. Is there any better way to do this? By the way, I found that in tapestry4 the !-- and -- syns apply good for this situation. I wonder why they can't apply for tapestry5. On Wed, Sep 9, 2009 at 1:07 PM, Inge Solvoll inge.tapes...@gmail.com wrote: You could use t:remove, but it's not too pretty either... On Wed, Sep 9, 2009 at 7:35 AM, Xuan Tran Le lexuanttk...@gmail.com wrote: I want to comment in .tml file and all the comments will not be displayed when we view page source (on browser). Anybody help me... Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis. This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Supporting multiple devices, eg. browser + mobile + TV
Thiago H. de Paula Figueiredo wrote: Em Wed, 02 Sep 2009 18:10:56 -0300, Alfie Kirkpatrick alfie.kirkpatr...@ioko.com escreveu: Am wondering about ways to support this scenario cleanly in T5, where visual layout is very different per device but the page classes could be quite similar (clearly this depends to a large extent on whether devices have radically different page flows and layouts). CSS solves most of the solution. Take a look at media queries (http://www.w3.org/TR/css3-mediaqueries/). Regarding Tapestry itself, for issues that can't be solved by using CSS itself, I would take advantage of the layout component pattern (some parts of the template could be omitted or replaced) and having a service and a component to tell me what kind of device did the request. This really isn't true unless you only support more modern phones. We do a similar thing and we've steered away from Tapestry to support lower end phones because they all have their own crap browser with their own stupid CSS misinterpretations. We have a list as long as your arm of idiotic things blackberry browsers do. I once tried to work out how best to do this. My main ideas were something similar to localisation where we had a Home_nokia.tml type thing. Also, overriding MarkupWriter to write DIVs with a certain class instead of P tags. I still believe Tapestry is the best framework to do it in based on the few I've encountered. It's something that is so fiddly for the crappier phones that however you choose to do it will be a pain in the arse. Alfie: let me know how you get on. We may be trying something similar in the future. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: How to use multiple t:body/ tags in single component.
See the bit about template inheritance here: http://tapestry.apache.org/tapestry5/guide/templates.html Prajesh Kacha wrote: Hello, In my web page I am using one t:body/ tag, but I need multiple t:body/ tag to get replace. To do that is there any mechanism like specifying Id or some name to the components. I search a lot but I didn't find. I don't know what to do. Please can any one help me. Thank in advance. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: service contribution conflict after updating from 5.0.17 to 5.1.0.5
Could it be that you have the older version of Tapestry still on the classpath? Or some other Tapestry module that automatically adds itself? Britske wrote: Also: I should have added that I'm not contributing anything remotely related to AppModule.java Britske wrote: Hi all, I'm in the process of updating from 5.0.17 to the latest stable release: 5.1.0.5 Most of the process is pretty smooth except the following: on page X I have an actionlink defined which updates a zone. (see snippets below) . The problem is thaty I'm getting a 'conflicting contribution error' when clicking the actionlink thus trying to populate the zone. Everything worked fine in 5.0.17. Anyone knows what's wrong? relevant info below. thanks, Geert-Jan .tml -- zoek bestemming div t:type=zone t:id=locationhelpZone t:visible=false id=locationhelpZone class=mff style=display:none; # close div class=popcont t-zone-update/ /div relevant snippet of class X: Object onActionFromLocationhelp(){ return getResources().getComponent().getComponentResources().getEmbeddedComponent (locationHelper); } error: (enormous stacktrace, only showing the root-cause. BTW: I couldn't find any classes of my own that were referenced in the stacktrace) Caused by: java.lang.IllegalArgumentException: Service contribution (to service 'AjaxComponentEventResultProcessor') conflicts with existing contribution (by org.apache.tapestry.commons.TapestryCommonsModule.contributeAjaxComponentEventResultProcessor(MappedConfiguration, ObjectLocator, Response) (at TapestryCommonsModule.java:127)). at org.apache.tapestry5.ioc.internal.ValidatingMappedConfigurationWrapper.add(ValidatingMappedConfigurationWrapper.java:83) at org.apache.tapestry5.ioc.internal.ValidatingMappedConfigurationWrapper.addInstance(ValidatingMappedConfigurationWrapper.java:115) at org.apache.tapestry5.services.TapestryModule.contributeAjaxComponentEventResultProcessor(TapestryModule.java:1535) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.tapestry5.ioc.internal.ContributionDefImpl.invokeMethod(ContributionDefImpl.java:110) ... 114 more - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5.1] Decorating Spring Beans
I want to decorate a service provided in my Spring application context but it isn't happening, because SpringBeanServiceDef returns true for isPreventDecoration(). Why can't the Spring services be decorated? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: 404 Pages Exception
What happens if you visit the page you designated to handle errors directly? If you that it'd help work out if it's related to the error handling procedure or due to something else. Davor Miku wrote: Hi! I've followed http://wiki.apache.org/tapestry/Tapestry5HowToUseTapestryForCustomErrorPages, and I'm receiving this exception : HTTP Status 500 - -- *type* Exception report *message* *description* *The server encountered an internal error () that prevented it from fulfilling this request.* *exception* java.lang.RuntimeException: Exception constructing service 'RememberMeServices': Error invoking service builder method nu.localhost.tapestry5.springsecurity.services.SecurityModule.build(UserDetailsService, String) (at SecurityModule.java:303) (for service 'RememberMeServices'): No service implements the interface org.springframework.security.userdetails.UserDetailsService. org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:75) $RememberMeServices_121266c86ed.delegate($RememberMeServices_121266c86ed.java) $RememberMeServices_121266c86ed.autoLogin($RememberMeServices_121266c86ed.java) org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:74) org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) nu.localhost.tapestry5.springsecurity.services.internal.HttpServletRequestFilterWrapper.service(HttpServletRequestFilterWrapper.java:52) $HttpServletRequestFilter_121266c870d.service($HttpServletRequestFilter_121266c870d.java) $HttpServletRequestHandler_121266c8714.service($HttpServletRequestHandler_121266c8714.java) nu.localhost.tapestry5.springsecurity.services.internal.HttpServletRequestFilterWrapper$1.doFilter(HttpServletRequestFilterWrapper.java:56) org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:271) org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) nu.localhost.tapestry5.springsecurity.services.internal.HttpServletRequestFilterWrapper.service(HttpServletRequestFilterWrapper.java:52) $HttpServletRequestFilter_121266c870c.service($HttpServletRequestFilter_121266c870c.java) $HttpServletRequestHandler_121266c8714.service($HttpServletRequestHandler_121266c8714.java) nu.localhost.tapestry5.springsecurity.services.internal.HttpServletRequestFilterWrapper$1.doFilter(HttpServletRequestFilterWrapper.java:56) org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235) org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) nu.localhost.tapestry5.springsecurity.services.internal.HttpServletRequestFilterWrapper.service(HttpServletRequestFilterWrapper.java:52) $HttpServletRequestFilter_121266c870b.service($HttpServletRequestFilter_121266c870b.java) $HttpServletRequestHandler_121266c8714.service($HttpServletRequestHandler_121266c8714.java) $HttpServletRequestHandler_121266c870a.service($HttpServletRequestHandler_121266c870a.java) org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:179) *root cause* java.lang.RuntimeException: Error invoking service builder method nu.localhost.tapestry5.springsecurity.services.SecurityModule.build(UserDetailsService, String) (at SecurityModule.java:303) (for service 'RememberMeServices'): No service implements the interface org.springframework.security.userdetails.UserDetailsService. org.apache.tapestry5.ioc.internal.ServiceBuilderMethodInvoker.createObject(ServiceBuilderMethodInvoker.java:87) org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45) org.apache.tapestry5.ioc.internal.InvokableToRunnable.run(InvokableToRunnable.java:36) org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationTrackerImpl.java:48) org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:89) org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68) org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:898) org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49) org.apache.tapestry5.ioc.internal.SingletonServiceLifecycle.createService(SingletonServiceLifecycle.java:29) org.apache.tapestry5.ioc.internal.LifecycleWrappedServiceCreator.createObject(LifecycleWrappedServiceCreator.java:52) org.apache.tapestry5.ioc.internal.InterceptorStackBuilder.createObject(InterceptorStackBuilder.java:56)
Re: T5: Passing named/structured-type params in URLs?
I did actually try writing something like this a while ago. The problem is that you need to specify more than just the name of the parameter, you need to know which component it's part of. I ended up with urls like: /page?component1.component2.param=somevaluecomponent1.component3.param2=somevalue So as you can see, they quickly become very large. You could mandate that only top-level components (ie, pages) can use that persistence strategy, but that seems to be counter-intuitive. I toyed with the idea of mapping those names to some smaller IDs - a service which simply converts p1 to component1.component2.param so you could have urls looking like: /page?p1=somevaluep2=somevalue The problem then is it's hard to work out what the params actually are for the user/developer. Also, how do you populate that map to start with? You'd have to load each page and component class at startup. I didn't ever finish this code as I worked out how to do what I wanted with vanilla PageActicationContext in the end. Robert Zeigler wrote: That should work. I think it could be interesting, though, if tapestry provided an additional persistence mechanism, ala: @Persist(PersistenceConstants.QUERY_PARAMETER) private String p; @Persist(PersistenceConstants.QUERY_PARAMETR) private Integer irn; which would then take the values in p and irn and stash them in the url, like: p=valueEncodedValueirn=valueEncodedValue Obviously this wouldn't be appropriate to use everywhere; if you're concerned about users tampering with URLs, you'd want to avoid it. But in cases like that presented below, where you expressly want users to be able to muck about with parameters, it would be useful. Note that this is similar to the current client-side persistence mechanism, except that mechanism a) rolls all persisted values into a single parameter and b) base64 encodes the parameter. As long as you've got the basic mechanism for doing the above, you could translate it into a pretty url via url rewriting without too much trouble. Thoughts? Robert On May 8, 2009, at 5/83:59 PM , Thiago H. de Paula Figueiredo wrote: Em Fri, 08 May 2009 17:39:07 -0300, Andy Buckley andy.buck...@durham.ac.uk escreveu: So, is there a Tapestry meachnism for doing something like this? I can do it right now, but I'd rather not have to fight the system. I would expect Tapestry to do it a bit prettier than what I've shown, maybe *something* like .../view/irn/12349876/d/1,2,4 (yes, there are issues with telling what's a param name and what's a value... I just mean this schematically) But right now I don't even know where to start looking! Help, please!? ;) Just use a List as the activation context value. For each named parameter one want, add the name first, the value second. The above URL would be constructed by Tapestry if you returned a List populated like this: List list = new ArrayList(); list.add(irn); list.add(1245569); list.add(d); list.add(1,2,4); Then, declare a onActivate(EventContext context) method and reconstruct the pairs: for (int i = 0; i context.getCount() / 2; i++) { String name = context.get(String.class, i * 2); String value = context.get(String.class, i * 2 + 1) // instead of String, you could use any type here } I have not tested this code, but I guess you get the idea. ;) -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: What is NOT beautiful about Tapestry?
Discovery of it's parts. Franky the documentation is lacking and even with reading the mailing list, reading the howtos wiki, buying the Tapestry 5 book and working with it for over a year I still come across things I never knew existed that would have solved a problem I've had. I often spend ages writing something myself after searching for a solution. What's beautiful about Tapestry? That almost every problem has a simple solution built in. What's not beautiful about Tapestry? That I generally find these solutions by accident, and way after I've written my own! Lots of things are obvious and easy to understand once you know what they are but it's learning what they are that is the problem. I've been waxing lyrical about Tapestry where I work and while the developers who tried it love it, their main gripe is always that it's difficult to understand what it can do. The cookbook is the right idea but it's only got 5 entries right now. It needs to be way more comprehensive Inge Solvoll wrote: Hi! I have been reading the beautiful thread and added my opinion about what's great about Tapestry. It's nice to sum up why we all are so excited about this, it obviously makes both us and the creator(s) feel good about ourselves. But for a little while, I challenge us all to stop tapping each others' backs and go into depth about what's not to like about our beloved framework. The most obvious questions that could be asked probably have some very obvious answers. But T5, as I see it, is all about addressing stuff that other frameworks have given up on and create excellent implementations rather than just looking the other way. Difficult and uncomfortable questions should be addressed the same way. So: What are the main reasons that T5 isn't one of the big ones, when we all seem to agree that it is so much better than most other frameworks out there? Why is T5 NOT beautiful? Hope I'm not insulting anyone, I'm a big fan too, I just think this actually could lead to significant insight :) Regards Inge - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Customized error pages, handling of bad values passed to OnActivate()
When tapestry throws an excpetion it gets handled by the exception report page - http://wiki.apache.org/tapestry/Tapestry5ExceptionPage You can override that. For other generic errors such as 404, check out http://wiki.apache.org/tapestry/Tapestry5HowToUseTapestryForCustomErrorPages daniel joyce wrote: Lets say a user bookmarks a path like view/123 This is supposed to allow them to go a tapestry page that will display info on Project 123. ViewProject.java has a onActivate(Integer projectNum) What happens if the user types in view/hshqwueh ? I know Tapestry will balk on trying to convert that string to a Integer. Does tapestry throw an exception? Can I trap it and redirect to an error page? Has the suggestion of easily implmenting custom 505/404/etc pages in Tapestry been implemented? -Daniel - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5 Apache Proxy + SSL
Ok, I found that by decorating the RequestSecurityManager service and overriding getBaseURL(Page page) I was able to fix this. However as RequestSecurityManager is part of the internal package I doubt this is the best solution. I'll use it for now as it works but please let me know if there is a correct way to do this. Carl Crowder wrote: Hi all, I'm running Apache as a proxy for my app. The app runs on port 9080, plain HTTP, while Apache presents it to the outside world as https://host:9443. All my redirects are broken :( I end up at http://host:9443. I am using ProxyPassHost. I'm also doing: public void contributeAlias( ConfigurationAliasContribution? configuration ) { BaseURLSource source = new BaseURLSource() { public String getBaseURL( boolean secure ) { return https://host:9443; } }; configuration.add(AliasContribution.create(BaseURLSource.class, source)); } However this is never called. This used to work a long time ago (when I was using T5.0.13. Has anything changed since then to do with BaseURLSource? The documentation in the version I'm currently using (5.0.18) implies this is still its purpose. Does anyone know what I can do to fix this? Thanks in advance, Carl - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: changing template-extension
Why, out of curiosity? Mario Rabe wrote: Why is it so hard to change the default-template extension? I really want the templates to end with html! The I saw the template-extension is defined as a constant. It is even inlined in classes. ComponentTemplateSource#baseResourceForModel is private so there is no override. Beside that ComponentTemplateSource is final. Similar problems with PageTemplateLocator. So to change the extension from tml to html I have to copy 2 internal classes, change them slightly and override the internal services. Thats not very tapestry in my oppinion. There should be a symbol in the core which defines an alternative extension for templates. If a template could not be found using the default-extension then the alternative extension is checked before loading fails. Code could look like: Resource res = model.getBaseResource().withExtension(InternalConstants.TEMPLATE_EXTENSION); if(res.toURL()!=null){ return res; } return model.getBaseResource().withExtension(altenativeExtension); Maybe there is a more effective way to provide such a feature using module-scopes. What do you think about it? Mario - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Strange exception
This is just a vague guess, but as far as I *think* that class name isn't the only thing Java uses to compare two classes when casting. So if you have defined your TreeNode class in more than once place, it's possible that the class you're passing it and the class Tapestry is trying to use were loaded by different classloaders from different places. When you define it in the Tapestry page class I guess it only uses the one class file so it works fine. Check how many TreeNode.class files you have on your classpath, in jars or locally. Carl Jorge Merlino wrote: Hi, I'm trying use the tapestry tree component found in http://wiki.apache.org/tapestry/Tapestry5TreeComponent but I'm stuck with a very strange exception which is this: java.lang.ClassCastException: uy.com.ipcontact.webjastconf.components.TreeNode cannot be cast to uy.com.ipcontact.webjastconf.components.TreeNode Java is trying to cast an object to its same class and failing to do so! This works if I create the TreeNode object in the tapestry page class but does not If I create the TreeNode objects in another class and return them to the page class via a procedure return value. Here is some more context for the exception if it helps. Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure reading parameter 'source' of component Index:tree_0: uy.com.ipcontact.webjastconf.components.TreeNo de cannot be cast to uy.com.ipcontact.webjastconf.components.TreeNode [at context:Index.tml, line 3, column 73] at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:932) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$200(ComponentPageElementImpl.java:50) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$13.render(ComponentPageElementImpl.java:499) at org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72) ... 64 more Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure reading parameter 'source' of component Index:tree_0: uy.com.ipcontact.webjastconf.components.TreeNo de cannot be cast to uy.com.ipcontact.webjastconf.components.TreeNode [at context:Index.tml, line 3, column 73] at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(InternalComponentResourcesImpl.java:290) at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(InternalComponentResourcesImpl.java:315) at uy.com.ipcontact.webjastconf.components.Tree._$read_parameter_source(Tree.java) at uy.com.ipcontact.webjastconf.components.Tree.setupRender(Tree.java:55) at uy.com.ipcontact.webjastconf.components.Tree.setupRender(Tree.java) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$13$1.run(ComponentPageElementImpl.java:495) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:917) ... 67 more Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: uy.com.ipcontact.webjastconf.components.TreeNode cannot be cast to uy.com.ipcontact.webjastconf.components.T reeNode [at context:Index.tml, line 3, column 73] at org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:57) at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(InternalComponentResourcesImpl.java:284) ... 73 more Caused by: java.lang.ClassCastException: uy.com.ipcontact.webjastconf.components.TreeNode cannot be cast to uy.com.ipcontact.webjastconf.components.TreeNode at uy.com.ipcontact.webjastconf.pages.Index.getTreeNodes(Index.java:46) at $PropertyConduit_11fc8c4abe7.get($PropertyConduit_11fc8c4abe7.java) at org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:53) ... 74 more Thank you for your time Best regards Jorge - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: DWR with T5
Change that to @IncludeJavaScriptLibrariy(context:/dwr/engine.js) kace wrote: Looking to get the javascript files injected for dwr into my page but having difficulty with the @IncludeJavaScriptLibrary(/dwr/engine.js) Using that tells it to look for the js files where the page class is but I am needing it to look at http://myapp/dwr/engine.js Thanks, ..kace - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
T5: Passivate, forms and environmentals
Hi all, I have a page class, which in beginRender pushes a class into the environment. Then a component uses that environmental value. This works fine, and I use it in the page activation and passivation methods and all is well. In the component, I have a form which sets some values. When I submit the form, I get the message No object of type SomeClass is available in the Environment. My question is: does the form submission passivate the page class? It seems like it doesn't, is that the correct behaviour? I think I'm misunderstanding how events and the like work. What should I be doing? I can get around it by passing in the instance of 'SomeClass' as context to the form, but that means I can't include other values that the page itself passivates. I've added some psuedo-code below which demonstrates what my code looks like. I've deliberately left out lots of chaff to make it clearer. Carl class Page { void onActivate( SomeClass test ) { this.test = test } void beginRender{ environment.push( SomeClass.class, this.test ); } void afterRender{ this.test = environment.pop( SomeClass.class ); } Object[] onPassivate() { return new Object[]{ this.test }; } } class Component { @Environmental SomeClass test; void setFoo( int val ) { test.setFoo( val ); } } - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] Tap5-Grails integration?
It has come up a few times - have a read of the previous posts to this mailing list: http://www.google.co.uk/search?q=grails+site%3Amail-archives.apache.org%2Fmod_mbox%2Ftapestry-users%2F Carl Otho wrote: Hi all, I don't know if it is even conceptionally or technically possible, so my suggestion may seem a bit strange. But would it be possible to integrate grails and Tapestry in the way it was done with wicket? Aka Tapestry as a GUI plugin? I think that would be a huge popularity boost. The simplicity and elegance Tapestry has to offer in many areas combined with some of the neat ideas in grails would create a really powerful stack. What do you think about that? Regards, Otho - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] Tap5-Grails integration?
Sorry Otho, I wasn't attempting to prevent discussion, I just wanted to point it out in order to add to the discussion. Otho wrote: Grails specifically. Groovy as such is possible right now. In the simple cases I tested there were no glitches. But some frameworks can serve right now as frontend to grails. As I said, I have no idea of the technical implications which an integration of Tapestry would require, but I am sure, that - if possible - it would benefit both but especially Tapestry by a large margin. Grails' mailinglist is in this account only 2 months longer but has more than double the posts. If you subtract the Tap4 related posts in this time from the mailinglist it is more like 3 or even 4:1. So there is an active and large userbase and at least for me Tapestry would definitely be the ui/service plugin of choice when starting a Grails production project. Carl, in the portion of the mailinglist I have here in my account (since may 07) there was no such discussion and that means that it was maybe concerning versions of grails up to version 0.3 or so. Grails developed since then and so did Tapestry. I don't think it would harm to reconsider it taking the latest developments into account. E.g. the embracement of Grails by SpringSource. Regards, Otho 2009/2/3 Thiago H. de Paula Figueiredo thiag...@gmail.com Grails specifically or Groovy? Em Tue, 03 Feb 2009 15:27:26 -0300, Otho taa...@googlemail.com escreveu: Hi all, I don't know if it is even conceptionally or technically possible, so my suggestion may seem a bit strange. But would it be possible to integrate grails and Tapestry in the way it was done with wicket? Aka Tapestry as a GUI plugin? I think that would be a huge popularity boost. The simplicity and elegance Tapestry has to offer in many areas combined with some of the neat ideas in grails would create a really powerful stack. What do you think about that? Regards, Otho -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor Consultor, desenvolvedor e instrutor em Java http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Switch from Prototype to jQuery?
I really like jQuery and I use it all the time in various Tapestry apps. But it's trivial to use it with Tapestry due as you can just do $j = jQuery.noConflict() and use it as $j instead. Most jQuery libraries use jQuery instead of $ so there are no conflicts. Although I prefer jQuery, I can't see much point in switching Tapestry to it just to help people who might want to use it. Perhaps you could switch Tapestry so that the jQuery lib gets to use $, but there's no need to rewrite everything. The other thing is that it would reduce HTTP request if you don't need to load jQuery /and/ prototype. But couldn't some filter just pile all of the javascript required by a page into one script? Something like: script src=tapestry_tmp_0981234.js / which is just all the js used in the order it was declared? That'd have the same functionality, for less requests. Same goes for CSS. Carl Onno Scheffers wrote: On Fri, Jan 30, 2009 at 5:32 PM, Chris Lewis chris_le...@bellsouth.netwrote: that it is less than ideal for building front end widgets That's not true. As a matter of fact, jQuery is currently one of the most popular Javascript libraries for developing frontend widgets and I see very cool widgets popping up all over the place which I would love to turn into Tapestry libraries. You'll ususally combine Prototype with Scriptaculous. You can use JQuery with JQuery UI (http://ui.jquery.com). If you Google for jQuery widgets you'll see endless lists of available widgets. See interface for example ( http://interface.eyecon.ro). If I'm mistaken about the abilities of jQuery, that is just my inexperience with it. The question I would propose is, what's the point? Well... I'm a Java developer with lots of jQuery experience. To me it felt like the entire world was shifting towards jQuery. Google uses jQuery for example (http://blog.jquery.com/2007/11/02/google-using-jquery/) and Microsoft even officially wants to support it and ship it with Visual Studio ( http://www.microsoft.com/web/content.aspx?id=microsoft-adopts-open-source-jQuery-JavaScript-library ). So while I knew jQuery and around me everyone started using jQuery, I had to go back, and learn Prototype since I'm usually the guy that does the front-end web components and adding two web-frameworks seems like overkill. This was actually a real concern for me when switching to Tapestry 5. Prototype is a nice library, but in my opinion it's not nearly as nice as jQuery and it performs noticably slower as well. The problem is that switching to another framework now is that it would probably would break 3rd party components and custom Javascript components already created in Tapestry projects. regards, Onno - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Weird error
I'm guessing from this: java.lang.RuntimeException No service implements the interface tibox.allert.fastSupport.services.UserSessionImpl. That you're binding the implementing class instead of the interface class. Carl Chris Lewis wrote: And also how exactly you bind your service implementation in your app module. Stephane Decleire wrote: Hi Could you show us the code of your class tibox.allert.fastSupport.services.UserSessionImpl ? Stephane Sid Ferreira a écrit : Based on http://wiki.apache.org/tapestry/Tapestry5HowToControlAccess Im getting this error... Why? java.lang.RuntimeExceptionException constructing service 'MasterDispatcher': Error invoking service builder method org.apache.tapestry5.services.TapestryModule.buildMasterDispatcher(List) (at TapestryModule.java:1144) (for service 'MasterDispatcher'): Error invoking service contribution method tibox.allert.fastSupport.services.AppModule.contributeMasterDispatcher(OrderedConfiguration, Dispatcher): Error building service proxy for service 'AccessController' (at tibox.allert.fastSupport.services.AccessController(ApplicationStateManager, ComponentClassResolver, ComponentSource, UserSessionImpl) (at AccessController.java:26) via tibox.allert.fastSupport.services.AppModule.bind(ServiceBinder) (at AppModule.java:27)): Error invoking constructor tibox.allert.fastSupport.services.AccessController(ApplicationStateManager, ComponentClassResolver, ComponentSource, UserSessionImpl) (at AccessController.java:26) via tibox.allert.fastSupport.services.AppModule.bind(ServiceBinder) (at AppModule.java:27) (for service 'AccessController'): No service implements the interface tibox.allert.fastSupport.services.UserSessionImpl. org.apache.tapestry5.ioc.internal.OperationExceptionNo service implements the interface tibox.allert.fastSupport.services.UserSessionImpl. trace - Realizing service MasterDispatcher - Invoking org.apache.tapestry5.services.TapestryModule.buildMasterDispatcher(List) (at TapestryModule.java:1144) - Collecting ordered configuration for service MasterDispatcher - Invoking method tibox.allert.fastSupport.services.AppModule.contributeMasterDispatcher(OrderedConfiguration, Dispatcher) (at AppModule.java:39). - Determining injection value for parameter #2 (org.apache.tapestry5.services.Dispatcher) - Creating service 'AccessController'. - Determining injection value for parameter #4 (tibox.allert.fastSupport.services.UserSessionImpl) java.lang.RuntimeExceptionNo service implements the interface tibox.allert.fastSupport.services.UserSessionImpl. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] Pick up https/http from request
I don't know if you're aware, but if you create a href something like href=//something.com/page then the current protocol is maintained. So if you were viewing the page at https://something.com the HREF would resolve to https://something.com/page and similarly with http. Unfortunately it requires using absolute URLs all the time. I'm not sure if that helps, but perhaps it could be used in fixing that issue. Carl Inge Solvoll wrote: Yes, I might. This is a major blow for us, our customers choose freely whether they want to use http or https, so the T5 way of doing things just doesn't work for us... On Fri, Nov 14, 2008 at 9:28 PM, Jonathan Barker [EMAIL PROTECTED] wrote: You might want to vote for this: https://issues.apache.org/jira/browse/TAP5-167 -Original Message- From: Inge Solvoll [mailto:[EMAIL PROTECTED] Sent: Friday, November 14, 2008 15:10 To: Tapestry users Subject: Re: [T5] Pick up https/http from request Thanks! I tried copying your code into my AppModule with some small modifications. But the code only runs on server startup, not when I access a tapestry 5 page. I tried to add deliberate errors in the code, like naming the server lcalhost, but I never saw the results when accessing pages. Also, when I try to add final HttpServletRequest request as a parameter to the contributeAlias method, my T5.0.13 crashes complaining about service recursion. What I need is for T5 to figure out that a user accesses a page with either http or https, and respond on the same protocol... Regards Inge On Fri, Nov 14, 2008 at 4:43 PM, Keith Bottner [EMAIL PROTECTED] wrote: I believe you might be able to use an alternation of a solution I used for getting https to work properly between my development and production servers. public static void contributeAlias(ConfigurationAliasContribution configuration, @Inject @Value(${+SymbolConstants.PRODUCTION_MODE+} ) final String production { if (0 != production.compareToIgnoreCase(true)) { BaseURLSource source = new BaseURLSource() { public String getBaseURL(boolean secure) { String protocol = secure ? https : http; int port = secure ? 8443 : 8080; return String.format(%s://localhost:%d, protocol, port); } }; configuration.add(AliasContribution.create(BaseURLSource.class, source)); } } Somehow make this dependent on the user selection and return it accordingly. Not a quick solution but possible a direction to try! Keith On Nov 14, 2008, at 7:18 AM, Inge Solvoll wrote: Hi! My web application is large and consists of Struts, T4 and T5 pages. In Struts and T4, I use the current http request to figure out whether to use https or not. Users can choose if they want to log in using https or not. The chosen protocol is used on all pages after login. In T5, this is either a global static setting, or a static setting per page. Is there a service or something I can override to implement my own protocol builder? Something like this: public class HttpProtocolBuilder { public HttpProtocolBuilder (final HttpServletRequest request) { this.request = request } public String getProtocol() { if (request.isSecure()) { return https; } else { return http; } } Regards Inge - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Template customisation depending on certain parameters
Hi all, I'm about to start work on a project for which the clients will mainly be mobile phones. It's just a simple message board; the server side code will be straightfoward enough. The main issue with mobile phone browsers, though, is that every one of them is different and has its own set of daft quirks. For example, Sony Ericssons tend to oversize text, some Nokia's struggle with CSS floats, Blackberrys are... godawful. To solve this I was thinking of adding a service into Tapestry a bit like the localization. Given the user agent, I can work out what device profile to show (eg, nokia_n95) then use that to choose a template not unlike the way localization currently works. So it'd choose HomePage_nokia_n95.tml to run or something. If, however, I don't want to completely rewrite the template for every profile, say the changes are only minor (this will be most cases), then I'd want a way to change the template before rendering on the fly. For example, replacing p tags with span class=nokia_paragraph. I'm sending this email to the list becase firstly, I was wondering if anyone has any experience doing something like this with Tapestry or even any other framework. Secondly, does anyone have any pointers for what sort of services and interfaces I'd have to contribute? I need something that can choose a template before rendering for the first case and for the second, I might need a custom markup writer or something? Then I could perform a quick lookup for the write methods and replace the elements written to the final page? Many thanks in advance, Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tapestry 5.0.15, eclipse3.2 and Hibernate ClassNotFound exception
Did you include the tapestry hibernate library? It will be trying to load hibernate related stuff if it's included in the classpath, regardless of whether you use hibernate in your own code. muinjava wrote: simple question: I made a simple tapestry web app and set all standard tapestry5.0.15 library jars on clasapath, and started tomcat, got following error: Exception starting filter app java.lang.NoClassDefFoundError: org/hibernate/Session at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2365) at java.lang.Class.privateGetPublicMethods(Class.java:2488) at java.lang.Class.getMethods(Class.java:1406) at org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.grind(DefaultModuleDefImpl.java:137) at org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.init(DefaultModuleDefImpl.java:106) at org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:122) at org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:149) at org.apache.tapestry5.ioc.IOCUtilities.addModulesInList(IOCUtilities.java:137) at org.apache.tapestry5.ioc.IOCUtilities.addModulesInManifest(IOCUtilities.java:107) at org.apache.tapestry5.ioc.IOCUtilities.addDefaultModules(IOCUtilities.java:77) at org.apache.tapestry5.internal.TapestryAppInitializer.init(TapestryAppInitializer.java:75) at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:76) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:78) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4222) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) how can I remove damn hibernate related error? I did not use hibernate at all. thanks in advance. or is this a T5 bug ? see https://issues.apache.org/jira/browse/TAP5-227 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session bleedings in Tapestry5
I currently use Tapestry 5.0.13 (soon to be upgraded) in a live system used by plenty of people at once and I have not had this issue at all. [EMAIL PROTECTED] wrote: Tapestyr5 or 4 ? Here, this developer means Tapestry5 Original-Nachricht Datum: Mon, 20 Oct 2008 08:46:15 -0400 Von: Daniel Jue [EMAIL PROTECTED] An: Tapestry users users@tapestry.apache.org Betreff: Re: Session bleedings in Tapestry5 I've also never come across this kind of problem. It would be interesting to see the code that caused what the developer said was happening. As others have suggested, it's easy to do this if you are using statics (or if your private vars get initialized by statics in the setup phase). On Mon, Oct 20, 2008 at 8:41 AM, Peter Stavrinides [EMAIL PROTECTED] wrote: I have never come across such a problem either, and we have done a lot of testing for this. Your problem sounds like it has little to do with the session and more to do with page pooling, i.e.: how you initialize your pages. The golden rule there is that your fields must always be private, and then should be referenced by public accessors, having a public field in a page is like using a static variable which may explain your problem. -- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail. - Original Message - From: [EMAIL PROTECTED] To: users@tapestry.apache.org Sent: Monday, 20 October, 2008 2:53:17 PM GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Session bleedings in Tapestry5 I quote from a chat protocol with a developer: Take for eg, if there are 10 users at present using our website, then first user clicks on 1st page, and 5th user clicks on 2nd page, and 3 rd person clicks on 3 page and using it. And if the user 1 is clcked on 8 page at that time user 3 want to goto another page say 5, then he also gets 8 instead of 5. As first user requested that page. :( Original-Nachricht Datum: Mon, 20 Oct 2008 13:32:16 +0200 Von: Tobias Wehrum [EMAIL PROTECTED] An: Tapestry users users@tapestry.apache.org Betreff: Re: Session bleedings in Tapestry5 Hello namesake, Since I've never heared about this too, I searched the Mailing List and JIRA and didn't find any issue which you could've meant. Where did you hear that? - Tobias [EMAIL PROTECTED] schrieb: I have heard there are some issues with Session bleedings in Tapestry5. Will those issues be fixed by November? I would like to go live with a T5 application by November/December Thanks! Tobias - 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] - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 (5.0.15): Layout issue - unable to resolve layout
The Layout component is not a special component, it's just the same as any other component. You can reference any component as the root element of a page, or any HTML element. All you need to do is include the namespace, for example: t:otherlayout xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; !-- stuff goes here -- /t:otherlayout Carl Joel Halbert wrote: Hi Serge, Thanks, that worked - I didn't realise that the Layout.java and tml files had to be in a directory named /component. May I ask one more question, which is how to support layout files of an arbitrary name? Say I want to have Layout2.java and Layout2.tml Thx Joel SergeEby wrote: Hi, Layouts are regular components that need to be created by you and are not handled differently. Make sure your Layout Java class is under src/main/java/root-package/components and the associated tml is in src/main/resources/root-package/components /Serge Joel Halbert-2 wrote: Hi, I'm having issues using layouts (T5 5.0.15), with a tml, something like this: t:layout xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; div id=header table id=top etc However, I get the exception, *Caused by: java.lang.IllegalArgumentException: Unable to resolve 'layout' to a component class name.* Available component types: ActionLink, AddRowLink, AjaxFormLoop, Any, BeanDisplay, BeanEditForm, BeanEditor, Checkbox, DateField, Delegate, Errors, EventLink, ExceptionDisplay, Form, FormFragment, FormInjector, Grid, GridCell, GridColumns, GridPager, GridRows, If, Label, Loop, Output, OutputRaw, PageLink, Palette, PasswordField, PropertyDisplay, PropertyEditor, Radio, RadioGroup, RemoveRowLink, RenderObject, Select, Submit, SubmitNotifier, TextArea, TextField, TextOutput, Unless, Upload, Zone. As per previous threads on this exception I've ensured that my Layout.tml and Layout.java file exists in the correct build and Tomcat directories, which they do. After putting the debugger on it I see it is attempting to look up the Layout in ComponentClassResolver.java: private String locate(String logicalName, MapString, String logicalNameToClassName) { rebuild(); String result = logicalNameToClassName.get(logicalName); However, the map which is populated with logical names to classes clearly doesn't contain a reference to Layout. I understand layouts are handled differently to other components, created on the fly. Is there something I might be missing here? Should it be attempting to load the Layout in this way? Thx Joel -- SU3 Analytics Ltd 61b Oxford Gardens W10 5UJ London Tel: +44 20 8960 2634 Mob: +44 75 2501 0825 www.su3analytics.com SU3 Analytics Ltd is a company registered in England and Wales under company number 06639473 at registered address 61b Oxford Gardens, London W10 5UJ, United Kingdom. - 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]
Re: html code complete for eclipse??
Aptana does code completion for HTML and CSS etc. http://www.aptana.com/docs/index.php/Plugging_Aptana_into_an_existing_Eclipse_configuration You just have to make sure the tapestry .tml files are associated with its editor - go to General - Editor - File Associations in preferences to set that. jimmy6 wrote: how to add code complete for html in eclipse?? i am using tapestry5 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] Filename of TextStreamResponse ?
If you set the Content-Disposition header in the response you can. Add this to your page: @Inject private RequestGlobals requestGlobals; Then somewhere before you return the stream response, do requestGlobals.getResponse().setHeader(Content-Disposition, attachment; filename= + filename); Also, you could create your own StreamResponse implementation, or extend the existing TextStreamResponse, and do that in the prepareResponse method, if that way is more convenient. Cheers, Carl Otho wrote: Hello all, by defaullt a TextStreamResponse when meant to be saved on disk gets a filname composed of classname.methodname for example export.customers Is there any way to override that to something like export_customers.csv without having to rename classes and methods accordingly? Regards, Otho - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tapestry App Replication
Hi all, Is it possible to run multiple instances of a Tapestry app on various servers, but have them share session and application state? Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with aso
Is this actually a compilation error? Natia Gdzelishvili wrote: in version 5.0.9 it is working I've addedvist class but still same situation _visit cannot be resolved On Wed, Sep 3, 2008 at 3:44 PM, Geoff Callender [EMAIL PROTECTED] wrote: Fernando's right. Your field curruser starts out as an ASO but if you reassign it (eg. curruser = u) then it becomes something else which is not an ASO. Your code looks like it's a mod of JumpStart, but JumpStart actually does the same kind of thing Fernando's saying: @ApplicationState private Visit _visit; private boolean _visitExists; snipped User user = getSecurityFinderService().authenticateUser(_loginId, _password); // Store the user in the Visit _visit.noteLogIn(user); and Visit then sets its fields based on the user. That way it remains an ASO. public void noteLogIn(User user) { _loggedIn = true; _myUserId = user.getId(); _myLoginId = user.getLoginId(); } HTH, Geoff On 03/09/2008, at 7:24 PM, Fernando Padilla wrote: Also, i thought you were to think of an ASO almost as a singleton or a service. Tapestry will create it for you on first access. I didn't know you could set it. Even if I'm wrong, using this design pattern might clean things up a little. So you should use another class to contain a reference to the current active user, call it UserContainer. @AplicationState private UserContainer currUser; and it would have methods like: currUser.hasUser() currUser.setUser(User user) currUser.getUser() or whatever you like. José Paumard wrote: Natia, I think there is a mistake in your code : private User currUser ; private boolean userExists ; I dont think T5 will link userExists and currUser, currUser should be named user, or userExists currUserExists (please correct me if I'm wrong). That said, what do you mean I cant access currUser, do you mean that the ASO is null in other classes that want to read it ? Or do you mean that userExists is always false (which is normal, see above). José Natia Gdzelishvili a écrit : I'm using tapestry 5.0.14 ,i vahe problem with aso, my code is: public class Login { private String username; private String password; @Inject private IBusinessServicesLocator _businessServicesLocator; @ApplicationState private User currUser; private boolean userExists; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } @SuppressWarnings(unchecked) @OnEvent(value = submit, component = loginForm) public Object submitLoginForm() { Class nextPage; try { User u=getMerchantCreator().login(username, password); //*returns some object* currUser = u; /*/ currUser object cannot be resolved* nextPage = ViewAllMerchants.class; } catch (UserNotFoundException e) { nextPage = Login.class; e.printStackTrace(); } return nextPage; } private IMerchantCreatorLocal getMerchantCreator() { return _businessServicesLocator.getMerchantCreatorLocal(); } } i cannot access curruser... please help.. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: editing a bean with a required password field
Why not just @Persist the password value in the session, only overwriting the value if the user submits something? That way the value gets kept but at the same time the clientside doesn't have the plaintext password. Thiago H. de Paula Figueiredo wrote: Em Tue, 02 Sep 2008 16:57:19 -0300, Martijn Brinkers [EMAIL PROTECTED] escreveu: really distrust applications that do not hash passwords. The mentioned problem can be solved my making a distinction between adding a new user (which requires a password) and editing a user (allow blank password indicating that the password should not be changed). It would be really nice if PasswordField did not set the corresponding property value nor validate it when the the user leaves the field empty. I think it would solve all (or almost all) the issues listed in this thread. Thiago - 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]
Re: I'd like to generate valid XHTML
Have you already looked at http://wiki.apache.org/tapestry/Tapestry5HowToXhtml ? (apologies if you have :) ) Luther Baker wrote: Is there a way to adjust the html that is generated - especially in the header? Specifically, the generated head section does not appear to be xhtml compliant. Here is what I'm including in my own custom wrapping component: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; lang=en head meta http-equiv=Content-Type content=text/html; charset=UTF-8/ title${pageTitle}/title link rel=stylesheet href=css/styles.css type=text/css/ /head *A few points: * a) The xhtml strict DOCTYPE should be pretty straightforward b) I want the Content-Type first in the head tag c) The meta tag *MUST* have a closing slash - otherwise the document is not well formed. d) The same goes for the two link tags. XHTML dictates that all tags must be well formed. *Unfortunately, my application ends up generating * !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html lang=en xmlns=http://www.w3.org/1999/xhtml; head link href=assets/tapestry/5.0.14/default.css rel=stylesheet type=text/css meta content=text/html; charset=UTF-8 http-equiv=Content-Type titleHome/title link href=css/styles.css rel=stylesheet type=text/css /head For the most part - this is fine ... but in the details, I believe my problem is two fold: 1) I would really like the Content-Type to be the first tag in head. 2) The link and meta tags are not properly closed. Unfortunately, this code-gen is just not valid xhtml. I do have one last (not so terrible) issue with the EXTRA link tag (tapestry specific css) that is showing up in the head as well. I'm sure it is nice for exceptions (which the final user should never see) but it has a few more problems: 1) It tells everyone what version of a particular library I am using. I'd rather not do that. 2) The tag appears before my Content-Type tag - which as I mentioned, I'd prefer FIRST in the hierarchy. 3) Finally, the tapestry stylesheet is not well formed. Again, proper xhtml demands that tags be balanced/closed. I know Code Gen is hard -- but I generally pay extra attention to ensure I produce valid, well formed xhtml documents and the codegen going on behind the scenes here is making that a bit hard. Thoughts? I'm not sure how to close the tags - maybe I can set a flag or pass something else in as an xml attribute of the root tag of my templates? Regarding the extra tapestry css file inserted ... maybe the Tapestry library has a DEBUG and a RELEASE mode? Maybe there a flag to turn off the DEBUG mode and put this library into RELEASE mode? I really don't want that tapestry specfiic css page requested everytime I serve up a page. I understand the filter takes care of it ... but it still shows up in my request logs, on user pages, in proxies, etc ... Is it even wise to consider opening up the tapestry JARs and see if the components implementeing this section of code can simply be tweaked to have proper xhtml balance. On a positive note, the library is working well and I enjoy the general programming model. I think convention is great - but it needs to be valid in this case. Thanks again in advance for any thoughts. -Luther - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Context and Multiple Components
Hi all, I'm writing a stats system where graphs have various abilities to be filtered, changed and so on. To control the date range, I've got a date range component, and to change the filtering, I have a filter control component and so on. Some graphs don't use all of these components, which is why I don't just bundle them all together. I'm trying to avoid persisting any data in the session and instead setting it all in the URL, so that all graph configurations can be shared using the URL. My problem is that I'm not sure how to handle setting the context for forms or links within these optional components. In order for the, eg, filter-control state to be set in the URL, the date-range control must be aware of the filter-control settings. This is awkward to code, and it's also bad practice, the two should really be completely independent. So my question is: does anyone know a way to easily keep the context of other elements when inside another one? I tried writing a URL persistence strategy, which sort of worked, but I ended up having URLs like page?page_id.component_type.component_id= and it got horribly messy... Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Context and Multiple Components
Sorry, I should have mentioned that the date-control and filter-control things etc all submit their changes via forms. It's just occurred to me that I could get the parent page using ComponentResources during the onSuccess method, and pass in the new values relevant to the control and get the parent page to handle redirecting, as it is aware of its child components. I'll give that a try. Any other ideas though? Carl PS It would be the case that, after thinking about this for a few days, I finally get an idea just after sending an email! Carl Crowder wrote: Hi all, I'm writing a stats system where graphs have various abilities to be filtered, changed and so on. To control the date range, I've got a date range component, and to change the filtering, I have a filter control component and so on. Some graphs don't use all of these components, which is why I don't just bundle them all together. I'm trying to avoid persisting any data in the session and instead setting it all in the URL, so that all graph configurations can be shared using the URL. My problem is that I'm not sure how to handle setting the context for forms or links within these optional components. In order for the, eg, filter-control state to be set in the URL, the date-range control must be aware of the filter-control settings. This is awkward to code, and it's also bad practice, the two should really be completely independent. So my question is: does anyone know a way to easily keep the context of other elements when inside another one? I tried writing a URL persistence strategy, which sort of worked, but I ended up having URLs like page?page_id.component_type.component_id= and it got horribly messy... Carl - 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]
Re: [T5] Is there a way to restric filesize in upload component?
If you add an onException method to your upload page class, then you can catch it rather than let it get dumped into the browser. You could do something like this: @InjectPage private FileSizeTooBig fileSizeToBig; Object onException( Throwable cause ) { if ( cause instanceof FileSizeLimitExceededException ) { return fileSizeToBig; } else { // this means all other exceptions will appear in the browser throw cause; } } That will redirect the user to a page if the exception is thrown, and on the FileSizeTooBig page you could display the error. It's just a standard event method, so you can do whatever really. Have a look at: http://tapestry.apache.org/tapestry5/tapestry-core/guide/event.html Angelo Chen wrote: Hi Otho, FILESIZE_MAX does limit the uploading of file to a certain size, it throws an exception 500,FileUploadBase$FileSizeLimitExceededException, but how to catch this exception in code? seems to me it always dumps it to the browser, any idea? thanks. Angelo Otho wrote: I digged a bit deeper into the upload component. And thankfull it seems to be possible by contributing to ApplicationDefaults. For example: public static void contributeApplicationDefaults( MappedConfigurationString, String configuration) { // Contributions to ApplicationDefaults will override any contributions to // FactoryDefaults (with the same key). --configuration.add(UploadSymbols.REQUESTSIZE_MAX, 100); --configuration.add(UploadSymbols.FILESIZE_MAX, 50); } Anyways many thanks for the answer. Regards, Otho 2008/2/27 Howard Lewis Ship [EMAIL PROTECTED]: Not that I know of; it's not something you can do on the client side. There is some configuration on the server side, but that may be too late for you. On Mon, Feb 25, 2008 at 11:11 AM, Otho [EMAIL PROTECTED] wrote: Is there a way to restrict the size of uploaded files in the upload component? In a community app with avatar upload it would be possible for malicious users to hog the application by uploading very large images to provoke out of memory errors. Is there any way to configure upload to only accept files up to a certain size? Regards, Otho -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - 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]
Re: T5 : Let's write a book !
I'd be keen to help out, whatever the format used to write it. I assume there would be an editor to order it once it's written? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 application behaviour behind an apache web server
I've had a similar problem. It's because when Jetty redirects you, it uses request.getServerName() and the request context to create a complete URL. So if you go to your app at http://localhost/page;, and that sends a redirect, Jetty will redirect you to http://localhost/whatever;. The problem comes with Apache's proxy because the server name and context that Jetty sees is the server name and context that Apache is requesting, not the user. This means that the redirects it builds which get sent to the user are pointing at the wrong place. My Apache proxy config was set up to proxy https://externalurl/; by requesting http://127.0.0.1/myapp; which meant whenever I submitted a form or anything else which required a redirect, I got sent to 127.0.0.1. I got around the problem temporarily by setting tapestry.suppress-redirect-from-action-requests to true, which prevented it using redirects in most of the situations. However, that's not ideal. I'm planning on simply having Jetty handle the requests directly, which again isn't ideal but it's the best I can come up with. I haven't been able to work out how to get Jetty to simply use a base URL that I tell it to. Does any one know this? If not, I could just patch Jetty myself, but again, it's not ideal... Carl Grigoris Ioannou wrote: Hi all, I'm facing this peculiar behavior in my T5 application: I have a search box in the border of the application: BorderHeadComponent.tml t:form t:textfield t:id=search value=query size=20 / t:submit t:id=submitQueryButton value=Search/ /t:form BorderHeadComponent.java @InjectPage private ResultsPage resultsPage; Object onSuccess() { resultsPage.setQuery(getQuery()); return resultsPage; } ResultsPage.java: @Property @Persist(flash) private String query; void onActivate() { LOGGER.info(came here with query + getQuery()); } When I run the application in jboss and I search for something, it will correctly redirect me to http://localhost:8080/myapp/resultspage Ok till here, all works fine with jboss. The problem starts in the live deployment. For the live environment, I have configured apache to redirect all requests to jboss. In httpd.conf, I write: ProxyPass / ajp://localhost:8009/myapp/ ProxyPassReverse / ajp://localhost:8009/myapp/ So, theoretically, a search in the live site should redirect me to http://www.mydomain.com/resultspage But instead of this, it redirects to http://www.mydomain.com/myapp/resultspage ( ^ myapp should not appear here! ) which results in a 404 not found error. Meanwhile, all the pagelinks (eg. t:pagelink t:page=StartHome/t:pagelink ) function correctly. Is this a Tapestry bug or a configuration error? Or am I missing something? I would appreciate any suggestions. Grigoris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tapestry 5 - how to access HttpSession
This page tells you: http://wiki.apache.org/tapestry/Tapestry5ObtainingHttpServletRequest Also check out http://wiki.apache.org/tapestry/Tapestry5HowTos for a variety of other useful HowTos Cheers, Carl Eric Ma wrote: Gurus: Can you show me how to access HttpSession from a Tapestry 5 page or component class? Thanks, Eric --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Access control with dispatchers and annotations
Hi, I'm trying to create an access control system using a dispatcher as described on the wiki page. I'm following this: http://wiki.apache.org/tapestry/Tapestry5HowToControlAccess So that I can use an annotation to declare which pages need a logged-in user. It checks the meta-data in the component model for a key called private but it is not being added in my code. As far as I can tell, there is no place where annotations on the type get converted into meta-data. Am I missing something? Or do I need to implement my own ClassTransformWorker to do this? Thanks, Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Access control with dispatchers and annotations
Cheers for all the replies - I've taken Moritz's approach in the end :) I've updated the wiki page to reflect this. Carl Moritz Gmelin wrote: Hi, I think there is a bug in the Wiki. Try this instead Component page = componentSource.getPage(pageName); Private prvAnnot = page.getClass().getAnnotation( Private.class); when your Annotation is called Private of course. You'll get the annotation if it was present on the page or NULL otherwise. M. Am 29.07.2008 um 13:41 schrieb Carl Crowder: Hi, I'm trying to create an access control system using a dispatcher as described on the wiki page. I'm following this: http://wiki.apache.org/tapestry/Tapestry5HowToControlAccess So that I can use an annotation to declare which pages need a logged-in user. It checks the meta-data in the component model for a key called private but it is not being added in my code. As far as I can tell, there is no place where annotations on the type get converted into meta-data. Am I missing something? Or do I need to implement my own ClassTransformWorker to do this? Thanks, Carl - 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]
Serving a JNLP
Hi again, My app needs to serve JNLP files, and these files are dynamically generated. I'm doing this by simply having the tapestry page render a template as normal, but using the JNLP element as the page root. I then set the content type on the page to be the JNLP MIME-type. This all works fine and it serves a page which I can then run with WebStart. The only problem is the tapestry page is called app, so the file you download is also called app. This is fine when running the app from within a browser, because of the MIME-type. However I want to allow users to save the file on their computer to run the app offline. If you save the file it gets saved as just app so, on Windows at least, double clicking doesn't automatically run WebStart. I want to have the file returned be called app.jnlp to overcome this. Firstly, is the way I'm doing this the best way to serve dynamically generated JNLPs? Secondly, how can I set the page name (or file returned name) to be app.jnlp? I thought about having a dummy page called app which just had a single jnlp component which did the work, so app.jnlp would work I think, but that seems like a massive hack. Any help would be greatly appreciated :) Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Serving a JNLP
Wait, never mind. I have had my head in XML mode, I forgot about StreamResponses and this page: http://wiki.apache.org/tapestry/Tapestry5HowToStreamAnExistingBinaryFile Sorry! Carl Crowder wrote: Hi again, My app needs to serve JNLP files, and these files are dynamically generated. I'm doing this by simply having the tapestry page render a template as normal, but using the JNLP element as the page root. I then set the content type on the page to be the JNLP MIME-type. This all works fine and it serves a page which I can then run with WebStart. The only problem is the tapestry page is called app, so the file you download is also called app. This is fine when running the app from within a browser, because of the MIME-type. However I want to allow users to save the file on their computer to run the app offline. If you save the file it gets saved as just app so, on Windows at least, double clicking doesn't automatically run WebStart. I want to have the file returned be called app.jnlp to overcome this. Firstly, is the way I'm doing this the best way to serve dynamically generated JNLPs? Secondly, how can I set the page name (or file returned name) to be app.jnlp? I thought about having a dummy page called app which just had a single jnlp component which did the work, so app.jnlp would work I think, but that seems like a massive hack. Any help would be greatly appreciated :) Carl - 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]
Re: first tapestry component
Can you post the rest of the stacktrace? Also I got a 404 for the zip file you linked to Argo Vilberg wrote: hi, What i do wrong? I want create tapestry border component. In webapp: context-param param-nametapestry.app-package/param-name param-valueee.softpro/param-value /context-param Then i create ee.softpro.components.Border.java file and also Border.tml file. in ee/softpro/components/ directory. And use them in Start.tml file html t:type=Border xmlns:t= http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; /html Then i compile all package to war using ant script. Run the application and i got: An unexpected application exception has occurred. java.lang.ClassNotFoundException: caught an exception while obtaining a class file for ee.softpro.components.Border If i check war file then ee/softpro/components/Border.class exists. course code in www.softpro.ee/arendus5.zip Argo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]