Re: [ANNOUNCEMENT] Tapestry-resteasy 0.0.1 released!
Nice! Already tried your contribution, and we were looking for that evolution. I look forward to see how it works now. On Mon, Mar 29, 2010 at 12:40 AM, Alejandro Scandroli alejandroscandr...@gmail.com wrote: It's done! The (yet to be released) tapestry-resteasy 0.2.0 is droppinable, just drop it in and run. It doesn't need any web.xml configuration at all. Cheers! Alejandro. On Fri, Jan 22, 2010 at 8:07 PM, Kalle Korhonen kalle.o.korho...@gmail.com wrote: On Fri, Jan 22, 2010 at 10:49 AM, Howard Lewis Ship hls...@gmail.com wrote: Looks nice; you guys have been very busy! Thanks Howard! Oh I think we are mostly just publishing code we've been sitting on for some time. I'm a little surprised at the amount of web.xml configuration; I don't know enough about the JBoss code, but it seems like something that could be handled using a contribution to the HttpServletRequest pipeline, and not require web.xml configuration to work, just drop it in and run. But I'm likely missing some details. Like I said, just blame Alejandro :) No, just kidding - I think you are completely right at least about the filter config. It's been awhile since I last worked on Jersey, but I think the spec required a servlet config for some odd bootstrapping reason but that could have changed. Of course we could still do whatever we like with all the power of Tapestry's plumbing at our fingertips and I think it's a worthy goal so we could really claim it to be a drop-in module. Let's add it as an enhancement request (and we are always looking for good committers :P ) Kalle On Fri, Jan 22, 2010 at 10:19 AM, Kalle Korhonen kalle.o.korho...@gmail.com wrote: JAX-RS is simple and cool, and we at Tynamo project (http://tynamo.org) wanted to make it even simpler for you Tapestry dudes! Tapestry-resteasy is a drop-in module for making your webapplication RESTful. Follow our tapestry-resteasy guide (http://tynamo.org/tapestry-resteasy+guide) to set it up. Tapestry-resteasy 0.0.1 is available from Maven central but note that not all of the JBoss or java.net jars are in Central repo, so if you are one of the poor developers who are running Maven not backed up by a proper repository proxy, you can activate -Prepositories profile to enable downloading directly from the JBoss and java.net repositories. Have fun with it! Oh and if something goes wrong, don't blame me, this module is all Alejandro Scandroli's ingenious work! PS. We also have another announcement to make - Piero Sartini, the founder of tapestry-jpa module, has joined our ranks. Join me in welcoming him to the project! Besides the experience, he also brought the code with him to be hosted as part of Tynamo.org - so you know what it means, more about full JPA2 integration to follow! - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.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 - 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: easyfckeditor and file upload
Hi, I use jetty 6.1.9 as a maven plugin. Problem occurs in Windows and Linux this is my implementation of FckEditorUserRightService public class SimpleFckEditorUserRightServiceImpl implements FckEditorUserRightService { private final Logger logger; public SimpleFckEditorUserRightServiceImpl(Logger logger) { this.logger = logger; } @Override public boolean canCreateFolders() { logger.info(Allowed folder creation); return false; } @Override public boolean canBrowseFiles() { logger.info(Allowed file browsing); return true; } @Override public boolean canUploadFiles() { logger.info(Allowed file upload); return false; } } FckEditorPathService interface public class SimpleFckEditorPathServiceImpl implements FckEditorPathService { @Override public String getServerPathForFiles() { return /wwwfiles; } @Override public String getClientURLStartForFiles() { return C:\\logs\\wwwfiles\\; } } pom.xml !-- Run the application using mvn jetty:run -- plugin groupIdorg.mortbay.jetty/groupId artifactIdmaven-jetty-plugin/artifactId version6.1.9/version configuration !-- Log to the console. -- requestLog implementation=org.mortbay.jetty.NCSARequestLog !-- This doesn't do anything for Jetty, but is a workaround for a Maven bug that prevents the requestLog from being set. -- appendtrue/append /requestLog contextHandlers contextHandler implementation=org.mortbay.jetty.handler.ContextHandler contextPath/wwwfiles/contextPath resourceBaseC:\logs\wwwfiles/resourceBase handler implementation=org.mortbay.jetty.handler.ResourceHandler/handler /contextHandler /contextHandlers /configuration /plugin and AppModule.java public static void bind(ServiceBinder binder) { binder.bind(FckEditorUserRightService.class, SimpleFckEditorUserRightServiceImpl.class); binder.bind(FckEditorPathService.class, SimpleFckEditorPathServiceImpl.class); binder.bind(FckEditorConnector.class, SimleFckEditorConnector.class); } As You see I just copied the tutorial. [INFO] Started Jetty Server [INFO] connector.Dispatcher Connector initialized to com.orientimport.easyfck.connector.FckEditorConnectorBridge [DEBUG] AppModule.FckEditorConnector Creating service 'FckEditorConnector'. [WARN] TapestryModule.HttpServletRequestHandler Unable to add 'FckEditorInterceptFilter' as a dependency of 'StoreIntoGlobals', as that forms a dependency cycle ('StoreIntoGlobals' depends on itself via 'FckEditorInterceptFilter'). The dependency has been ignored. . [INFO] AppModule.TimingFilter Request time: 16 ms 127.0.0.1 - - [29/mar/2010:08:03:44 +] GET /paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditorToolbar=Default HTTP/1.1 304 0 http://localhost:8080/paruszynska/pagecms; Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 (.NET CLR 3.5.30729) 127.0.0.1 - - [29/mar/2010:08:03:45 +] GET /paruszynska/assets/easyfck/configure?id=fckeditor/fck.js HTTP/1.1 200 1051 http://localhost:8080/paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditorToolbar=Default; Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 (.NET CLR 3.5.30729) [INFO] handlers.RequestCycleHandler UserAction initialized to com.orientimport.easyfck.resolvers.FckEditorUserRightsResolver [INFO] handlers.RequestCycleHandler UserPathBuilder initialized to com.orientimport.easyfck.resolvers.FckEditorPathResolver [DEBUG] AppModule.FckEditorUserRightService Creating service 'FckEditorUserRightService'. [DEBUG] AppModule.FckEditorUserRightService Invoking constructor pl.syso.paruszynska.services.SimpleFckEditorUserRightServiceImpl(Logger) (at SimpleFckEditorUserRightServiceImpl.java:18) via pl.syso.paruszynska.services.AppModule.bind(Servi ceBinder) (at AppModule.java:35). [INFO] AppModule.FckEditorUserRightService Allowed file browsing [DEBUG] AppModule.FckEditorPathService Creating service 'FckEditorPathService'. [DEBUG] AppModule.FckEditorPathService Invoking constructor pl.syso.paruszynska. services.SimpleFckEditorPathServiceImpl() (at SimpleFckEditorPathServiceImpl.java:14) via pl.syso.paruszynska.services.AppModule.bind(ServiceBinder) (at AppModule.java:35). [DEBUG] AppModule.FckEditorConnector Invoking constructor pl.syso.paruszynska.services.SimleFckEditorConnector() (at SimleFckEditorConnector.java:27) via pl.syso.paruszynska.services.AppModule.bind(ServiceBinder) (at
custom Expires: header?
How do I add custom logic for the Expires: header in my module? - contributeRequestHandler doesn't seem to work - decorateResponse doesn't seem to work I'm just curious - at which point Expires: 0 header is set and how could I override this default behavior? -- Ilya Obshadko
Re: easyfckeditor and file upload
Hi, this seems to be hard to reproduce, as I've run now tests for over an hour. The version of easyfck is 1.0.4, right? If you can share the project with me for testing purposes I would be more than happy to download it and debug it. I understand if you don't wish to share it though. Any pointers how to reproduce are welcome. You should check that your Java process has read and write rights to the directory where you put the files ie. C:\\logs\\wwwfiles\\ directory. I also tested with jetty 6.1.9, 6.1.14 and 6.1.22 without problems. - Ville Ps. We have this working on multiple production systems. Tomek-28 wrote: Hi, I use jetty 6.1.9 as a maven plugin. Problem occurs in Windows and Linux this is my implementation of FckEditorUserRightService public class SimpleFckEditorUserRightServiceImpl implements FckEditorUserRightService { private final Logger logger; public SimpleFckEditorUserRightServiceImpl(Logger logger) { this.logger = logger; } @Override public boolean canCreateFolders() { logger.info(Allowed folder creation); return false; } @Override public boolean canBrowseFiles() { logger.info(Allowed file browsing); return true; } @Override public boolean canUploadFiles() { logger.info(Allowed file upload); return false; } } FckEditorPathService interface public class SimpleFckEditorPathServiceImpl implements FckEditorPathService { @Override public String getServerPathForFiles() { return /wwwfiles; } @Override public String getClientURLStartForFiles() { return C:\\logs\\wwwfiles\\; } } pom.xml !-- Run the application using mvn jetty:run -- plugin groupIdorg.mortbay.jetty/groupId artifactIdmaven-jetty-plugin/artifactId version6.1.9/version configuration !-- Log to the console. -- requestLog implementation=org.mortbay.jetty.NCSARequestLog !-- This doesn't do anything for Jetty, but is a workaround for a Maven bug that prevents the requestLog from being set. -- appendtrue/append /requestLog contextHandlers contextHandler implementation=org.mortbay.jetty.handler.ContextHandler contextPath/wwwfiles/contextPath resourceBaseC:\logs\wwwfiles/resourceBase handler implementation=org.mortbay.jetty.handler.ResourceHandler/handler /contextHandler /contextHandlers /configuration /plugin and AppModule.java public static void bind(ServiceBinder binder) { binder.bind(FckEditorUserRightService.class, SimpleFckEditorUserRightServiceImpl.class); binder.bind(FckEditorPathService.class, SimpleFckEditorPathServiceImpl.class); binder.bind(FckEditorConnector.class, SimleFckEditorConnector.class); } As You see I just copied the tutorial. [INFO] Started Jetty Server [INFO] connector.Dispatcher Connector initialized to com.orientimport.easyfck.connector.FckEditorConnectorBridge [DEBUG] AppModule.FckEditorConnector Creating service 'FckEditorConnector'. [WARN] TapestryModule.HttpServletRequestHandler Unable to add 'FckEditorInterceptFilter' as a dependency of 'StoreIntoGlobals', as that forms a dependency cycle ('StoreIntoGlobals' depends on itself via 'FckEditorInterceptFilter'). The dependency has been ignored. . [INFO] AppModule.TimingFilter Request time: 16 ms 127.0.0.1 - - [29/mar/2010:08:03:44 +] GET /paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditorToolbar=Default HTTP/1.1 304 0 http://localhost:8080/paruszynska/pagecms; Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 (.NET CLR 3.5.30729) 127.0.0.1 - - [29/mar/2010:08:03:45 +] GET /paruszynska/assets/easyfck/configure?id=fckeditor/fck.js HTTP/1.1 200 1051 http://localhost:8080/paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditorToolbar=Default; Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 (.NET CLR 3.5.30729) [INFO] handlers.RequestCycleHandler UserAction initialized to com.orientimport.easyfck.resolvers.FckEditorUserRightsResolver [INFO] handlers.RequestCycleHandler UserPathBuilder initialized to com.orientimport.easyfck.resolvers.FckEditorPathResolver [DEBUG] AppModule.FckEditorUserRightService Creating service 'FckEditorUserRightService'. [DEBUG] AppModule.FckEditorUserRightService Invoking constructor
Re: easyfckeditor and file upload
Hi, also forgot to mention that 1.0.5 version contains fix for that warning during startup, however it shouldn't affect anything. I'll try to release 1.0.5 as soon as We've solved this problem. - Ville Tomek-28 wrote: Hi, I use jetty 6.1.9 as a maven plugin. Problem occurs in Windows and Linux this is my implementation of FckEditorUserRightService public class SimpleFckEditorUserRightServiceImpl implements FckEditorUserRightService { private final Logger logger; public SimpleFckEditorUserRightServiceImpl(Logger logger) { this.logger = logger; } @Override public boolean canCreateFolders() { logger.info(Allowed folder creation); return false; } @Override public boolean canBrowseFiles() { logger.info(Allowed file browsing); return true; } @Override public boolean canUploadFiles() { logger.info(Allowed file upload); return false; } } FckEditorPathService interface public class SimpleFckEditorPathServiceImpl implements FckEditorPathService { @Override public String getServerPathForFiles() { return /wwwfiles; } @Override public String getClientURLStartForFiles() { return C:\\logs\\wwwfiles\\; } } pom.xml !-- Run the application using mvn jetty:run -- plugin groupIdorg.mortbay.jetty/groupId artifactIdmaven-jetty-plugin/artifactId version6.1.9/version configuration !-- Log to the console. -- requestLog implementation=org.mortbay.jetty.NCSARequestLog !-- This doesn't do anything for Jetty, but is a workaround for a Maven bug that prevents the requestLog from being set. -- appendtrue/append /requestLog contextHandlers contextHandler implementation=org.mortbay.jetty.handler.ContextHandler contextPath/wwwfiles/contextPath resourceBaseC:\logs\wwwfiles/resourceBase handler implementation=org.mortbay.jetty.handler.ResourceHandler/handler /contextHandler /contextHandlers /configuration /plugin and AppModule.java public static void bind(ServiceBinder binder) { binder.bind(FckEditorUserRightService.class, SimpleFckEditorUserRightServiceImpl.class); binder.bind(FckEditorPathService.class, SimpleFckEditorPathServiceImpl.class); binder.bind(FckEditorConnector.class, SimleFckEditorConnector.class); } As You see I just copied the tutorial. [INFO] Started Jetty Server [INFO] connector.Dispatcher Connector initialized to com.orientimport.easyfck.connector.FckEditorConnectorBridge [DEBUG] AppModule.FckEditorConnector Creating service 'FckEditorConnector'. [WARN] TapestryModule.HttpServletRequestHandler Unable to add 'FckEditorInterceptFilter' as a dependency of 'StoreIntoGlobals', as that forms a dependency cycle ('StoreIntoGlobals' depends on itself via 'FckEditorInterceptFilter'). The dependency has been ignored. . [INFO] AppModule.TimingFilter Request time: 16 ms 127.0.0.1 - - [29/mar/2010:08:03:44 +] GET /paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditorToolbar=Default HTTP/1.1 304 0 http://localhost:8080/paruszynska/pagecms; Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 (.NET CLR 3.5.30729) 127.0.0.1 - - [29/mar/2010:08:03:45 +] GET /paruszynska/assets/easyfck/configure?id=fckeditor/fck.js HTTP/1.1 200 1051 http://localhost:8080/paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditorToolbar=Default; Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 (.NET CLR 3.5.30729) [INFO] handlers.RequestCycleHandler UserAction initialized to com.orientimport.easyfck.resolvers.FckEditorUserRightsResolver [INFO] handlers.RequestCycleHandler UserPathBuilder initialized to com.orientimport.easyfck.resolvers.FckEditorPathResolver [DEBUG] AppModule.FckEditorUserRightService Creating service 'FckEditorUserRightService'. [DEBUG] AppModule.FckEditorUserRightService Invoking constructor pl.syso.paruszynska.services.SimpleFckEditorUserRightServiceImpl(Logger) (at SimpleFckEditorUserRightServiceImpl.java:18) via pl.syso.paruszynska.services.AppModule.bind(Servi ceBinder) (at AppModule.java:35). [INFO] AppModule.FckEditorUserRightService Allowed file browsing [DEBUG] AppModule.FckEditorPathService Creating service 'FckEditorPathService'. [DEBUG] AppModule.FckEditorPathService Invoking constructor pl.syso.paruszynska.
Re: easyfckeditor and file upload
Hi, and sorry for spamming this many messages :) What is the tapestry 5 version? Only 5.1.0.5 is supported. Later I plan to continue to support 5.1 and 5.2 branches if there are some changes that require heavy changes, otherwise both are supported out of the box. So, I have not tested with the 5.0.x versions. - Ville Tomek-28 wrote: Hi, I use jetty 6.1.9 as a maven plugin. Problem occurs in Windows and Linux this is my implementation of FckEditorUserRightService public class SimpleFckEditorUserRightServiceImpl implements FckEditorUserRightService { private final Logger logger; public SimpleFckEditorUserRightServiceImpl(Logger logger) { this.logger = logger; } @Override public boolean canCreateFolders() { logger.info(Allowed folder creation); return false; } @Override public boolean canBrowseFiles() { logger.info(Allowed file browsing); return true; } @Override public boolean canUploadFiles() { logger.info(Allowed file upload); return false; } } FckEditorPathService interface public class SimpleFckEditorPathServiceImpl implements FckEditorPathService { @Override public String getServerPathForFiles() { return /wwwfiles; } @Override public String getClientURLStartForFiles() { return C:\\logs\\wwwfiles\\; } } pom.xml !-- Run the application using mvn jetty:run -- plugin groupIdorg.mortbay.jetty/groupId artifactIdmaven-jetty-plugin/artifactId version6.1.9/version configuration !-- Log to the console. -- requestLog implementation=org.mortbay.jetty.NCSARequestLog !-- This doesn't do anything for Jetty, but is a workaround for a Maven bug that prevents the requestLog from being set. -- appendtrue/append /requestLog contextHandlers contextHandler implementation=org.mortbay.jetty.handler.ContextHandler contextPath/wwwfiles/contextPath resourceBaseC:\logs\wwwfiles/resourceBase handler implementation=org.mortbay.jetty.handler.ResourceHandler/handler /contextHandler /contextHandlers /configuration /plugin and AppModule.java public static void bind(ServiceBinder binder) { binder.bind(FckEditorUserRightService.class, SimpleFckEditorUserRightServiceImpl.class); binder.bind(FckEditorPathService.class, SimpleFckEditorPathServiceImpl.class); binder.bind(FckEditorConnector.class, SimleFckEditorConnector.class); } As You see I just copied the tutorial. [INFO] Started Jetty Server [INFO] connector.Dispatcher Connector initialized to com.orientimport.easyfck.connector.FckEditorConnectorBridge [DEBUG] AppModule.FckEditorConnector Creating service 'FckEditorConnector'. [WARN] TapestryModule.HttpServletRequestHandler Unable to add 'FckEditorInterceptFilter' as a dependency of 'StoreIntoGlobals', as that forms a dependency cycle ('StoreIntoGlobals' depends on itself via 'FckEditorInterceptFilter'). The dependency has been ignored. . [INFO] AppModule.TimingFilter Request time: 16 ms 127.0.0.1 - - [29/mar/2010:08:03:44 +] GET /paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditorToolbar=Default HTTP/1.1 304 0 http://localhost:8080/paruszynska/pagecms; Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 (.NET CLR 3.5.30729) 127.0.0.1 - - [29/mar/2010:08:03:45 +] GET /paruszynska/assets/easyfck/configure?id=fckeditor/fck.js HTTP/1.1 200 1051 http://localhost:8080/paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditorToolbar=Default; Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 (.NET CLR 3.5.30729) [INFO] handlers.RequestCycleHandler UserAction initialized to com.orientimport.easyfck.resolvers.FckEditorUserRightsResolver [INFO] handlers.RequestCycleHandler UserPathBuilder initialized to com.orientimport.easyfck.resolvers.FckEditorPathResolver [DEBUG] AppModule.FckEditorUserRightService Creating service 'FckEditorUserRightService'. [DEBUG] AppModule.FckEditorUserRightService Invoking constructor pl.syso.paruszynska.services.SimpleFckEditorUserRightServiceImpl(Logger) (at SimpleFckEditorUserRightServiceImpl.java:18) via pl.syso.paruszynska.services.AppModule.bind(Servi ceBinder) (at AppModule.java:35). [INFO] AppModule.FckEditorUserRightService Allowed file browsing [DEBUG] AppModule.FckEditorPathService Creating service
Re: custom Expires: header?
If you look at tapestry.ioko.com there is an open source library there that does this - it is called Cache Control. Ben Gidley www.gidley.co.uk b...@gidley.co.uk On Mon, Mar 29, 2010 at 10:45 AM, Ilya Obshadko ilya.obsha...@gmail.comwrote: How do I add custom logic for the Expires: header in my module? - contributeRequestHandler doesn't seem to work - decorateResponse doesn't seem to work I'm just curious - at which point Expires: 0 header is set and how could I override this default behavior? -- Ilya Obshadko
Re: Problem with HTML entities and OutputRaw
On 23 Mar 2010, at 12:30 pm, Mark Allan wrote: On 23 Mar 2010, at 12:14 pm, Thiago H. de Paula Figueiredo wrote: On Tue, 23 Mar 2010 09:07:49 -0300, Mark Allan mark.al...@ed.ac.uk wrote: I know I can use the OutputRaw element, and most of the time it works fine, but I can't use that inside an alt tag for my images. Why don't you write a simple Image component that writes your img tag programatically? It would even make sense even in reusability, as all the img attributes seem to come from the same object. Hi Thiago, thanks for your reply. There are a few reasons I don't want to write a custom component: 1) Once I'm finished developing the software, the front-end of the site needs to be maintained by someone who only knows HTML, so I'm trying to keep the t: / components to a minimum. I suspect she'll get confused if she sees Image components being used, and I doubt her validator software would like it either. 2) I'd really like to get rid of all the outputraw components in my Gaelic pages for ease of maintaining the templates in the future. 3) It's not only images I'm having this problem with, I was just using it as an example. I don't suppose anyone's got any other suggestions for solutions to this problem please? Thanks Mark -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: custom Expires: header?
The website seems to be down, but I've managed to find source code at Formos. I don't need so much of functionality, though. Could you elaborate - which type of contribution should I provide to just set Expires to now + 2h for every page request? Thanks in advance. On Mon, Mar 29, 2010 at 3:06 PM, Ben Gidley b...@gidley.co.uk wrote: If you look at tapestry.ioko.com there is an open source library there that does this - it is called Cache Control. Ben Gidley www.gidley.co.uk b...@gidley.co.uk On Mon, Mar 29, 2010 at 10:45 AM, Ilya Obshadko ilya.obsha...@gmail.com wrote: How do I add custom logic for the Expires: header in my module? - contributeRequestHandler doesn't seem to work - decorateResponse doesn't seem to work I'm just curious - at which point Expires: 0 header is set and how could I override this default behavior? -- Ilya Obshadko -- Ilya Obshadko
Re: easyfckeditor and file upload
easyfck ver. 1.0.4 tapestry ver. 5.1.0.5 I also noticed that only when I add configuration to my textarea that uses easyfckeditor, searvices like FckEditorUserRightService FckEditorPathService are initialized. This is my config for fckeditor FCKConfig.ContextMenu = []; FCKConfig.ToolbarSets[Default] = [ ['Image'] ]; and tml textarea t:type=easyfck/fckeditor value=val configuration=customConf / t:submit value=Submit / and Java class @Persist @Property private String val; @Property @Inject @Path(context:fckeditor/fck.js) private Asset2 customConf; I will send You my project shortly. Tomek 2010/3/29 Ville Virtanen ville.virta...@cerion.fi Hi, and sorry for spamming this many messages :) What is the tapestry 5 version? Only 5.1.0.5 is supported. Later I plan to continue to support 5.1 and 5.2 branches if there are some changes that require heavy changes, otherwise both are supported out of the box. So, I have not tested with the 5.0.x versions. - Ville Tomek-28 wrote: Hi, I use jetty 6.1.9 as a maven plugin. Problem occurs in Windows and Linux this is my implementation of FckEditorUserRightService public class SimpleFckEditorUserRightServiceImpl implements FckEditorUserRightService { private final Logger logger; public SimpleFckEditorUserRightServiceImpl(Logger logger) { this.logger = logger; } @Override public boolean canCreateFolders() { logger.info(Allowed folder creation); return false; } @Override public boolean canBrowseFiles() { logger.info(Allowed file browsing); return true; } @Override public boolean canUploadFiles() { logger.info(Allowed file upload); return false; } } FckEditorPathService interface public class SimpleFckEditorPathServiceImpl implements FckEditorPathService { @Override public String getServerPathForFiles() { return /wwwfiles; } @Override public String getClientURLStartForFiles() { return C:\\logs\\wwwfiles\\; } } pom.xml !-- Run the application using mvn jetty:run -- plugin groupIdorg.mortbay.jetty/groupId artifactIdmaven-jetty-plugin/artifactId version6.1.9/version configuration !-- Log to the console. -- requestLog implementation=org.mortbay.jetty.NCSARequestLog !-- This doesn't do anything for Jetty, but is a workaround for a Maven bug that prevents the requestLog from being set. -- appendtrue/append /requestLog contextHandlers contextHandler implementation=org.mortbay.jetty.handler.ContextHandler contextPath/wwwfiles/contextPath resourceBaseC:\logs\wwwfiles/resourceBase handler implementation=org.mortbay.jetty.handler.ResourceHandler/handler /contextHandler /contextHandlers /configuration /plugin and AppModule.java public static void bind(ServiceBinder binder) { binder.bind(FckEditorUserRightService.class, SimpleFckEditorUserRightServiceImpl.class); binder.bind(FckEditorPathService.class, SimpleFckEditorPathServiceImpl.class); binder.bind(FckEditorConnector.class, SimleFckEditorConnector.class); } As You see I just copied the tutorial. [INFO] Started Jetty Server [INFO] connector.Dispatcher Connector initialized to com.orientimport.easyfck.connector.FckEditorConnectorBridge [DEBUG] AppModule.FckEditorConnector Creating service 'FckEditorConnector'. [WARN] TapestryModule.HttpServletRequestHandler Unable to add 'FckEditorInterceptFilter' as a dependency of 'StoreIntoGlobals', as that forms a dependency cycle ('StoreIntoGlobals' depends on itself via 'FckEditorInterceptFilter'). The dependency has been ignored. . [INFO] AppModule.TimingFilter Request time: 16 ms 127.0.0.1 - - [29/mar/2010:08:03:44 +] GET /paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditorToolbar=Default HTTP/1.1 304 0 http://localhost:8080/paruszynska/pagecms; Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 (.NET CLR 3.5.30729) 127.0.0.1 - - [29/mar/2010:08:03:45 +] GET /paruszynska/assets/easyfck/configure?id=fckeditor/fck.js HTTP/1.1 200 1051 http://localhost:8080/paruszynska/assets/easyfck/fckeditor/editor/fckeditor.html?InstanceName=fckeditorToolbar=Default Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316
Re: Tapestry and SeeSaw talk
I get: This is a private video. Do you have permission to watch this video? If you do please first log in to Vimeo to watch this video. Il 26/03/2010 17.03, Ben Gidley ha scritto: Hi, Skillsmatter have changed the permissions - so it may work better now or try http://vimeo.com/10399058 Ben Gidley www.gidley.co.uk b...@gidley.co.uk On Thu, Mar 25, 2010 at 9:05 PM, Felix Gonschorek felix.gonscho...@gmail.com wrote: hi ben, i am very interested in watching your podcast/video, but somehow this is not possible. Instead of the video is see a Sorry message from vimeo, saying that i am not allowed to watch your file. Do you have any access restrictions activated? I would really apreciate to watch your talk. Thank you! Felix Am 24.03.2010 18:29, schrieb Ben Gidley: Hi, I did a talk last night on how we used tapestry for SeeSaw.com and if you are interested there is a video podcast at http://skillsmatter.com/podcast/java-jee/tapestry-5-in-action-for-realand the slides are at links.gidley.co.uk/tiafr Ben Gidley www.gidley.co.uk b...@gidley.co.uk - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- == dott. Ivano Mario Luberti Archimede Informatica societa' cooperativa a r. l. Sede Operativa Via Gereschi 36 - 56126- Pisa tel.: +39-050- 580959 tel/fax: +39-050-9711344 web: www.archicoop.it == - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Problem with HTML entities and OutputRaw
I've been bitten a few times in the past by having such strings in the java files and i've since considered it a good practice to always move them to resourcebundles - perhaps it's worth a try... On Mon, Mar 29, 2010 at 14:11, Mark Allan mark.al...@ed.ac.uk wrote: On 23 Mar 2010, at 12:30 pm, Mark Allan wrote: On 23 Mar 2010, at 12:14 pm, Thiago H. de Paula Figueiredo wrote: On Tue, 23 Mar 2010 09:07:49 -0300, Mark Allan mark.al...@ed.ac.uk wrote: I know I can use the OutputRaw element, and most of the time it works fine, but I can't use that inside an alt tag for my images. Why don't you write a simple Image component that writes your img tag programatically? It would even make sense even in reusability, as all the img attributes seem to come from the same object. Hi Thiago, thanks for your reply. There are a few reasons I don't want to write a custom component: 1) Once I'm finished developing the software, the front-end of the site needs to be maintained by someone who only knows HTML, so I'm trying to keep the t: / components to a minimum. I suspect she'll get confused if she sees Image components being used, and I doubt her validator software would like it either. 2) I'd really like to get rid of all the outputraw components in my Gaelic pages for ease of maintaining the templates in the future. 3) It's not only images I'm having this problem with, I was just using it as an example. I don't suppose anyone's got any other suggestions for solutions to this problem please? Thanks Mark -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Decorate parameter
Actually your remarks makes me wondering if it's really a good solution to 'encode' all the activation parameters, i should focus on a list of type. Have to think on how to achieve this... Thanks for discussion. Christophe Cordenier. 2010/3/26 Josh Canfield joshcanfi...@gmail.com :) Thanks. I understood that it could be done but I'm curious how you use it for an event link? Do you contribute to ValueEncoderSource an encoder for Long.class and just obfuscate all Longs? Josh On Fri, Mar 26, 2010 at 1:57 PM, Christophe Cordenier christophe.corden...@gmail.com wrote: Hi I have used value encoder for select component and component event link encoder/decoder service for context (action and event) Best regards Le 26 mars 2010 à 21:44, Josh Canfield joshcanfi...@gmail.com a écrit : Or implementing the obfuscation logic inside the ValueEncoder? This interface is exactly where Tapestry expect you to any conversion between object and string representation of it used inside an URL or HTML page. Hmm... how do you provide a ValueEncoder in an event or page link? On Fri, Mar 26, 2010 at 10:58 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Fri, 26 Mar 2010 14:38:38 -0300, Josh Canfield joshcanfi...@gmail.com wrote: I am currently trying to decorate the encoder parameter of Select component (at least every component that has an encoder parameter) to apply an indirection on client Value (see owasp rule A4) This seems like a wide net... Have you considered using a different type for the ids that you want obfuscated? Or implementing the obfuscation logic inside the ValueEncoder? This interface is exactly where Tapestry expect you to any conversion between object and string representation of it used inside an URL or HTML page. That's the simplest and more reusable solution I can think. Another one would be the decoration of ValueEncoderSource. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- -- http://www.bodylabgym.com - a private, by appointment only, one-on-one health and fitness facility. -- http://www.ectransition.com - Quality Electronic Cigarettes at a reasonable price! -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. - 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 -- -- http://www.bodylabgym.com - a private, by appointment only, one-on-one health and fitness facility. -- http://www.ectransition.com - Quality Electronic Cigarettes at a reasonable price! -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Regards, Christophe Cordenier. Developer of wooki @wookicentral.com
Re: easyfckeditor and file upload
Hi, I think I solved this one. The findings show that FCK editor java integration library could do little bit more descriptive errors... The SimleFckEditorConnector you supplied is a bit invalid. The method public ListMapString, Object getFiles(ResourceType rt, String currentFolder) throws InvalidCurrentFolderException, ReadException returns list of mapString, Object. where the String is net.fckeditor.connector.Connector.KEY_NAME or net.fckeditor.connector.Connector.KEY_SIZE and the Object is either the file name or file size. It should be like this: Map map = new HashMap(); map.put(Connector.KEY_NAME, hct.log); map.put(Connector.KEY_SIZE, new Integer(64)); List list = new ArrayListMapString, Object(); list.add(map); return list; I hope that this gets you going :) You can test the default implementation by NOT binging your connector, then easyfck will fall back to the default. Then allow all in SimpleFckEditorUserRightServiceImpl and you can upload and view images etc. - Ville Ps. Take a look at FCK editor default implementation for details if you whish to implement your own connector: http://dev.fckeditor.net/browser/FCKeditor.Java/tags/2.6/java-core/src/main/java/net/fckeditor/connector/impl/AbstractLocalFileSystemConnector.java Tomek-28 wrote: easyfck ver. 1.0.4 tapestry ver. 5.1.0.5 I also noticed that only when I add configuration to my textarea that uses easyfckeditor, searvices like FckEditorUserRightService FckEditorPathService are initialized. This is my config for fckeditor FCKConfig.ContextMenu = []; FCKConfig.ToolbarSets[Default] = [ ['Image'] ]; and tml textarea t:type=easyfck/fckeditor value=val configuration=customConf / t:submit value=Submit / and Java class @Persist @Property private String val; @Property @Inject @Path(context:fckeditor/fck.js) private Asset2 customConf; I will send You my project shortly. Tomek 2010/3/29 Ville Virtanen ville.virta...@cerion.fi Hi, and sorry for spamming this many messages :) What is the tapestry 5 version? Only 5.1.0.5 is supported. Later I plan to continue to support 5.1 and 5.2 branches if there are some changes that require heavy changes, otherwise both are supported out of the box. So, I have not tested with the 5.0.x versions. - Ville Tomek-28 wrote: Hi, I use jetty 6.1.9 as a maven plugin. Problem occurs in Windows and Linux this is my implementation of FckEditorUserRightService public class SimpleFckEditorUserRightServiceImpl implements FckEditorUserRightService { private final Logger logger; public SimpleFckEditorUserRightServiceImpl(Logger logger) { this.logger = logger; } @Override public boolean canCreateFolders() { logger.info(Allowed folder creation); return false; } @Override public boolean canBrowseFiles() { logger.info(Allowed file browsing); return true; } @Override public boolean canUploadFiles() { logger.info(Allowed file upload); return false; } } FckEditorPathService interface public class SimpleFckEditorPathServiceImpl implements FckEditorPathService { @Override public String getServerPathForFiles() { return /wwwfiles; } @Override public String getClientURLStartForFiles() { return C:\\logs\\wwwfiles\\; } } pom.xml !-- Run the application using mvn jetty:run -- plugin groupIdorg.mortbay.jetty/groupId artifactIdmaven-jetty-plugin/artifactId version6.1.9/version configuration !-- Log to the console. -- requestLog implementation=org.mortbay.jetty.NCSARequestLog !-- This doesn't do anything for Jetty, but is a workaround for a Maven bug that prevents the requestLog from being set. -- appendtrue/append /requestLog contextHandlers contextHandler implementation=org.mortbay.jetty.handler.ContextHandler contextPath/wwwfiles/contextPath resourceBaseC:\logs\wwwfiles/resourceBase handler implementation=org.mortbay.jetty.handler.ResourceHandler/handler /contextHandler /contextHandlers /configuration /plugin and AppModule.java public static void bind(ServiceBinder binder) { binder.bind(FckEditorUserRightService.class, SimpleFckEditorUserRightServiceImpl.class); binder.bind(FckEditorPathService.class,
Re: Problem with HTML entities and OutputRaw
On Mon, 29 Mar 2010 09:32:05 -0300, Andreas Andreou andy...@di.uoa.gr wrote: I've been bitten a few times in the past by having such strings in the java files My first language is Portuguese, which has a lot of accented characters, and I don't have this problem. But there's one catch: you have to instruct your IDE to use UTF-8 for your templates, Tapestry property files and *classes*. I've just created a simple class that returns a string with accented characters and it worked flawlessly. I suggest Mark Allan to check which encoding is used in the files, as Eclipse uses the operating system default one for source classes, and also check the XML declaration. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Problem with HTML entities and OutputRaw
On 29 Mar 2010, at 2:21 pm, Thiago H. de Paula Figueiredo wrote: On Mon, 29 Mar 2010 09:32:05 -0300, Andreas Andreou andy...@di.uoa.gr wrote: I've been bitten a few times in the past by having such strings in the java files My first language is Portuguese, which has a lot of accented characters, and I don't have this problem. But there's one catch: you have to instruct your IDE to use UTF-8 for your templates, Tapestry property files and *classes*. I've just created a simple class that returns a string with accented characters and it worked flawlessly. I suggest Mark Allan to check which encoding is used in the files, as Eclipse uses the operating system default one for source classes, and also check the XML declaration. The encoding was the first thing I checked when I noticed I wasn't getting the correct output. I'm not using an IDE - just a plain text editor which supports many text encoding formats and compiling/running from the command line. All my .java, .xml and .tml files are UTF-8. How do I check the encoding of my class files and under what circumstances would it differ from the input java files? Thanks Mark -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Problem with HTML entities and OutputRaw
Are you using the the encoding flag of javac ? @Thiago of course it's possible to work this way. But i've found than when switching OS, IDEs / editors and VCS all the time, it's just simpler + safer to keep such strings out of java source On Mon, Mar 29, 2010 at 16:28, Mark Allan mark.al...@ed.ac.uk wrote: On 29 Mar 2010, at 2:21 pm, Thiago H. de Paula Figueiredo wrote: On Mon, 29 Mar 2010 09:32:05 -0300, Andreas Andreou andy...@di.uoa.gr wrote: I've been bitten a few times in the past by having such strings in the java files My first language is Portuguese, which has a lot of accented characters, and I don't have this problem. But there's one catch: you have to instruct your IDE to use UTF-8 for your templates, Tapestry property files and *classes*. I've just created a simple class that returns a string with accented characters and it worked flawlessly. I suggest Mark Allan to check which encoding is used in the files, as Eclipse uses the operating system default one for source classes, and also check the XML declaration. The encoding was the first thing I checked when I noticed I wasn't getting the correct output. I'm not using an IDE - just a plain text editor which supports many text encoding formats and compiling/running from the command line. All my .java, .xml and .tml files are UTF-8. How do I check the encoding of my class files and under what circumstances would it differ from the input java files? Thanks Mark -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Problem with HTML entities and OutputRaw
On 29 Mar 2010, at 4:26 pm, Andreas Andreou wrote: Are you using the the encoding flag of javac ? I'll have a look. Right now, I'm just using mvn compile so will try and find out what flags it passes to javac. -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Problem with HTML entities and OutputRaw
On Mon, 29 Mar 2010 12:26:46 -0300, Andreas Andreou andy...@di.uoa.gr wrote: @Thiago of course it's possible to work this way. But i've found than when switching OS, IDEs / editors and VCS all the time, it's just simpler + safer to keep such strings out of java source I agree with you. :) I was just saying that Tapestry works with accented characters in Java classes, even this not being the recommended way of handling string content. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Persist value of checkbox ?
Hello, I've tried this code which present 10 checkbox which I submit. Then I go back to this page so I'd like those checkbox to be ticked if they were ticked before. t:Loop source=1..10 value=index input t:type=checkbox t:id=pute / /t:Loop So in my class I've coded : @Persist @Property private boolean _pute; private Object onSuccess() { // call database update return this; } However, when I submit the page is well refreshed but the checkbox are all unticked. Could you help me resolve this simple case ? Regards, Mondes_engloutis.
Re: Persist value of checkbox ?
On Mon, 29 Mar 2010 13:10:15 -0300, jaques robert mondes_englou...@yahoo.fr wrote: Hello, Hi! I've tried this code which present 10 checkbox which I submit. Then I go back to this page so I'd like those checkbox to be ticked if they were ticked before. t:Loop source=1..10 value=index input t:type=checkbox t:id=pute / /t:Loop So in my class I've coded : @Persist @Property private boolean _pute; You should have a list of booleans, not a single one. private Object onSuccess() { // call database update return this; } Return null instead. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Persist value of checkbox ?
You're missing the 'value' attribute from your checkbox definition. The id attribute just gives the checkbox a name, it doesn't automatically bind it to the _pute property. Michael On Mon, Mar 29, 2010 at 12:10 PM, jaques robert mondes_englou...@yahoo.frwrote: Hello, I've tried this code which present 10 checkbox which I submit. Then I go back to this page so I'd like those checkbox to be ticked if they were ticked before. t:Loop source=1..10 value=index input t:type=checkbox t:id=pute / /t:Loop So in my class I've coded : @Persist @Property private boolean _pute; private Object onSuccess() { // call database update return this; } However, when I submit the page is well refreshed but the checkbox are all unticked. Could you help me resolve this simple case ? Regards, Mondes_engloutis.
Re: Persist value of checkbox ?
On Mon, 29 Mar 2010 13:15:17 -0300, Michael Prescott michael.r.presc...@gmail.com wrote: You're missing the 'value' attribute from your checkbox definition. The id attribute just gives the checkbox a name, it doesn't automatically bind it to the _pute property. It does bind, as the value parameter has autoconnect = true. If the property wasn't found, Tapestry would consider it an error and show the error page. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Persist value of checkbox ?
On Mon, Mar 29, 2010 at 9:14 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Mon, 29 Mar 2010 13:10:15 -0300, jaques robert mondes_englou...@yahoo.fr wrote: Hello, Hi! I've tried this code which present 10 checkbox which I submit. Then I go back to this page so I'd like those checkbox to be ticked if they were ticked before. t:Loop source=1..10 value=index input t:type=checkbox t:id=pute / /t:Loop So in my class I've coded : �...@persist �...@property private boolean _pute; You should have a list of booleans, not a single one. To amplify here, Tapestry is doing what you told it to. It renders 10 checkboxes, each of which draws its initial value from the _pute field (and pute property). On submit, it does the exact same thing: reads the query parameter for each checkbox (they get rendered with unique name attributes) and updates the pute property. However, since there's 10 checkboxes and only one property, it ends up with the 10th checkbox's value. I teach, in my labs, a way to use a synthetic property to populate a Set with value selected by checkboxes but you could just as easily use ordinary HTML input type=checkbox, assign your own name and use a value (typically a database persistent entity id) of your own devising: t:loop source=databaseObjects value=object input type=checkbox name=selectedObjects value=${object.id}/ ... /t:loop And then in your onSuccess() and/or onValidate() event handler method, you can inject the Request get get the selectedObjects query parameter value. I call this dropping down to Servlets mode and it is appropriate in cases where a full-bore Tapestry component solution is more work. private Object onSuccess() { // call database update return this; } Return null instead. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [ANNOUNCEMENT] Tapestry-resteasy 0.0.1 released!
A very interesting little project... nice :) - Original Message - From: Robin Komiwes odiss...@gmail.com To: Tapestry users users@tapestry.apache.org Sent: Monday, 29 March, 2010 09:17:41 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: [ANNOUNCEMENT] Tapestry-resteasy 0.0.1 released! Nice! Already tried your contribution, and we were looking for that evolution. I look forward to see how it works now. On Mon, Mar 29, 2010 at 12:40 AM, Alejandro Scandroli alejandroscandr...@gmail.com wrote: It's done! The (yet to be released) tapestry-resteasy 0.2.0 is droppinable, just drop it in and run. It doesn't need any web.xml configuration at all. Cheers! Alejandro. On Fri, Jan 22, 2010 at 8:07 PM, Kalle Korhonen kalle.o.korho...@gmail.com wrote: On Fri, Jan 22, 2010 at 10:49 AM, Howard Lewis Ship hls...@gmail.com wrote: Looks nice; you guys have been very busy! Thanks Howard! Oh I think we are mostly just publishing code we've been sitting on for some time. I'm a little surprised at the amount of web.xml configuration; I don't know enough about the JBoss code, but it seems like something that could be handled using a contribution to the HttpServletRequest pipeline, and not require web.xml configuration to work, just drop it in and run. But I'm likely missing some details. Like I said, just blame Alejandro :) No, just kidding - I think you are completely right at least about the filter config. It's been awhile since I last worked on Jersey, but I think the spec required a servlet config for some odd bootstrapping reason but that could have changed. Of course we could still do whatever we like with all the power of Tapestry's plumbing at our fingertips and I think it's a worthy goal so we could really claim it to be a drop-in module. Let's add it as an enhancement request (and we are always looking for good committers :P ) Kalle On Fri, Jan 22, 2010 at 10:19 AM, Kalle Korhonen kalle.o.korho...@gmail.com wrote: JAX-RS is simple and cool, and we at Tynamo project (http://tynamo.org) wanted to make it even simpler for you Tapestry dudes! Tapestry-resteasy is a drop-in module for making your webapplication RESTful. Follow our tapestry-resteasy guide (http://tynamo.org/tapestry-resteasy+guide) to set it up. Tapestry-resteasy 0.0.1 is available from Maven central but note that not all of the JBoss or java.net jars are in Central repo, so if you are one of the poor developers who are running Maven not backed up by a proper repository proxy, you can activate -Prepositories profile to enable downloading directly from the JBoss and java.net repositories. Have fun with it! Oh and if something goes wrong, don't blame me, this module is all Alejandro Scandroli's ingenious work! PS. We also have another announcement to make - Piero Sartini, the founder of tapestry-jpa module, has joined our ranks. Join me in welcoming him to the project! Besides the experience, he also brought the code with him to be hosted as part of Tynamo.org - so you know what it means, more about full JPA2 integration to follow! - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.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 - 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
Import and Export to .xls in Tapestry 5
Does anyone here have experience of import and exporting to an .xls form the grid component in Tapestry5 or point me to a good example? The example Tapestry5HowToCreateADynamicPDF is awesome. so I am wondering if there is one somewhere for .xls. Thanks you in advance for your help. Faye -- View this message in context: http://old.nabble.com/Import-and-Export-to-.xls-in-Tapestry-5-tp28074328p28074328.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
@Activation
Hey, it would be really nice if I could skip all the writing of onActivate() and onPassivate() methods, just using an annotation like this: @Persist(activationContext) public String someUsefulIdentifier; Or, perhaps (and more useful for my case, when I want a domain entity handy): @ActivationContext(0) public String getIdOfDomainEntityIAmEditing() { return this.domainEntity.getId(); } public void setIdOfDomainEntityIAmEditing( String id ) { this.domainEntity = myInjectedDao.load(id); } @ActivationContext(1) private boolean editMode; The integer parameter is there to make the serialization order unambiguous, so that you can compose URLs to the page. I'm just making this stuff up. Whaddya think? Michael
Re: [bean-edit-form] make a sub-set of parameters visible but not editable
i spent hours and hours trying to figure out why TextField didn't simply have a 'readonly' parameter, which would fix this issue. the answer was pretty simple, and caused me to utter a heartfelt UGH! you CAN use readonly. it just gets passed from the TextField thing to the input tag. t:beaneditform t:id=thingEdit object=thing submitLabel=message:button.save t:parameter name=id t:label for=id/ t:textfield t:id=id value=thing.id readonly=true/ /t:parameter /t:beaneditform It will show up looking editable just like the other fields, but indeed will not be. aash aldana wrote: Hi, I am using the BeanEditor Form for editing users. For that I would like to have a partial editing form, i.e. I want to protect certain columns from being edited. Example is the id of the object: Once it is created I want to have it visible but not editable. Using the @NonVisual flag or exlude parameter of BeanEdit-Form component wouldn't do this, it would just remove the column from the frontend completely. I had a look at t:parameter overrides but it does not seem to support a read-only flag. Generally I would need something more flexible how to tell whether a parameter is read-only or editable inside the form. For my current problem the read-only vs. editable depends on roles (i.e. different roles have different access rights to edit certain fields). thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - manuel aldana aldana((at))gmx.de software-engineering blog: http://www.aldana-online.de -- View this message in context: http://old.nabble.com/-bean-edit-form--make-a-sub-set-of-parameters-visible-but-not-editable-tp23111464p28075272.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: @Activation
There is already a @pageActivationContext that does this. It only works for simple properties though http://tapestry.apache.org/tapestry5/tapestry-hibernate/userguide.html On Mon, Mar 29, 2010 at 10:50 PM, Michael Prescott michael.r.presc...@gmail.com wrote: Hey, it would be really nice if I could skip all the writing of onActivate() and onPassivate() methods, just using an annotation like this: @Persist(activationContext) public String someUsefulIdentifier; Or, perhaps (and more useful for my case, when I want a domain entity handy): @ActivationContext(0) public String getIdOfDomainEntityIAmEditing() { return this.domainEntity.getId(); } public void setIdOfDomainEntityIAmEditing( String id ) { this.domainEntity = myInjectedDao.load(id); } @ActivationContext(1) private boolean editMode; The integer parameter is there to make the serialization order unambiguous, so that you can compose URLs to the page. I'm just making this stuff up. Whaddya think? Michael
Re: Import and Export to .xls in Tapestry 5
Hi! On Mon, 29 Mar 2010 16:55:18 -0300, faye alaska haifeizh...@gmail.com wrote: Does anyone here have experience of import and exporting to an .xls form the grid component in Tapestry5 or point me to a good example? The import part would need some library to do the file parsing. Apache has one: http://poi.apache.org/spreadsheet/index.html. The export part would need some part to generate a .xls you you could just output a .csv. I guess POI could help you in this front too. Grid can be used to shown anything as long as you pass the data as a List or a GridDataSource. This component does no conversion itself. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Import and Export to .xls in Tapestry 5
IMHO, you should really have an intermediate model (with column definitions, and a list of rows containing a list of cells) From there you can pretty much load it into anything (including your Tapestry Grid). You're going to want this when you eventually need cell styles/formatting/borders/etc that are beyond what you need for the web interface. I often bring up DynamicJasper as a means of XLS/PDF/CSV export, but that's just because I like it. You can also just use JasperReports (the api) or POI, but some of the details can be scary looking if you don't need all the options. DynamicJasper hide that complexity with sensible defaults for creating a decent looking report. There are two different XLS exporters available to use with DynamicJasper/JasperReports There may be more. On Mon, Mar 29, 2010 at 7:43 PM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: Hi! On Mon, 29 Mar 2010 16:55:18 -0300, faye alaska haifeizh...@gmail.com wrote: Does anyone here have experience of import and exporting to an .xls form the grid component in Tapestry5 or point me to a good example? The import part would need some library to do the file parsing. Apache has one: http://poi.apache.org/spreadsheet/index.html. The export part would need some part to generate a .xls you you could just output a .csv. I guess POI could help you in this front too. Grid can be used to shown anything as long as you pass the data as a List or a GridDataSource. This component does no conversion itself. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - 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: Import and Export to .xls in Tapestry 5
Sorry, for importing I would suggest using POI. On Mon, Mar 29, 2010 at 8:40 PM, Daniel Jue teamp...@gmail.com wrote: IMHO, you should really have an intermediate model (with column definitions, and a list of rows containing a list of cells) From there you can pretty much load it into anything (including your Tapestry Grid). You're going to want this when you eventually need cell styles/formatting/borders/etc that are beyond what you need for the web interface. I often bring up DynamicJasper as a means of XLS/PDF/CSV export, but that's just because I like it. You can also just use JasperReports (the api) or POI, but some of the details can be scary looking if you don't need all the options. DynamicJasper hide that complexity with sensible defaults for creating a decent looking report. There are two different XLS exporters available to use with DynamicJasper/JasperReports There may be more. On Mon, Mar 29, 2010 at 7:43 PM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: Hi! On Mon, 29 Mar 2010 16:55:18 -0300, faye alaska haifeizh...@gmail.com wrote: Does anyone here have experience of import and exporting to an .xls form the grid component in Tapestry5 or point me to a good example? The import part would need some library to do the file parsing. Apache has one: http://poi.apache.org/spreadsheet/index.html. The export part would need some part to generate a .xls you you could just output a .csv. I guess POI could help you in this front too. Grid can be used to shown anything as long as you pass the data as a List or a GridDataSource. This component does no conversion itself. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - 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
PageBeginRenderListener, PageEndRenderListener
my page implements both listener but only pageBeginRender(..) is called, pageEndRender(..) is not called - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org