Re: [T5] Internationalizing included js
Alex, according to Thiago, you can have string substitution in the javascript: THIAGO Another solution is to put a Tapestry expression expansion inside the Javascript code: Page class: public Link getEventLink() { return componentResources.createXXXLink(parameters); } Template: window.location.href='${eventLink}' + this.cells[1].textContent; THIAGO So presumably, you can use ${message:some-message-key}, and it will be translated properly. I haven't tried this myself, so please let me know if this works. Ciao, Jonathan On 11/02/2009 06:01, Alex Kotchnev wrote: What is the best method for internationalizing strings inside of .js files included using the @IncludeJavaScript annotation ? I've looked around and I see that I can use the regular message catalog and string substitution (e.g. addScript(String format, Object... arguments);) if the script is attached to a particular element or something similar. However, if I am including the js using the @IncludeJavaScript annotation, what is the best approach ? I've tried (and it works great) to add localized js assets (e.g. foo.js, foo_bg.js, etc) and the localization works nicely. However, my little hangup with that is the actual code inside of the js is the same, just the messages are different. Can I somehow configure T5 to process the js (just like a tml file) and do message substitution inside (e.g. so that I can use expansions like ${message:foo-message} inside the js file). I guess I can also include the js inline in the .tml and the message catalog substitution would work. Cheers, Alex K - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry update from T5.0.12 to T5.0.18
That error occurs if you set a default value on a field eg: @Persist private boolean formSuccess_ = false; (IS WRONG) and should be: @Persist private boolean formSuccess_; Use @SetupRender or the like to initialize it. Cheers, Peter - Original Message - From: Artur_eol ar.abdul...@gmail.com To: users@tapestry.apache.org Sent: Wednesday, 11 February, 2009 02:16:02 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Tapestry update from T5.0.12 to T5.0.18 Now I have another error on my first page: Render queue error in BeginRender[Index:layout.header.pagelink_0]: Error persisting field Submit:formSuccess: Persistent fields may not be updated until after the page has finished loading. This may be due to a persistent field with a default value. The default value should be removed. Header.java public class Header { /*---*\ | I N S T A N C E V A R I A B L E S | \*---*/ @Inject @Service(IniParameterManager) private IniParameterManager paramMgr; /*---*\ |P R O P E R T I E S | \*---*/ public String getshortPortalName() { return paramMgr.getValue(ShortPortalName); } } And template: header.tml html xmlns=http://www.w3.org/1999/xhtml; xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; div id=header div id=logo h1${shortPortalName}/h1 /div div id=menu ul liHome/li liSubmit/li liBrowse/li liLinks/li liAbout/li liContact/li /ul /div /div /html Is there are any changes in Persistence fields since T5.0.12? -- View this message in context: http://www.nabble.com/Tapestry-update-from-T5.0.12-to-T5.0.18-tp21939289p21945781.html Sent from the Tapestry - User mailing list archive at Nabble.com. - 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
T5 and restrictive policies
Hi, I've got a Tomcat 5.5 installation with a very restrictive security policy in place. When I try to access my application, I get a nasty security exception: java.security.AccessControlException: access denied (java.io.FilePermission /var/lib/tomcat5.5/webapps/mailadmin/WEB-INF/classes/org/apache/tapestry5/corelib/components/Loop$1.class read) (see below for the full exception). But I have a policy that should grant everything below /var/lib/tomcat5.5/webapps/mailadmin/ (and hence also the tapestry jars in WEB-INF/lib) the AllPermission: grant codeBase file:/var/lib/tomcat5.5/webapps/mywebapp/- { permission java.security.AllPermission; }; This doesn't seem to work though. Does anyone have an idea what's wrong here? TIA, Uli java.security.AccessControlException: access denied (java.io.FilePermission /var/lib/tomcat5.5/webapps/mailadmin/WEB-INF/classes/org/apache/tapestry5/corelib/components/Loop$1.class read) java.security.AccessControlContext.checkPermission(AccessControlContext.java:323) java.security.AccessController.checkPermission(AccessController.java:546) java.lang.SecurityManager.checkPermission(SecurityManager.java:532) java.lang.SecurityManager.checkRead(SecurityManager.java:871) java.io.File.exists(File.java:731) org.apache.naming.resources.FileDirContext.file(FileDirContext.java:828) org.apache.naming.resources.FileDirContext.lookup(FileDirContext.java:211) org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:294) org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:1925) org.apache.catalina.loader.WebappClassLoader.findResource(WebappClassLoader.java:937) org.apache.catalina.loader.WebappClassLoader.getResource(WebappClassLoader.java:1072) java.lang.ClassLoader.getResource(ClassLoader.java:972) java.lang.ClassLoader.getResource(ClassLoader.java:972) org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.addClassFileToChangeTracker(ComponentInstantiatorSourceImpl.java:246) org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.onLoad(ComponentInstantiatorSourceImpl.java:192) javassist.Loader.findClass(Loader.java:340) org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$PackageAwareLoader.findClass(ComponentInstantiatorSourceImpl.java:94) javassist.Loader.loadClass(Loader.java:311) java.lang.ClassLoader.loadClass(ClassLoader.java:251) java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) org.apache.tapestry5.corelib.components.Loop.clinit(Loop.java:42) $Instantiator_11f648c8ff4.newInstance($Instantiator_11f648c8ff4.java) org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.init(InternalComponentResourcesImpl.java:132) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.init(ComponentPageElementImpl.java:559) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.newChild(ComponentPageElementImpl.java:637) org.apache.tapestry5.internal.services.PageElementFactoryImpl.newComponentElement(PageElementFactoryImpl.java:229) $PageElementFactory_11f648c8fc7.newComponentElement($PageElementFactory_11f648c8fc7.java) org.apache.tapestry5.internal.services.PageLoaderProcessor.startComponent(PageLoaderProcessor.java:699) org.apache.tapestry5.internal.services.PageLoaderProcessor.loadTemplateForComponent(PageLoaderProcessor.java:497) org.apache.tapestry5.internal.services.PageLoaderProcessor.workComponentQueue(PageLoaderProcessor.java:851) org.apache.tapestry5.internal.services.PageLoaderProcessor.loadPage(PageLoaderProcessor.java:390) org.apache.tapestry5.internal.services.PageLoaderImpl.loadPage(PageLoaderImpl.java:53) $PageLoader_11f648c8fbc.loadPage($PageLoader_11f648c8fbc.java) org.apache.tapestry5.internal.services.PagePoolCache.checkout(PagePoolCache.java:210) org.apache.tapestry5.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:99) $PagePool_11f648c8fbb.checkout($PagePool_11f648c8fbb.java) org.apache.tapestry5.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:51) $RequestPageCache_11f648c8fba.get($RequestPageCache_11f648c8fba.java) $RequestPageCache_11f648c8fb9.get($RequestPageCache_11f648c8fb9.java) org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:69) $RequestExceptionHandler_11f648c8fa4.handleRequestException($RequestExceptionHandler_11f648c8fa4.java) org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:42) $RequestHandler_11f648c8fa6.service($RequestHandler_11f648c8fa6.java)
IoC question - introducing a time delay in an ASO
Hi everyone, What are the effects of using Thread.sleep(myInterval) in an ASO? My understanding is that each user receives a separate instance of the ASO, but not necessarily on a separate thread, right? If this is true then what happens after Thread.sleep is active, and the next user asks for his/her ASO? does a new thread spawn? or is there a lag? Thanks, Peter - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5 and restrictive policies
This has come up before (for example here: http://markmail.org/thread/as67xcjkw2s2pbiw) and at the moment the only solution according to Howard is to completely deactivate security which I'm not very happy with. Howard, should I open an issue for specifying the access rights Tapestry needs or do you already have something up your sleeve? Cheers, Uli Ulrich Stärk schrieb: The policy is of course grant codeBase file:/var/lib/tomcat5.5/webapps/mailadmin/- { permission java.security.AllPermission; }; Uli Ulrich Stärk schrieb: Hi, I've got a Tomcat 5.5 installation with a very restrictive security policy in place. When I try to access my application, I get a nasty security exception: java.security.AccessControlException: access denied (java.io.FilePermission /var/lib/tomcat5.5/webapps/mailadmin/WEB-INF/classes/org/apache/tapestry5/corelib/components/Loop$1.class read) (see below for the full exception). But I have a policy that should grant everything below /var/lib/tomcat5.5/webapps/mailadmin/ (and hence also the tapestry jars in WEB-INF/lib) the AllPermission: grant codeBase file:/var/lib/tomcat5.5/webapps/mywebapp/- { permission java.security.AllPermission; }; This doesn't seem to work though. Does anyone have an idea what's wrong here? TIA, Uli java.security.AccessControlException: access denied (java.io.FilePermission /var/lib/tomcat5.5/webapps/mailadmin/WEB-INF/classes/org/apache/tapestry5/corelib/components/Loop$1.class read) java.security.AccessControlContext.checkPermission(AccessControlContext.java:323) java.security.AccessController.checkPermission(AccessController.java:546) java.lang.SecurityManager.checkPermission(SecurityManager.java:532) java.lang.SecurityManager.checkRead(SecurityManager.java:871) java.io.File.exists(File.java:731) org.apache.naming.resources.FileDirContext.file(FileDirContext.java:828) org.apache.naming.resources.FileDirContext.lookup(FileDirContext.java:211) org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:294) org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:1925) org.apache.catalina.loader.WebappClassLoader.findResource(WebappClassLoader.java:937) org.apache.catalina.loader.WebappClassLoader.getResource(WebappClassLoader.java:1072) java.lang.ClassLoader.getResource(ClassLoader.java:972) java.lang.ClassLoader.getResource(ClassLoader.java:972) org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.addClassFileToChangeTracker(ComponentInstantiatorSourceImpl.java:246) org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.onLoad(ComponentInstantiatorSourceImpl.java:192) javassist.Loader.findClass(Loader.java:340) org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$PackageAwareLoader.findClass(ComponentInstantiatorSourceImpl.java:94) javassist.Loader.loadClass(Loader.java:311) java.lang.ClassLoader.loadClass(ClassLoader.java:251) java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) org.apache.tapestry5.corelib.components.Loop.clinit(Loop.java:42) $Instantiator_11f648c8ff4.newInstance($Instantiator_11f648c8ff4.java) org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.init(InternalComponentResourcesImpl.java:132) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.init(ComponentPageElementImpl.java:559) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.newChild(ComponentPageElementImpl.java:637) org.apache.tapestry5.internal.services.PageElementFactoryImpl.newComponentElement(PageElementFactoryImpl.java:229) $PageElementFactory_11f648c8fc7.newComponentElement($PageElementFactory_11f648c8fc7.java) org.apache.tapestry5.internal.services.PageLoaderProcessor.startComponent(PageLoaderProcessor.java:699) org.apache.tapestry5.internal.services.PageLoaderProcessor.loadTemplateForComponent(PageLoaderProcessor.java:497) org.apache.tapestry5.internal.services.PageLoaderProcessor.workComponentQueue(PageLoaderProcessor.java:851) org.apache.tapestry5.internal.services.PageLoaderProcessor.loadPage(PageLoaderProcessor.java:390) org.apache.tapestry5.internal.services.PageLoaderImpl.loadPage(PageLoaderImpl.java:53) $PageLoader_11f648c8fbc.loadPage($PageLoader_11f648c8fbc.java) org.apache.tapestry5.internal.services.PagePoolCache.checkout(PagePoolCache.java:210) org.apache.tapestry5.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:99) $PagePool_11f648c8fbb.checkout($PagePool_11f648c8fbb.java) org.apache.tapestry5.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:51) $RequestPageCache_11f648c8fba.get($RequestPageCache_11f648c8fba.java) $RequestPageCache_11f648c8fb9.get($RequestPageCache_11f648c8fb9.java)
Re: IoC question - introducing a time delay in an ASO
On Wed, Feb 11, 2009 at 8:25 AM, Peter Stavrinides p.stavrini...@albourne.com wrote: Hi everyone, Hi! What are the effects of using Thread.sleep(myInterval) in an ASO? My understanding is that each user receives a separate instance of the ASO, but not necessarily on a separate thread, right? Each user receives a seperate instance of the ASO. AFAIK, getting or setting an ASO does not spawn a new thread. Don't forget that every request is one thread, so it doesn't make much sense to use a new thread to deal with ASOs, as they're going to be used in the request processing. For me :), the biggest questions is why would you want to insert a delay in ASOs? If this is true then what happens after Thread.sleep is active, and the next user asks for his/her ASO? does a new thread spawn? or is there a lag? A lag. -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] Internationalizing included js
On Wed, Feb 11, 2009 at 7:08 AM, Jonathan O'Connor ninki...@eircom.net wrote: Alex, according to Thiago, you can have string substitution in the javascript: Yes, if the Javascript is generated inside the page, not in an external file. ;) -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: IoC question - introducing a time delay in an ASO
Hi Thiago, thanks for the reply, that is pretty much what I expected... For me :), the biggest questions is why would you want to insert a delay in ASOs? I use an ASO as a token when signing users in, I use this small method to introduce a time delay (if there are multiple failed attempts, I increase the delay): private void incrementFailedLoginCount() throws InterruptedException { failedLoginCount_ += 1; if(failedLoginCount_ == 5){ sleepCount +=1; failedLoginCount_ = 0; Thread.sleep(SLEEP_INTERVAL); SLEEP_INTERVAL = (SLEEP_INTERVAL * 2); } } I haven't tested it much, but it seems to work great, I was just a bit worried if it would be thread safe or if I was doing something stupid. Cheers, Peter - Original Message - From: Thiago H. de Paula Figueiredo thiag...@gmail.com To: Tapestry users users@tapestry.apache.org Sent: Wednesday, 11 February, 2009 13:04:17 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: IoC question - introducing a time delay in an ASO On Wed, Feb 11, 2009 at 8:25 AM, Peter Stavrinides p.stavrini...@albourne.com wrote: Hi everyone, Hi! What are the effects of using Thread.sleep(myInterval) in an ASO? My understanding is that each user receives a separate instance of the ASO, but not necessarily on a separate thread, right? Each user receives a seperate instance of the ASO. AFAIK, getting or setting an ASO does not spawn a new thread. Don't forget that every request is one thread, so it doesn't make much sense to use a new thread to deal with ASOs, as they're going to be used in the request processing. For me :), the biggest questions is why would you want to insert a delay in ASOs? If this is true then what happens after Thread.sleep is active, and the next user asks for his/her ASO? does a new thread spawn? or is there a lag? A lag. -- 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: IoC question - introducing a time delay in an ASO
On Wed, Feb 11, 2009 at 9:49 AM, Peter Stavrinides p.stavrini...@albourne.com wrote: I use an ASO as a token when signing users in, I use this small method to introduce a time delay (if there are multiple failed attempts, I increase the delay): Your code doesn't delay the ASO, it delays the request processing. ;) It prevents dictionary attacks against passwords, something everyone should do. I haven't tested it much, but it seems to work great, I was just a bit worried if it would be thread safe or if I was doing something stupid. ApplicationStateManager (the Tapestry service that handles ASOs) is already thread-safe (it uses ConcurrentHashMap), so I guess you don't need to worry. ;) -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: IoC question - introducing a time delay in an ASO
On Wed, Feb 11, 2009 at 10:46 AM, James Sherwood jsherw...@rgisolutions.com wrote: Hello, Hi! Doesn't most dictionary style attacks create a new request each time therefore creating a new ASO? Kind of like closing your browser and reopening it each time? They are done by bots (programs), not people, so I guess you're right. If not this is a much better idea than mine of delaying the IP. Your code was not delaying the IP, it was delaying the session. It's not the same. Implement it using an application-wide map ip, login attempts instead of relying on an ASO. This has another advantage: you don't create a session when you don't need to. -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: IoC question - introducing a time delay in an ASO
Hello, Doesn't most dictionary style attacks create a new request each time therefore creating a new ASO? Kind of like closing your browser and reopening it each time? If not this is a much better idea than mine of delaying the IP. --James -Original Message- From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] Sent: February-11-09 8:14 AM To: Tapestry users Subject: Re: IoC question - introducing a time delay in an ASO On Wed, Feb 11, 2009 at 9:49 AM, Peter Stavrinides p.stavrini...@albourne.com wrote: I use an ASO as a token when signing users in, I use this small method to introduce a time delay (if there are multiple failed attempts, I increase the delay): Your code doesn't delay the ASO, it delays the request processing. ;) It prevents dictionary attacks against passwords, something everyone should do. I haven't tested it much, but it seems to work great, I was just a bit worried if it would be thread safe or if I was doing something stupid. ApplicationStateManager (the Tapestry service that handles ASOs) is already thread-safe (it uses ConcurrentHashMap), so I guess you don't need to worry. ;) -- 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: IoC question - introducing a time delay in an ASO
Hello, I am not him:)(if that makes sense:) but I am doing the same thing right now. I am using the database not to slow connections but block IP's that get 100 failed login attempts over 2 minutes(blocked for 1 hour). I like your idea of a map held in memory much better. But how do I create an application wide map(object) in T5? Sorry for kind of hijacking your thread Peter:) --James -Original Message- From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] Sent: February-11-09 8:52 AM To: Tapestry users Subject: Re: IoC question - introducing a time delay in an ASO On Wed, Feb 11, 2009 at 10:46 AM, James Sherwood jsherw...@rgisolutions.com wrote: Hello, Hi! Doesn't most dictionary style attacks create a new request each time therefore creating a new ASO? Kind of like closing your browser and reopening it each time? They are done by bots (programs), not people, so I guess you're right. If not this is a much better idea than mine of delaying the IP. Your code was not delaying the IP, it was delaying the session. It's not the same. Implement it using an application-wide map ip, login attempts instead of relying on an ASO. This has another advantage: you don't create a session when you don't need to. -- 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: IoC question - introducing a time delay in an ASO
Something like a singleton tapestry service with an access-synchronized map inside maybe? Uli James Sherwood schrieb: Hello, I am not him:)(if that makes sense:) but I am doing the same thing right now. I am using the database not to slow connections but block IP's that get 100 failed login attempts over 2 minutes(blocked for 1 hour). I like your idea of a map held in memory much better. But how do I create an application wide map(object) in T5? Sorry for kind of hijacking your thread Peter:) --James -Original Message- From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] Sent: February-11-09 8:52 AM To: Tapestry users Subject: Re: IoC question - introducing a time delay in an ASO On Wed, Feb 11, 2009 at 10:46 AM, James Sherwood jsherw...@rgisolutions.com wrote: Hello, Hi! Doesn't most dictionary style attacks create a new request each time therefore creating a new ASO? Kind of like closing your browser and reopening it each time? They are done by bots (programs), not people, so I guess you're right. If not this is a much better idea than mine of delaying the IP. Your code was not delaying the IP, it was delaying the session. It's not the same. Implement it using an application-wide map ip, login attempts instead of relying on an ASO. This has another advantage: you don't create a session when you don't need to. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: IoC question - introducing a time delay in an ASO
On Wed, Feb 11, 2009 at 11:16 AM, Ulrich Stärk u...@spielviel.de wrote: Something like a singleton tapestry service with an access-synchronized map inside maybe? That's what I'd do. James: sorry for mistaking your message as someone else's. :) -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] Something like GlazedLists for T5?
If I trigger an event or redirekt to an eventlink in the page class, the event handler method is obviously not allowed to return a Block. The code below doesn't work, though the onUpdateGrid is called. When I comment the lines from Link... to response... out and click an eventlink on the page the same eventhandler gets called and it does update the grid in the AJAX way without any problem.. Is there any way to trigger an EvenLink or ActionLink programmatcally, so that the eventhandler method is allowed to return a Block? The stacktrace yields this as cause: Caused by: java.lang.RuntimeException: A component event handler method returned the value Block[filterBlock within products/ProductList, at classpath:de/kcv/jbookz/pages/products/ProductList.tml, line 67, column 29]. Return type org.apache.tapestry5.internal.structure.BlockImpl can not be handled. Configured return types are java.lang.Class, java.lang.String, java.net.URL, org.apache.tapestry5.Link, org.apache.tapestry5.StreamResponse, org.apache.tapestry5.runtime.Component. Code: @OnEvent(component = filterfield, value = keyup) void onKeyUpFromFilterField(String context) throws IOException { . (Here the filtered list is constructed) Link c = resources.createEventLink(updateGrid); c.addParameter(zone, filterZone); response.sendRedirect(c); } Object onUpdateGrid() { log.info(In update Grid Event); return filterBlock; }
Re: [T5] Something like GlazedLists for T5?
Make sure all your Ajax requests have the header X-Requested-With = XMLHttpRequest. Tapestry most probably will think that requests without that header are traditional HTTP requests and then it doesn't allow you to return a Block or Zone in an event handler method. -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
T 5.1 Snapshot: error reporting
Hi, I am using the most recent snapshot. Since today I don't get any nice error reports anymore. No matter what error I introduce on purpose (missing a source for a loop component, compile errors, missing required parameters for components), the exception I get is _always_ the same, see below. Anybody with the same problem? Or is it more likely that sth. is wrong with my environment? Andy java.lang.IllegalArgumentException: Parameter namespacePrefix was null. at org.apache.tapestry5.ioc.internal.util.Defense.notNull(Defense.java:37) at org.apache.tapestry5.dom.Element.defineNamespace(Element.java:519) at org.apache.tapestry5.internal.services.MarkupWriterImpl.defineNamespace(MarkupWriterImpl.java:221) at org.apache.tapestry5.internal.services.PageLoaderProcessor$5.render(PageLoaderProcessor.java:590) at org.apache.tapestry5.internal.pageload.CompositeRenderCommand.render(CompositeRenderCommand.java:68) at org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:74) at org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:121) at $PageRenderQueue_11f65a2594e.render($PageRenderQueue_11f65a2594e.java) at $PageRenderQueue_11f65a25946.render($PageRenderQueue_11f65a25946.java) at org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37) at org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:1662) at $MarkupRenderer_11f65a25950.renderMarkup($MarkupRenderer_11f65a25950.java) at org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.java:1643) at $MarkupRenderer_11f65a25950.renderMarkup($MarkupRenderer_11f65a25950.java) at org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryModule.java:1625) at $MarkupRenderer_11f65a25950.renderMarkup($MarkupRenderer_11f65a25950.java) at org.apache.tapestry5.services.TapestryModule$22.renderMarkup(TapestryModule.java:1611) at $MarkupRenderer_11f65a25950.renderMarkup($MarkupRenderer_11f65a25950.java) at org.apache.tapestry5.services.TapestryModule$21.renderMarkup(TapestryModule.java:1597) at $MarkupRenderer_11f65a25950.renderMarkup($MarkupRenderer_11f65a25950.java) at org.apache.tapestry5.services.TapestryModule$20.renderMarkup(TapestryModule.java:1569) at $MarkupRenderer_11f65a25950.renderMarkup($MarkupRenderer_11f65a25950.java) at $MarkupRenderer_11f65a2594d.renderMarkup($MarkupRenderer_11f65a2594d.java) at org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:64) at $PageMarkupRenderer_11f65a2594b.renderPageMarkup($PageMarkupRenderer_11f65a2594b.java) at org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:61) at $PageResponseRenderer_11f65a258ee.renderPageResponse($PageResponseRenderer_11f65a258ee.java) at org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:77) at $RequestExceptionHandler_11f65a258d8.handleRequestException($RequestExceptionHandler_11f65a258d8.java) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:42) at $RequestHandler_11f65a258da.service($RequestHandler_11f65a258da.java) at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:760) at $RequestHandler_11f65a258da.service($RequestHandler_11f65a258da.java) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:750) at $RequestHandler_11f65a258da.service($RequestHandler_11f65a258da.java) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) at $RequestHandler_11f65a258da.service($RequestHandler_11f65a258da.java) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81) at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103) at $RequestHandler_11f65a258da.service($RequestHandler_11f65a258da.java) at $RequestHandler_11f65a258d0.service($RequestHandler_11f65a258d0.java) at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:194) at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) at
Re: IoC question - introducing a time delay in an ASO
What happens in a clustered environment? Tapestry services aren't part of normal HTTP session clustering. Olle 2009/2/11 Thiago H. de Paula Figueiredo thiag...@gmail.com On Wed, Feb 11, 2009 at 11:16 AM, Ulrich Stärk u...@spielviel.de wrote: Something like a singleton tapestry service with an access-synchronized map inside maybe? That's what I'd do. James: sorry for mistaking your message as someone else's. :) -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Olle Hallin Senior Java Developer and Architect olle.hal...@crisp.se www.crisp.se
RE: IoC question - introducing a time delay in an ASO
Hello, Thanks for the nudge in the right direction. I created the service and I was wondering if you could have a look at how I created it to be sure I've done it right(Everything seems to work fine but it's my first service and I want to be sure it's done right): Steps in reverse order basically: Added to page: @Inject private FailedLoginPrevention flp; Activate it: binder.bind(FailedLoginPrevention.class, FailedLoginPreventionImpl.class); Interface: public interface FailedLoginPrevention { int checkIP(String IP); } Implementation: public class FailedLoginPreventionImpl implements FailedLoginPrevention { public static MapString, FailedLoginPreventionHelper ipmap = new HashMapString, FailedLoginPreventionHelper(); @Override public synchronized int checkIP(String IP) { if (FailedLoginPreventionImpl.ipmap.containsKey(IP)) { // IP is there check last failed login FailedLoginPreventionHelper flph = FailedLoginPreventionImpl.ipmap .remove(IP); Calendar now = Calendar.getInstance(); if ((now.getTimeInMillis() - flph.getLastcheck().getTimeInMillis()) (1000 * 60 * 60 * 5)) {// 5 //last failed login was more than 5 hours ago, reset the ip's time // hours flph.setTime(0); } else { flph.setTime(flph.getTime() * 2); } flph.setLastcheck(now); FailedLoginPreventionImpl.ipmap.put(IP, flph); return flph.getTime(); } FailedLoginPreventionImpl.ipmap.put(IP, new FailedLoginPreventionHelper()); return 0; } } Helper Class: public class FailedLoginPreventionHelper { private int _time = 0; private Calendar _lastcheck = Calendar.getInstance(); public int getTime() { return _time; } public void setTime(int time) { this._time = time; } public Calendar getLastcheck() { return _lastcheck; } public void setLastcheck(Calendar lastcheck) { this._lastcheck = lastcheck; } } Thanks, --James -Original Message- From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] Sent: February-11-09 9:18 AM To: Tapestry users Subject: Re: IoC question - introducing a time delay in an ASO On Wed, Feb 11, 2009 at 11:16 AM, Ulrich Stärk u...@spielviel.de wrote: Something like a singleton tapestry service with an access-synchronized map inside maybe? That's what I'd do. James: sorry for mistaking your message as someone else's. :) -- 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: IoC question - introducing a time delay in an ASO
Thanks for the input Thiago and James, I have adjusted my implementation to use a singleton as James suggested :-) thanks! we ran a Perl script against it and it seems solid. I will stick it on the wiki for anyone interested. Cheers, Peter -- 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: James Sherwood jsherw...@rgisolutions.com To: Tapestry users users@tapestry.apache.org Sent: Wednesday, 11 February, 2009 15:07:33 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: RE: IoC question - introducing a time delay in an ASO Hello, I am not him:)(if that makes sense:) but I am doing the same thing right now. I am using the database not to slow connections but block IP's that get 100 failed login attempts over 2 minutes(blocked for 1 hour). I like your idea of a map held in memory much better. But how do I create an application wide map(object) in T5? Sorry for kind of hijacking your thread Peter:) --James -Original Message- From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] Sent: February-11-09 8:52 AM To: Tapestry users Subject: Re: IoC question - introducing a time delay in an ASO On Wed, Feb 11, 2009 at 10:46 AM, James Sherwood jsherw...@rgisolutions.com wrote: Hello, Hi! Doesn't most dictionary style attacks create a new request each time therefore creating a new ASO? Kind of like closing your browser and reopening it each time? They are done by bots (programs), not people, so I guess you're right. If not this is a much better idea than mine of delaying the IP. Your code was not delaying the IP, it was delaying the session. It's not the same. Implement it using an application-wide map ip, login attempts instead of relying on an ASO. This has another advantage: you don't create a session when you don't need to. -- 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: IoC question - introducing a time delay in an ASO
Hello, I could be wrong but worse case it would just slow down the interval, how bad or at all would depend on how you have your barracuda(or whatever) set up(IP's route to same server)? Just a shot in the dark maybe:) --James -Original Message- From: Olle Hallin [mailto:olle.hal...@gmail.com] Sent: February-11-09 10:32 AM To: Tapestry users Subject: Re: IoC question - introducing a time delay in an ASO What happens in a clustered environment? Tapestry services aren't part of normal HTTP session clustering. Olle 2009/2/11 Thiago H. de Paula Figueiredo thiag...@gmail.com On Wed, Feb 11, 2009 at 11:16 AM, Ulrich Stärk u...@spielviel.de wrote: Something like a singleton tapestry service with an access-synchronized map inside maybe? That's what I'd do. James: sorry for mistaking your message as someone else's. :) -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Olle Hallin Senior Java Developer and Architect olle.hal...@crisp.se www.crisp.se - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Construction of service 'Alias' has failed due to recursion
All I can say for this is ... the 5.1 code tracks whats going on, and reports it when an exception occur. Makes tracking this stuff down much easier. You're not making any contribution to Alias? On Mon, Feb 9, 2009 at 3:59 PM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: One situation that can raise that exception is the existence of non-static methods in Tapestry-IoC class modules (for example, AppModule). I've had this problem once. By the way, it happened for more people in this list too, so check the archives. ;) -- 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 -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5 and restrictive policies
Please open an issue. I've also been thinking that Tapestry should be making use of AccessController.doPrivileged() ... I'm just not sure exactly what things need it. Certainly, creating a ClassLoader. On Wed, Feb 11, 2009 at 2:57 AM, Ulrich Stärk u...@spielviel.de wrote: This has come up before (for example here: http://markmail.org/thread/as67xcjkw2s2pbiw) and at the moment the only solution according to Howard is to completely deactivate security which I'm not very happy with. Howard, should I open an issue for specifying the access rights Tapestry needs or do you already have something up your sleeve? Cheers, Uli Ulrich Stärk schrieb: The policy is of course grant codeBase file:/var/lib/tomcat5.5/webapps/mailadmin/- { permission java.security.AllPermission; }; Uli Ulrich Stärk schrieb: Hi, I've got a Tomcat 5.5 installation with a very restrictive security policy in place. When I try to access my application, I get a nasty security exception: java.security.AccessControlException: access denied (java.io.FilePermission /var/lib/tomcat5.5/webapps/mailadmin/WEB-INF/classes/org/apache/tapestry5/corelib/components/Loop$1.class read) (see below for the full exception). But I have a policy that should grant everything below /var/lib/tomcat5.5/webapps/mailadmin/ (and hence also the tapestry jars in WEB-INF/lib) the AllPermission: grant codeBase file:/var/lib/tomcat5.5/webapps/mywebapp/- { permission java.security.AllPermission; }; This doesn't seem to work though. Does anyone have an idea what's wrong here? TIA, Uli java.security.AccessControlException: access denied (java.io.FilePermission /var/lib/tomcat5.5/webapps/mailadmin/WEB-INF/classes/org/apache/tapestry5/corelib/components/Loop$1.class read) java.security.AccessControlContext.checkPermission(AccessControlContext.java:323) java.security.AccessController.checkPermission(AccessController.java:546) java.lang.SecurityManager.checkPermission(SecurityManager.java:532) java.lang.SecurityManager.checkRead(SecurityManager.java:871) java.io.File.exists(File.java:731) org.apache.naming.resources.FileDirContext.file(FileDirContext.java:828) org.apache.naming.resources.FileDirContext.lookup(FileDirContext.java:211) org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:294) org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:1925) org.apache.catalina.loader.WebappClassLoader.findResource(WebappClassLoader.java:937) org.apache.catalina.loader.WebappClassLoader.getResource(WebappClassLoader.java:1072) java.lang.ClassLoader.getResource(ClassLoader.java:972) java.lang.ClassLoader.getResource(ClassLoader.java:972) org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.addClassFileToChangeTracker(ComponentInstantiatorSourceImpl.java:246) org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.onLoad(ComponentInstantiatorSourceImpl.java:192) javassist.Loader.findClass(Loader.java:340) org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$PackageAwareLoader.findClass(ComponentInstantiatorSourceImpl.java:94) javassist.Loader.loadClass(Loader.java:311) java.lang.ClassLoader.loadClass(ClassLoader.java:251) java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) org.apache.tapestry5.corelib.components.Loop.clinit(Loop.java:42) $Instantiator_11f648c8ff4.newInstance($Instantiator_11f648c8ff4.java) org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.init(InternalComponentResourcesImpl.java:132) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.init(ComponentPageElementImpl.java:559) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.newChild(ComponentPageElementImpl.java:637) org.apache.tapestry5.internal.services.PageElementFactoryImpl.newComponentElement(PageElementFactoryImpl.java:229) $PageElementFactory_11f648c8fc7.newComponentElement($PageElementFactory_11f648c8fc7.java) org.apache.tapestry5.internal.services.PageLoaderProcessor.startComponent(PageLoaderProcessor.java:699) org.apache.tapestry5.internal.services.PageLoaderProcessor.loadTemplateForComponent(PageLoaderProcessor.java:497) org.apache.tapestry5.internal.services.PageLoaderProcessor.workComponentQueue(PageLoaderProcessor.java:851) org.apache.tapestry5.internal.services.PageLoaderProcessor.loadPage(PageLoaderProcessor.java:390) org.apache.tapestry5.internal.services.PageLoaderImpl.loadPage(PageLoaderImpl.java:53) $PageLoader_11f648c8fbc.loadPage($PageLoader_11f648c8fbc.java) org.apache.tapestry5.internal.services.PagePoolCache.checkout(PagePoolCache.java:210) org.apache.tapestry5.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:99) $PagePool_11f648c8fbb.checkout($PagePool_11f648c8fbb.java)
Re: IoC question - introducing a time delay in an ASO
Peter Stavrinides wrote: I use an ASO as a token when signing users in, I use this small method to introduce a time delay (if there are multiple failed attempts, I increase the delay): It would be an option to store server side when a person/system is allowed another try to login and assure all login attempts from that IP address fail until that time has passed. This would protect you against trying to login from different browser sessions. As you would need a way to identify the source of the login, the IP address is all you have, so that can still be forged. But at least you are making it more difficult for the hacker to try many possibilities. Kind regards, Joachim -- Joachim Van der Auwera PROGS bvba, progs.be - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
How to prevent default css in some pages
Hi, can I prevent rendering of default css on some pages? I have a page which launches appropriate gwt application via expression in template. It really does not need to load default.css... Damir
Re: IoC question - introducing a time delay in an ASO
I have added a page to the wiki, I will probably update it a bit still as I continue to modify this service: http://wiki.apache.org/tapestry/Tapestry5HowToMitigatingLoginAttacks Comments and suggestions encouraged! Peter - Original Message - From: Joachim Van der Auwera joac...@progs.be To: Tapestry users users@tapestry.apache.org Sent: Wednesday, 11 February, 2009 17:57:20 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: IoC question - introducing a time delay in an ASO Peter Stavrinides wrote: I use an ASO as a token when signing users in, I use this small method to introduce a time delay (if there are multiple failed attempts, I increase the delay): It would be an option to store server side when a person/system is allowed another try to login and assure all login attempts from that IP address fail until that time has passed. This would protect you against trying to login from different browser sessions. As you would need a way to identify the source of the login, the IP address is all you have, so that can still be forged. But at least you are making it more difficult for the hacker to try many possibilities. Kind regards, Joachim -- Joachim Van der Auwera PROGS bvba, progs.be - 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: Site security
Well, if you have your admin side as a separate application (on the same app-server) than the solution I mentioned could work if the front- end web-server is separate. In that case, you can link one (public) server against the app context of the public app, and a separate (internal) webserver against the context that should be inaccessible. In neither case can anyone access the app-server directly. But if you have a single web-server/app-server with both things available, then you can't really prevent access by ip/mac address reliably. You should, rather, have a user/role system in place such that only those users who are logged in and have role-based access to the admin app can even see it, let alone use it. Christian. On 11-Feb-09, at 07:08 , James Sherwood wrote: Hello, Thanks for the reply. I have a public side(anyone is allowed to access) and an admin side(very restricted), both on the same server. Will this still solve my issue if I use 2 webservers or will I need 2 separate servers? --James -Original Message- From: Christian Edward Gruber [mailto:christianedwardgru...@gmail.com] Sent: February-10-09 7:45 PM To: Tapestry users Subject: Re: Site security The best way (and this is really not a T5 issue) is not to rely on MAC or IP addresses, as these can be forged. You should set up a virtual private network, and only allow those within that VPN to access the site. The remote users log-on to the VPN, and people inside your network already have access, so no one from the internet in general can even see the server. Christian. On 10-Feb-09, at 18:31 , James Sherwood wrote: Hello, I was wondering what would be the best way to implement this security(sorry if it is outside the scope of T5): I am only going to allow a certain IP range to log into the site, however some people need to use the site from laptops on the road. What is the best way to accomplish this? I was thinking through the mac address of the machine maybe or something of that nature? Thanks, --James Christian Edward Gruber christianedwardgru...@gmail.com - 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 Christian Edward Gruber christianedwardgru...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] Internationalizing included js
Not the best option but: Don't forget that included js files are determined using Tapestry's Internationalication/Localization code.. http://tapestry.apache.org/tapestry5/guide/localization.html so: include( my.js ) would look up the right js file using the locale of the user: my_en.js my_fr.js So you could refactor your js file into two.. one for locale specific variables and messages, and another just for code.. Then tapestry will choose the correct messages js file using the user's locale... include( mymessages.js, mycode.js ) mymessages_en.js mymessages_fr.js mycode.js This won't help if you just wanted to leverage the Message bundles that the app is already using.. To do that, we would have to cook up some code and stuff to transform the js files as they are served up (no support for that at the moment ). Thiago H. de Paula Figueiredo wrote: On Wed, Feb 11, 2009 at 7:08 AM, Jonathan O'Connor ninki...@eircom.net wrote: Alex, according to Thiago, you can have string substitution in the javascript: Yes, if the Javascript is generated inside the page, not in an external file. ;) - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Security / Authentication extension for Tapestry 5
Anything came out of this or any other jsecurity integration with T5? I see tapestry-sesame project hasn't gotten out of the starting block. I'm going to start using jsecurity but wouldn't mind using/borrowing code from others. Kalle On Fri, Oct 10, 2008 at 8:17 AM, Stephan Schwab s...@caimito.net wrote: Sorry for not including the URL. Here it is: http://code.google.com/p/tapestry-sesame/ Why does one always forget these things? ;-) - -- Caimito One Team - Agile Collaboration and Planning tool http://www.caimito.net http://www.stephan-schwab.com -- View this message in context: http://www.nabble.com/Security---Authentication-extension-for-Tapestry-5-tp19920327p19921453.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Security / Authentication extension for Tapestry 5
Em Wed, 11 Feb 2009 15:17:42 -0300, Kalle Korhonen kalle.o.korho...@gmail.com escreveu: Anything came out of this or any other jsecurity integration with T5? I see tapestry-sesame project hasn't gotten out of the starting block. I'm going to start using jsecurity but wouldn't mind using/borrowing code from others. I think you can use/borrow/get some inspiration from the Tapestry-Spring Security integration, specially the page class transforming part. -- 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
Re: [T5] URL Manipulation
Howard Lewis Ship wrote: I've been doing some cleanup of some internal APIs lately with the goal to centralizing Tapestry's logic for generating and parsing component event and page render links. This will allow an application to override how that information is incorporated into the URL. In your case, you could have a Dispatcher recognize the /venue_name part and then generate a PageRenderRequestParameters object and invoke the ComponentRequestHandler.handlePageRender() pipeline method. Note: I'm talking about 5.1 here! Hi Howard, all, I've tried to implement this in 5.1 by copying the org.apache.tapestry5.internal.services.PageRenderDispatcher class, renaming it to my package and classname (SiteDispatcher), and inserting it into the dispatcher pipeline: public static void bind(ServiceBinder binder) { binder.bind(SiteDispatcher.class).withId(SiteDispatcher); } public void contributeMasterDispatcher( OrderedConfigurationDispatcher configuration, @InjectService(SiteDispatcher) Dispatcher siteDispatcher) { configuration.add(SiteDispatcher, siteDispatcher, before:PageRender); } As that seemed to be what you were suggesting. However, I'm obviously missing something because when I do this, the application links behave very strangely and end up taking me to the index page most times (presumably because the linked page didn't resolve to a known page somehow). I'd rather not have to duplicate functionality, and instead defer to the internals of Tapestry whenever possible. This approach seems to be overriding the page location functionality. I would really appreciate some more details in the suggested approach since I'm not having much luck on my own. Thank you, Levi -- View this message in context: http://n2.nabble.com/-T5--URL-Manipulation-tp2276010p2310454.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
T5 Question: how to access a parameter defined in parent component(not container) in 5.1.0.0
Hello all, It seems there is no clear document about how to access a parameter defined in parent component; previous to 5.0.18, I was using the way of declaring the parameter again in child class and it worked well; however looks like some changes in 5.1.0.0 broke the way, seems there is no link between the parameter with same name in parent and child now. The problem is when I am USING a tapestry component, it's such a comfortable experience; but when I write a sub-class of a component, I am getting frustrated: a lot of methods are package visible; there is no clear way for parameter manipulation, a typical question: can I update an attibute of parameter in parent class? If inheritance is not a good practice in Tapestry, there should be a document about it. Thanks in advance for any help, Yunhua - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5 Question: how to access a parameter defined in parent component(not container) in 5.1.0.0
I've never done it, but there's the inherit: parameter binding, maybe that's what you are looking for. Check the component paramter docs in the user guide. Uli Yunhua Sang schrieb: Hello all, It seems there is no clear document about how to access a parameter defined in parent component; previous to 5.0.18, I was using the way of declaring the parameter again in child class and it worked well; however looks like some changes in 5.1.0.0 broke the way, seems there is no link between the parameter with same name in parent and child now. The problem is when I am USING a tapestry component, it's such a comfortable experience; but when I write a sub-class of a component, I am getting frustrated: a lot of methods are package visible; there is no clear way for parameter manipulation, a typical question: can I update an attibute of parameter in parent class? If inheritance is not a good practice in Tapestry, there should be a document about it. Thanks in advance for any help, Yunhua - 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 Question: how to access a parameter defined in parent component(not container) in 5.1.0.0
Hi Uli, inherit is used between a component and its container, it doesn't work in class and sub-class scenario. Thanks, Yunhua On Wed, Feb 11, 2009 at 2:04 PM, Ulrich Stärk u...@spielviel.de wrote: I've never done it, but there's the inherit: parameter binding, maybe that's what you are looking for. Check the component paramter docs in the user guide. Uli Yunhua Sang schrieb: Hello all, It seems there is no clear document about how to access a parameter defined in parent component; previous to 5.0.18, I was using the way of declaring the parameter again in child class and it worked well; however looks like some changes in 5.1.0.0 broke the way, seems there is no link between the parameter with same name in parent and child now. The problem is when I am USING a tapestry component, it's such a comfortable experience; but when I write a sub-class of a component, I am getting frustrated: a lot of methods are package visible; there is no clear way for parameter manipulation, a typical question: can I update an attibute of parameter in parent class? If inheritance is not a good practice in Tapestry, there should be a document about it. Thanks in advance for any help, Yunhua - 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 Question: how to access a parameter defined in parent component(not container) in 5.1.0.0
I'm not aware of anything that's changed in this area; could you elaborate? On Wed, Feb 11, 2009 at 10:56 AM, Yunhua Sang yunhua.s...@gmail.com wrote: Hello all, It seems there is no clear document about how to access a parameter defined in parent component; previous to 5.0.18, I was using the way of declaring the parameter again in child class and it worked well; however looks like some changes in 5.1.0.0 broke the way, seems there is no link between the parameter with same name in parent and child now. The problem is when I am USING a tapestry component, it's such a comfortable experience; but when I write a sub-class of a component, I am getting frustrated: a lot of methods are package visible; there is no clear way for parameter manipulation, a typical question: can I update an attibute of parameter in parent class? If inheritance is not a good practice in Tapestry, there should be a document about it. Thanks in advance for any help, Yunhua - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Security / Authentication extension for Tapestry 5
Have a look at chenillekit-access. That does the trick for me. Kind regards, Joachim Kalle Korhonen wrote: Anything came out of this or any other jsecurity integration with T5? I see tapestry-sesame project hasn't gotten out of the starting block. I'm going to start using jsecurity but wouldn't mind using/borrowing code from others. Kalle On Fri, Oct 10, 2008 at 8:17 AM, Stephan Schwab s...@caimito.net wrote: Sorry for not including the URL. Here it is: http://code.google.com/p/tapestry-sesame/ Why does one always forget these things? ;-) - -- Caimito One Team - Agile Collaboration and Planning tool http://www.caimito.net http://www.stephan-schwab.com -- View this message in context: http://www.nabble.com/Security---Authentication-extension-for-Tapestry-5-tp19920327p19921453.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Joachim Van der Auwera PROGS bvba, progs.be - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Security / Authentication extension for Tapestry 5
On Wed, Feb 11, 2009 at 11:22 AM, Joachim Van der Auwera joac...@progs.bewrote: Have a look at chenillekit-access. That does the trick for me. Thanks. Yea, I'm thinking more in terms of domain security (it's not the page we need to protect, but the objects) for use in Trails. That's why I'm interested in jsecurity, which is a natural and much better fit than acegi/spring-security. But I do like Chenillekit's @Restricted on event handlers. Kalle Kind regards, Joachim Kalle Korhonen wrote: Anything came out of this or any other jsecurity integration with T5? I see tapestry-sesame project hasn't gotten out of the starting block. I'm going to start using jsecurity but wouldn't mind using/borrowing code from others. Kalle On Fri, Oct 10, 2008 at 8:17 AM, Stephan Schwab s...@caimito.net wrote: Sorry for not including the URL. Here it is: http://code.google.com/p/tapestry-sesame/ Why does one always forget these things? ;-) - -- Caimito One Team - Agile Collaboration and Planning tool http://www.caimito.net http://www.stephan-schwab.com -- View this message in context: http://www.nabble.com/Security---Authentication-extension-for-Tapestry-5-tp19920327p19921453.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Joachim Van der Auwera PROGS bvba, progs.be - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Agile 2009
I just proposed a session for Agile2009 on using Tapestry 5 in an agile development context, focusing on its rapid development capabilities (reloading, etc.) it's strong support for clean layers, no wasted code, and inversion-of-control. I thought I'd let the lists know. If anyone wants to help, or even take it over who might be better at it than I, let me know. Agile2009 is in Chicago, August 24-28 and for a session this big, hotel is complimentary, conference fee is waived, and there's a small honorarium. I have other sessions I've proposed, so I'm entirely willing to cede this to someone better than I. I just wanted to make sure it got some air-time, since I've found it very useful as a tool for agile web development. regards, Christian Christian E. Gruber - President / Senior Consultant Isráfíl Consulting Services Corporation email: cgru...@israfil.net mobile: +1 (289) 221-9839 web:http://www.israfil.net/ ...keenness of understanding is due to keenness of vision. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5 Question: how to access a parameter defined in parent component(not container) in 5.1.0.0
Hello Howard, It turns out the error occurs only when the child wants to provide its own default binding for a parameter originally defined in parent; example: public class Parent { @Parameter private String name; void setupRender() { name.toUpperCase(); // NPE happens here } } public class Child extends Parent{ @Parameter(prop:name) private String name; public String getName() { return Tom; } } Page class: public class ChildExample { @Component private Child child; } Template ChildExample.tml: html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; h3Test/h3 t:child t:id=child/ /html I am sorry for my previous inaccurate information and thanks for looking into it. Yunhua On Wed, Feb 11, 2009 at 2:15 PM, Howard Lewis Ship hls...@gmail.com wrote: I'm not aware of anything that's changed in this area; could you elaborate? On Wed, Feb 11, 2009 at 10:56 AM, Yunhua Sang yunhua.s...@gmail.com wrote: Hello all, It seems there is no clear document about how to access a parameter defined in parent component; previous to 5.0.18, I was using the way of declaring the parameter again in child class and it worked well; however looks like some changes in 5.1.0.0 broke the way, seems there is no link between the parameter with same name in parent and child now. The problem is when I am USING a tapestry component, it's such a comfortable experience; but when I write a sub-class of a component, I am getting frustrated: a lot of methods are package visible; there is no clear way for parameter manipulation, a typical question: can I update an attibute of parameter in parent class? If inheritance is not a good practice in Tapestry, there should be a document about it. Thanks in advance for any help, Yunhua - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - 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: Security / Authentication extension for Tapestry 5
Kalle Korhonen-2 wrote: Anything came out of this or any other jsecurity integration with T5? I see tapestry-sesame project hasn't gotten out of the starting block. I'm going to start using jsecurity but wouldn't mind using/borrowing code from others. Unfortunately I got quite busy with other work, which does not yet require a security module. I'd be happy, if you want to help though. Just email me and I'll set you up. Stephan - -- http://www.caimito.net - Caimito One Team - Agile Collaboration and Planning tool http://www.stephan-schwab.com - Personal blog http://code.google.com/p/tapestry-sesame - Authentication extension for Tapestry 5 -- View this message in context: http://www.nabble.com/Security---Authentication-extension-for-Tapestry-5-tp19920327p21963378.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: Site security
Hello, Thanks, The admin side is a full user/role deal but they are being very strict on security. The public side is a separate app so I'm good, thanks for your help. --James -Original Message- From: Christian Edward Gruber [mailto:christianedwardgru...@gmail.com] Sent: February-11-09 1:38 PM To: Tapestry users Subject: Re: Site security Well, if you have your admin side as a separate application (on the same app-server) than the solution I mentioned could work if the front- end web-server is separate. In that case, you can link one (public) server against the app context of the public app, and a separate (internal) webserver against the context that should be inaccessible. In neither case can anyone access the app-server directly. But if you have a single web-server/app-server with both things available, then you can't really prevent access by ip/mac address reliably. You should, rather, have a user/role system in place such that only those users who are logged in and have role-based access to the admin app can even see it, let alone use it. Christian. On 11-Feb-09, at 07:08 , James Sherwood wrote: Hello, Thanks for the reply. I have a public side(anyone is allowed to access) and an admin side(very restricted), both on the same server. Will this still solve my issue if I use 2 webservers or will I need 2 separate servers? --James -Original Message- From: Christian Edward Gruber [mailto:christianedwardgru...@gmail.com] Sent: February-10-09 7:45 PM To: Tapestry users Subject: Re: Site security The best way (and this is really not a T5 issue) is not to rely on MAC or IP addresses, as these can be forged. You should set up a virtual private network, and only allow those within that VPN to access the site. The remote users log-on to the VPN, and people inside your network already have access, so no one from the internet in general can even see the server. Christian. On 10-Feb-09, at 18:31 , James Sherwood wrote: Hello, I was wondering what would be the best way to implement this security(sorry if it is outside the scope of T5): I am only going to allow a certain IP range to log into the site, however some people need to use the site from laptops on the road. What is the best way to accomplish this? I was thinking through the mac address of the machine maybe or something of that nature? Thanks, --James Christian Edward Gruber christianedwardgru...@gmail.com - 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 Christian Edward Gruber christianedwardgru...@gmail.com - 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 was even willing to do this wrapper thing almost a year ago,all this is from going through tapestry js code last spring some things are just thoughts on what should not be done, and some may be comments on tap.js the Tapestry js code is not so complicated, and uses only a portion of prototype there can even be something like prototype slimmed for it to work as well. the components are not remotely close in complexity to any framework even prototype is overkill for tapestry. It definitely extensively used Function.bind which is a five-liner and is similar dojo.hitch, it also uses $ function which is a simple as well It should avoid prototype specific approach of expecting dom nodes prototypes upgraded and fallback to plain old utility functions why call : $(element).hide() when you can as well call (not saying code like this exists in tap.js) : Tapestry.hide($('elem')); and be more portable Tapestry core just needs to define a set of minimal js utility functions and use prototype for bas on how the funcs should work. example funcs: Tapestry.addClassName Tapestry.effect.fadeIn - total light version of js might do no fade and just display content Tapestry.calcPos - absolute pos for element so a floated one can be aligned to it some subset of jquery like funcs to more easily find nodes (but search only) no magic calls to change all nodes properties and shit. if a submit button can not get context why do crazy stuff in js that is not necessary after that adding/using other js frameworks would be no problem for those that like them. unfortunately I lost a bit of interest after some of my patches not making in the framework for a long time :(:( I don't mean to bash on T5, and I do hope I make more time for it in following moths. The blame could be on me as well, a year has almost passed since I looked into this, and haven't done much since. :(:( Davor Hrg On Wed, Feb 4, 2009 at 8:17 AM, Peter Stavrinides p.stavrini...@albourne.com wrote: it would be nice if a component could indicate that the scripts should be at the top for the entire page Vote for this Jira, which requests exactly that: https://issues.apache.org/jira/browse/TAP5-369 Peter - Original Message - From: Joachim Van der Auwera joac...@progs.be To: Tapestry users users@tapestry.apache.org Sent: Monday, 2 February, 2009 17:22:06 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Switch from Prototype to jQuery? I am not so sure. Do all pages/components work the same way if you move the scripts to the top? If that is the case, then it would be nice if a component could indicate that the scripts should be at the top for the entire page. If not, then there is a problem if you want to combine a component which requires scripts at the top with a component which requires scripts at the bottom. Joachim Kevin Menard wrote: This was an older app that I haven't needed to revisit. At the time, no such directive existed. If it does, great. Then I guess there really aren't any problems after all. -- Joachim Van der Auwera PROGS bvba, progs.be - 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?
One small example from tapestry.js when looking at this as prototype centric app it is totaly ok, but from the angle of enabling other libs this approach is completely unnecessary and easily fixed. again this is one example (rewriting all may not be as easy).. this code is called (tapestry.js:551) Element.addMethods(['INPUT', 'SELECT', 'TEXTAREA'], ... getFieldEventManager : function(field) ... searching whole source for tapestry core reveals that this function is only used in tapestry.js tapestry.js:588 element.getFieldEventManager().showValidationMessage(message); the code can easily be rewriten to use Tapestry.getFieldEventManager(element).showValidationMessage(message); this removes need for prototype and extending dome nodes for this example You can argue that other projects might rely on tapestry doing things like this, but an compatible version for prototype can be left like this and version for other libs with the new approach (the other libs don't like prototype.js anyway). This can mean that people with other js libs are fixed to tapestry core only but this I suppose is ok for many Davor Hrg On Wed, Feb 11, 2009 at 10:14 PM, Davor Hrg hrgda...@gmail.com wrote: I was even willing to do this wrapper thing almost a year ago,all this is from going through tapestry js code last spring some things are just thoughts on what should not be done, and some may be comments on tap.js the Tapestry js code is not so complicated, and uses only a portion of prototype there can even be something like prototype slimmed for it to work as well. the components are not remotely close in complexity to any framework even prototype is overkill for tapestry. It definitely extensively used Function.bind which is a five-liner and is similar dojo.hitch, it also uses $ function which is a simple as well It should avoid prototype specific approach of expecting dom nodes prototypes upgraded and fallback to plain old utility functions why call : $(element).hide() when you can as well call (not saying code like this exists in tap.js) : Tapestry.hide($('elem')); and be more portable Tapestry core just needs to define a set of minimal js utility functions and use prototype for bas on how the funcs should work. example funcs: Tapestry.addClassName Tapestry.effect.fadeIn - total light version of js might do no fade and just display content Tapestry.calcPos - absolute pos for element so a floated one can be aligned to it some subset of jquery like funcs to more easily find nodes (but search only) no magic calls to change all nodes properties and shit. if a submit button can not get context why do crazy stuff in js that is not necessary after that adding/using other js frameworks would be no problem for those that like them. unfortunately I lost a bit of interest after some of my patches not making in the framework for a long time :(:( I don't mean to bash on T5, and I do hope I make more time for it in following moths. The blame could be on me as well, a year has almost passed since I looked into this, and haven't done much since. :(:( Davor Hrg On Wed, Feb 4, 2009 at 8:17 AM, Peter Stavrinides p.stavrini...@albourne.com wrote: it would be nice if a component could indicate that the scripts should be at the top for the entire page Vote for this Jira, which requests exactly that: https://issues.apache.org/jira/browse/TAP5-369 Peter - Original Message - From: Joachim Van der Auwera joac...@progs.be To: Tapestry users users@tapestry.apache.org Sent: Monday, 2 February, 2009 17:22:06 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Switch from Prototype to jQuery? I am not so sure. Do all pages/components work the same way if you move the scripts to the top? If that is the case, then it would be nice if a component could indicate that the scripts should be at the top for the entire page. If not, then there is a problem if you want to combine a component which requires scripts at the top with a component which requires scripts at the bottom. Joachim Kevin Menard wrote: This was an older app that I haven't needed to revisit. At the time, no such directive existed. If it does, great. Then I guess there really aren't any problems after all. -- Joachim Van der Auwera PROGS bvba, progs.be - 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?
These are all good points. When this last flared up, at least a year back, I didn't want to tackle it because I could not then say what the minimal set of functionality would be. I think we're closer now. Coding in such a way that we can easily swap out or mix-n-match Prototype and jQuery will make people very happy. On Wed, Feb 11, 2009 at 2:07 PM, Davor Hrg hrgda...@gmail.com wrote: One small example from tapestry.js when looking at this as prototype centric app it is totaly ok, but from the angle of enabling other libs this approach is completely unnecessary and easily fixed. again this is one example (rewriting all may not be as easy).. this code is called (tapestry.js:551) Element.addMethods(['INPUT', 'SELECT', 'TEXTAREA'], ... getFieldEventManager : function(field) ... searching whole source for tapestry core reveals that this function is only used in tapestry.js tapestry.js:588 element.getFieldEventManager().showValidationMessage(message); the code can easily be rewriten to use Tapestry.getFieldEventManager(element).showValidationMessage(message); this removes need for prototype and extending dome nodes for this example You can argue that other projects might rely on tapestry doing things like this, but an compatible version for prototype can be left like this and version for other libs with the new approach (the other libs don't like prototype.js anyway). This can mean that people with other js libs are fixed to tapestry core only but this I suppose is ok for many Davor Hrg On Wed, Feb 11, 2009 at 10:14 PM, Davor Hrg hrgda...@gmail.com wrote: I was even willing to do this wrapper thing almost a year ago,all this is from going through tapestry js code last spring some things are just thoughts on what should not be done, and some may be comments on tap.js the Tapestry js code is not so complicated, and uses only a portion of prototype there can even be something like prototype slimmed for it to work as well. the components are not remotely close in complexity to any framework even prototype is overkill for tapestry. It definitely extensively used Function.bind which is a five-liner and is similar dojo.hitch, it also uses $ function which is a simple as well It should avoid prototype specific approach of expecting dom nodes prototypes upgraded and fallback to plain old utility functions why call : $(element).hide() when you can as well call (not saying code like this exists in tap.js) : Tapestry.hide($('elem')); and be more portable Tapestry core just needs to define a set of minimal js utility functions and use prototype for bas on how the funcs should work. example funcs: Tapestry.addClassName Tapestry.effect.fadeIn - total light version of js might do no fade and just display content Tapestry.calcPos - absolute pos for element so a floated one can be aligned to it some subset of jquery like funcs to more easily find nodes (but search only) no magic calls to change all nodes properties and shit. if a submit button can not get context why do crazy stuff in js that is not necessary after that adding/using other js frameworks would be no problem for those that like them. unfortunately I lost a bit of interest after some of my patches not making in the framework for a long time :(:( I don't mean to bash on T5, and I do hope I make more time for it in following moths. The blame could be on me as well, a year has almost passed since I looked into this, and haven't done much since. :(:( Davor Hrg On Wed, Feb 4, 2009 at 8:17 AM, Peter Stavrinides p.stavrini...@albourne.com wrote: it would be nice if a component could indicate that the scripts should be at the top for the entire page Vote for this Jira, which requests exactly that: https://issues.apache.org/jira/browse/TAP5-369 Peter - Original Message - From: Joachim Van der Auwera joac...@progs.be To: Tapestry users users@tapestry.apache.org Sent: Monday, 2 February, 2009 17:22:06 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Switch from Prototype to jQuery? I am not so sure. Do all pages/components work the same way if you move the scripts to the top? If that is the case, then it would be nice if a component could indicate that the scripts should be at the top for the entire page. If not, then there is a problem if you want to combine a component which requires scripts at the top with a component which requires scripts at the bottom. Joachim Kevin Menard wrote: This was an older app that I haven't needed to revisit. At the time, no such directive existed. If it does, great. Then I guess there really aren't any problems after all. -- Joachim Van der Auwera PROGS bvba, progs.be - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail:
Re: Agile 2009
I'd like to be of help; I'm not an expert at Agile (something about working alone without specific schedules undermines that), but I do practice the principles of an agile developer, to the best of my knowledge. In any case, I'm glad this is being covered. On Wed, Feb 11, 2009 at 12:00 PM, Christian Edward Gruber cgru...@israfil.net wrote: I just proposed a session for Agile2009 on using Tapestry 5 in an agile development context, focusing on its rapid development capabilities (reloading, etc.) it's strong support for clean layers, no wasted code, and inversion-of-control. I thought I'd let the lists know. If anyone wants to help, or even take it over who might be better at it than I, let me know. Agile2009 is in Chicago, August 24-28 and for a session this big, hotel is complimentary, conference fee is waived, and there's a small honorarium. I have other sessions I've proposed, so I'm entirely willing to cede this to someone better than I. I just wanted to make sure it got some air-time, since I've found it very useful as a tool for agile web development. regards, Christian Christian E. Gruber - President / Senior Consultant Isráfíl Consulting Services Corporation email: cgru...@israfil.net mobile: +1 (289) 221-9839 web:http://www.israfil.net/ ...keenness of understanding is due to keenness of vision. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: ServletMultipartDecoder Question
the version i use was Tapestry 4.1.6, the main problem is the upload file'id;in your code: *UploadedFile file = decoder.getFileUpload(Filedata); * Filedata is the upload file'id? and all the files uploaded from the swfupload have the same id Filedata? if not, Could you tell me how you get all the uploaded file'id please? 2009/2/11 akochnev akoch...@gmail.com I tried responding to this from my email; however, I got bumped cause apache didn't like my email for spam reasons... Anyway.. Search for SwfUploader on the mailing list archive for more details, the short version of it is: 1. Add tapestry5-upload as a dependency to your project 2. In your page: * inject the MultiPartDecoder, e.g. @Inject private MultipartDecoder decoder; * in your event handler , you can get access the uploaded data : UploadedFile file = decoder.getFileUpload(Filedata); I'm using SwfUploader to upload multiple files using this approach, works like magic ! Cheers, Alex Kotchnev Wayward Java小白 wrote: i want to upload several file in one request. in my upload page, i have only one componet upload these files. in ServletMultipartDecoder Service find a getFileUpload(String parameterName),but i can't give name of every file. could i get all the files in the request from ServletMultipartDecoder Service? -- View this message in context: http://n2.nabble.com/ServletMultipartDecoder-Question-tp2301706p2306759.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Agile 2009
That's awesome, Howard. I'll send an off-list message on getting signed up to the submissions system. Christian. On 11-Feb-09, at 20:04 , Howard Lewis Ship wrote: I'd like to be of help; I'm not an expert at Agile (something about working alone without specific schedules undermines that), but I do practice the principles of an agile developer, to the best of my knowledge. In any case, I'm glad this is being covered. On Wed, Feb 11, 2009 at 12:00 PM, Christian Edward Gruber cgru...@israfil.net wrote: I just proposed a session for Agile2009 on using Tapestry 5 in an agile development context, focusing on its rapid development capabilities (reloading, etc.) it's strong support for clean layers, no wasted code, and inversion-of-control. I thought I'd let the lists know. If anyone wants to help, or even take it over who might be better at it than I, let me know. Agile2009 is in Chicago, August 24-28 and for a session this big, hotel is complimentary, conference fee is waived, and there's a small honorarium. I have other sessions I've proposed, so I'm entirely willing to cede this to someone better than I. I just wanted to make sure it got some air- time, since I've found it very useful as a tool for agile web development. regards, Christian Christian E. Gruber - President / Senior Consultant Isráfíl Consulting Services Corporation email: cgru...@israfil.net mobile: +1 (289) 221-9839 web:http://www.israfil.net/ ...keenness of understanding is due to keenness of vision. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org Christian Edward Gruber christianedwardgru...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Agile 2009
Ok, I'm in as hlship ... see if you can add me to the proposal. Great idea, thanks! On Wed, Feb 11, 2009 at 6:06 PM, Christian Edward Gruber christianedwardgru...@gmail.com wrote: That's awesome, Howard. I'll send an off-list message on getting signed up to the submissions system. Christian. On 11-Feb-09, at 20:04 , Howard Lewis Ship wrote: I'd like to be of help; I'm not an expert at Agile (something about working alone without specific schedules undermines that), but I do practice the principles of an agile developer, to the best of my knowledge. In any case, I'm glad this is being covered. On Wed, Feb 11, 2009 at 12:00 PM, Christian Edward Gruber cgru...@israfil.net wrote: I just proposed a session for Agile2009 on using Tapestry 5 in an agile development context, focusing on its rapid development capabilities (reloading, etc.) it's strong support for clean layers, no wasted code, and inversion-of-control. I thought I'd let the lists know. If anyone wants to help, or even take it over who might be better at it than I, let me know. Agile2009 is in Chicago, August 24-28 and for a session this big, hotel is complimentary, conference fee is waived, and there's a small honorarium. I have other sessions I've proposed, so I'm entirely willing to cede this to someone better than I. I just wanted to make sure it got some air-time, since I've found it very useful as a tool for agile web development. regards, Christian Christian E. Gruber - President / Senior Consultant Isráfíl Consulting Services Corporation email: cgru...@israfil.net mobile: +1 (289) 221-9839 web:http://www.israfil.net/ ...keenness of understanding is due to keenness of vision. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org Christian Edward Gruber christianedwardgru...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Agile 2009
Ok, you're a co-presenter. I'm not sure if you can edit now or not. I'll figure out how to re-order us with you as primary (so if it gets accepted, you get the comp). I may have to get an admin to do it. Take a look at the submission http://www.agile2009.org/node/1424 and let me know what you think. We can evolve the presentation a bit. At this point it just needs overview and approach for the reviewers, so see if you want to change it. If it's accepted, we can get to the harder work of figuring out how to stage it properly. Christian. On 11-Feb-09, at 21:18 , Howard Lewis Ship wrote: Ok, I'm in as hlship ... see if you can add me to the proposal. Great idea, thanks! On Wed, Feb 11, 2009 at 6:06 PM, Christian Edward Gruber christianedwardgru...@gmail.com wrote: That's awesome, Howard. I'll send an off-list message on getting signed up to the submissions system. Christian. On 11-Feb-09, at 20:04 , Howard Lewis Ship wrote: I'd like to be of help; I'm not an expert at Agile (something about working alone without specific schedules undermines that), but I do practice the principles of an agile developer, to the best of my knowledge. In any case, I'm glad this is being covered. On Wed, Feb 11, 2009 at 12:00 PM, Christian Edward Gruber cgru...@israfil.net wrote: I just proposed a session for Agile2009 on using Tapestry 5 in an agile development context, focusing on its rapid development capabilities (reloading, etc.) it's strong support for clean layers, no wasted code, and inversion-of-control. I thought I'd let the lists know. If anyone wants to help, or even take it over who might be better at it than I, let me know. Agile2009 is in Chicago, August 24-28 and for a session this big, hotel is complimentary, conference fee is waived, and there's a small honorarium. I have other sessions I've proposed, so I'm entirely willing to cede this to someone better than I. I just wanted to make sure it got some air-time, since I've found it very useful as a tool for agile web development. regards, Christian Christian E. Gruber - President / Senior Consultant Isráfíl Consulting Services Corporation email: cgru...@israfil.net mobile: +1 (289) 221-9839 web:http://www.israfil.net/ ...keenness of understanding is due to keenness of vision. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org Christian Edward Gruber christianedwardgru...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org Christian Edward Gruber christianedwardgru...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: ServletMultipartDecoder Question
I apologize : the proposed solution was for T5, not 4.1 . I must have overlooked your mention of T4. Unfortunately, I'm unable to offer any advice on T4. Cheers, Alex Kotchnev 2009/2/11 Wayward Java小白 ghost...@gmail.com the version i use was Tapestry 4.1.6, the main problem is the upload file'id;in your code: *UploadedFile file = decoder.getFileUpload(Filedata); * Filedata is the upload file'id? and all the files uploaded from the swfupload have the same id Filedata? if not, Could you tell me how you get all the uploaded file'id please? 2009/2/11 akochnev akoch...@gmail.com I tried responding to this from my email; however, I got bumped cause apache didn't like my email for spam reasons... Anyway.. Search for SwfUploader on the mailing list archive for more details, the short version of it is: 1. Add tapestry5-upload as a dependency to your project 2. In your page: * inject the MultiPartDecoder, e.g. @Inject private MultipartDecoder decoder; * in your event handler , you can get access the uploaded data : UploadedFile file = decoder.getFileUpload(Filedata); I'm using SwfUploader to upload multiple files using this approach, works like magic ! Cheers, Alex Kotchnev Wayward Java小白 wrote: i want to upload several file in one request. in my upload page, i have only one componet upload these files. in ServletMultipartDecoder Service find a getFileUpload(String parameterName),but i can't give name of every file. could i get all the files in the request from ServletMultipartDecoder Service? -- View this message in context: http://n2.nabble.com/ServletMultipartDecoder-Question-tp2301706p2306759.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] Internationalizing included js
Thiago / Jonathan / Fernando, thanks for everyone's input ! Indeed, the asset localization of js does work out OK. Refactoring the code would certainly get the job done. I've also used the ${message:foo} expansions in js that's included in a page, that works OK too. I guess the issue is that I was trying to package up a component that has some error messages in a js file. Ideally, all messages would be in message bundles, and adding a translation would only involve dealing with bundles (as that provides the least opportunities for mistakes). I just wanted to make sure that I'm not missing something obvious in how to handle the issue. Cheers, Alex Kotchnev On Wed, Feb 11, 2009 at 12:52 PM, Fernando Padilla f...@alum.mit.eduwrote: Not the best option but: Don't forget that included js files are determined using Tapestry's Internationalication/Localization code.. http://tapestry.apache.org/tapestry5/guide/localization.html so: include( my.js ) would look up the right js file using the locale of the user: my_en.js my_fr.js So you could refactor your js file into two.. one for locale specific variables and messages, and another just for code.. Then tapestry will choose the correct messages js file using the user's locale... include( mymessages.js, mycode.js ) mymessages_en.js mymessages_fr.js mycode.js This won't help if you just wanted to leverage the Message bundles that the app is already using.. To do that, we would have to cook up some code and stuff to transform the js files as they are served up (no support for that at the moment ). Thiago H. de Paula Figueiredo wrote: On Wed, Feb 11, 2009 at 7:08 AM, Jonathan O'Connor ninki...@eircom.net wrote: Alex, according to Thiago, you can have string substitution in the javascript: Yes, if the Javascript is generated inside the page, not in an external file. ;) - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org