T4.1.2,ClassCastException when use abstract generic page.
My Page Class abstract class APagea extends PersistentObject Thrown java.lang.ClassCastException org.apache.tapestry.enhance.GenericsMethodSignatureImpl.findType(GenericsMethodSignatureImpl.java:73) # org.apache.tapestry.enhance.GenericsMethodSignatureImpl.findParameterTypes(GenericsMethodSignatureImpl.java:98) # org.apache.tapestry.enhance.GenericsMethodSignatureImpl.init(GenericsMethodSignatureImpl.java:32) # org.apache.tapestry.enhance.GenericsClassInspectorImpl.getMethodSignature(GenericsClassInspectorImpl.java:36) # $ClassInspector_111596bc72b.getMethodSignature($ClassInspector_111596bc72b.java) # org.apache.tapestry.enhance.EnhancedClassValidatorImpl.validate(EnhancedClassValidatorImpl.java:84) # $EnhancedClassValidator_111596bc6ea.validate($EnhancedClassValidator_111596bc6ea.java) # org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getComponentConstructor(ComponentConstructorFactoryImpl.java:109) # $ComponentConstructorFactory_111596bc6d7.getComponentConstructor($ComponentConstructorFactory_111596bc6d7.java) # org.apache.tapestry.pageload.PageLoader.instantiatePage(PageLoader.java:564) # org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:591) # $IPageLoader_111596bc6d1.loadPage($IPageLoader_111596bc6d1.java) # $IPageLoader_111596bc6d2.loadPage($IPageLoader_111596bc6d2.java) # org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:119) . -- Welcome to China Java Users Group(CNJUG). http://cnjug.dev.java.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Injecting services into application scope ASO
Half way there... Using Hiveutils I managed to write this, but in the Manager ASO constructor the config is null. The setter for the config is never called. The Manager is instantiated by a Border component when method ping() is called. I can use spring provided config in Border component just fine. What did I miss? ### hivemodule.xml ### contribution configuration-id=tapestry.state.ApplicationObjects state-object name=manager scope=application invoke-factory object=object:Manager / /state-object /contribution contribution configuration-id=hiveutils.ObjectBuilderObjects object name=Manager cached=true class=com.acme.application.Manager inject name=config object=spring:configuration / /object /contribution and ### Manager.java ### public class Manager implements StateObjectFactory { // Commons Configuration private Configuration config; /** * Manager is an application scope ASO (Application State Object). This * class is instantiated lazily - when first page injects it. */ public Manager() { logger.info(config: + config); // THIS IS NULL String address = config.getString(person.address); } public Object createStateObject() { return this; } public String ping() { return pong; } public Configuration getConfig() { return config; } public void setConfig(Configuration config) { //never gets called logger.info(SETTING CONFIG: + config); this.config = config; } } ### applicationContext.xml ### !-- Apache Commons Configuration Composite configuration -- bean id=configurations class=org.springmodules.commons.configuration.CommonsConfigurationFactoryBean property name=configurations list bean class=org.apache.commons.configuration.XMLConfiguration constructor-arg type=java.net.URL value=classpath:posting-config.xml / property name=reloadingStrategy bean class=org.apache.commons.configuration.reloading.FileChangedReloadingStrategy/ /property /bean /list /property !-- define configuration as a set of spring resources -- property name=locations value=classpath*:META-INF/default.properties / /bean bean id=configuration factory-bean=amp;configurations factory-method=getConfiguration/ ### Border.java ### public abstract class Border extends BaseComponent { @InjectState(manager) abstract public Manager getManager(); @InjectObject(spring:configuration) public abstract Configuration getConfig(); public void finishLoad() { logger.info(person.address: + getConfig().getString(person.address)); // correctly print the value logger.info(manager.ping: + getManager().ping()); // invokes Manager } On 15.3.2007 20:25, Borut Bolčina wrote: Hello, can someone provide some code hints to Hivemind and Spring newb - that would be me - on how to inject 1. Hivemind service into application scope ASO 2. Spring service into application scope ASO I want to cache some long term objects in the global ASO, but want (if it is at all reasonable?) those objects provided by Hivemind and/or Spring services. I am at the very beginning of learning of the SOA. I know how to inject services from both frameworks into Tapestry pages. Cheers, Borut - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Avoiding serialization
Dear All, I have a toy application, composed of a View and an Edit screen. They work by looping through objects from a database with a Loop component, setting a property in the page instance to the current element, and extracting some of its fields. The View screen simply inserts extracted fields (Strings) into the HTML, while the Edit screen puts them into textfields. I only have a few objects whose fields are presented as a table, this kind of editing, with a single Submit button, is more convenient than having a separate screen to edit individual objects. When the submit button is clicked, the objects in the database are not updated. This is because the Loop cycles through the deserialised objects, not the originals. I got around that by modifying the setCurrentItem(Item item) method in the Edit page class to extract the key from its parameter, and set the current item to an object retrieved from the database using that key. Then the setters are run on the database object and the page works. I have two problems with this: - this is less than elegant, and kind of defeats the purpose of having a nice Loop component that can cycle through collections; I might as well return database indexes instead - but that's not very OO; - the HTML page is large, polluted with serialized Java objects. They are not very large in my case, but this is a toy project (and in a real project, making sure everything is serializable may not be a trivial task). For Tapestry 4, Kent Tong's excellent book, Enjoying Web Development with Tapestry lists a solution to both problems. Honestly, I think my modified setCurrentItem solution is simpler than his, based on an InvokeListener and performing some magic in the rewind phase. It is my understanding that Tapestry 5 does this differently (no rewind phase?) anyway. My solution can have drawbacks I'm not aware of - could someone please point them out? Kent's solution to the other problem (storing just the key - and maybe a Hibernate version number so stale objects can be detected) was providing a converter. This has been replaced by encoders (encoder parameter of the Loop component), right? TIA, Kofa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Autocompleter probs
Sorry, once more here it is html jwcid=@Shell ajaxEnabled=true browserLogLevel=DEBUG title=Edit Shipment body jwcid=@Body span jwcid=pageCss/ span jwcid=tabsScript/ div id=shipmentTabContainer div id=ccs form jwcid=[EMAIL PROTECTED]:AjaxForm updateComponents=ognl:{'clientArea'} div jwcid=[EMAIL PROTECTED] div class=titleTextClient/div span jwcid=@If condition=ognl:shipment.client!=null span jwcid=@If condition=ognl:!clientClicked span jwcid=clientClient/span /span span jwcid=@Else span class=auto_complete jwcid=clientAutoCompleter/ /span /span span jwcid=@Else span class=auto_complete jwcid=nullClientAutoCompleter/ /span a jwcid=[EMAIL PROTECTED] listener=listener:clientClick async=ognl:true Edit /a /div input type=submit jwcid=@Submit action=listener:doEditClientShipperCons async=ognl:true value=Save Changes/ /form /div /div !-- script jwcid=@tacos:DirtyFormWarning form=ognl:components.editShipment message=You have unsaved changes./ div id=updateStatus/div -- /body /html On Fri, 2007-03-16 at 07:51 +0100, Andrea Chiumenti wrote: empty ;p On 3/15/07, Yiannis Mavroukakis [EMAIL PROTECTED] wrote: Here you go :) Thank you, Yiannis -Original Message- From: Andrea Chiumenti [mailto:[EMAIL PROTECTED] Sent: 15 March 2007 18:39 To: Tapestry users Subject: Re: Autocompleter probs Send the template as attachment then ;) On 3/15/07, Yiannis Mavroukakis [EMAIL PROTECTED] wrote: Argh! Feel free to take me out back and shoot me in the head about that one However that's still not it :( Same issue.. -Original Message- From: Andrea Chiumenti [mailto:[EMAIL PROTECTED] Sent: Thursday, March 15, 2007 4:27 PM To: Tapestry users Subject: Re: Autocompleter probs try to change a jwcid=[EMAIL PROTECTED] updateComponents=ognl:{'clientUpdate'} listener=listener:clientClick to a jwcid=[EMAIL PROTECTED] updateComponents=ognl:{ 'clientUpdate'} listener=listener:clientClick See the space before listener. Also validate your html as a well formed xml. On 3/15/07, Yiannis Mavroukakis [EMAIL PROTECTED] wrote: Hello, I have the following html snippet form jwcid=[EMAIL PROTECTED] updateComponents=ognl:{'clientUpdate','shipperUpdate','consigneeUpdate' } div jwcid=[EMAIL PROTECTED] div class=titleTextClient/div span jwcid=@If condition=ognl:shipment.client!=null span jwcid=@If condition=ognl:!clientClicked a jwcid=[EMAIL PROTECTED] updateComponents=ognl:{'clientUpdate'} listener=listener:clientClick span jwcid=clientClient/span /a /span span jwcid=@Else span class=auto_complete jwcid=clientAutoCompleter/ /span /span span jwcid=@Else span class=auto_complete jwcid=nullClientAutoCompleter/ /span /div /form This, in an admittedly convoluted way, presents a link which when clicked becomes an autocompleter. So far so good, however when the clientUpdate component is refreshed and the autocompleter field appears, when I type into it I get the following error. DEBUG: [SyntaxError: syntax error, file: http://localhost:8080/cybertraxv3/app?service=assetpath=%2Fdojo%2Fdojo. js, line: 15] DEBUG:
Re: [Tap4.0.x to 4.1.1] ClassNotFound Exception
Grab the appropriate jar from here http://dcl.mathcs.emory.edu/util/backport-util-concurrent/ On Fri, 2007-03-16 at 11:03 +0100, Wojtek Ciesielski wrote: Hi all, I was trying to move our web app from Tapestry 4.0 to version 4.1.1. I've replaced framework, annotations and contrib jars with new onces - system compiled. But when tried to launch it an exception was thrown, which boiled down to: java.lang.NoClassDefFoundError: edu/emory/mathcs/backport/java/util/concurrent/locks/ReentrantLock org.apache.tapestry.services.impl.DisableCachingFilter.init(DisableCachingFilter.java:41) sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) java.lang.reflect.Constructor.newInstance(Unknown Source) ... I've went through jars provided with distribution and I'm pretty sure that there is no package starting from edu... And http://tapestry.apache.org/tapestry4.1/dependencies.html page says that here are no dependencies for this project. It is a standalone application that does not depend on any other project. - so what am I doing wrong? Thanks in advance for any advice, Wojtek This e-mail has been scanned for all known viruses. Note:__ This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Jaguar Freight Services and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity. This e-mail has been scanned for all known viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tapestry sub-projects / related projects
+1 from me On 3/16/07, Hugo Palma [EMAIL PROTECTED] wrote: I have no problem with Tacos for this, as long as the current developers of Tacos are ok with opening the doors of svn to many more developers. I think a restructure of file structure would be needed and some stronger guidelines would have to be written, but i think it could work. Jesse Kuhnert wrote: I mostly just wanted to edit the subject line so we don't keep treading all over Jeromes announcement. I agree...The current site + demo do tend to be ajax driven, but there was a glimmer of hope that we'd be able to support more services and other things as well...Don't let my opinion sway anyone from starting whichever projects they like of course, I'll support all of them either way. ;) Speaking of Tacos, I think it'd be nice if at a minimum Andreas had admin support on it finally. What do you say Viktor? On 3/15/07, Andreas Andreou [EMAIL PROTECTED] wrote: I wouldn't tie tacos to ajax that closely... Renaming tacos-core to tacos-ajax and adding a whole bunch of new modules + a few more devs is certainly a way forward. I guess Viktor can help with the accounts, or perhaps give us access to do that. Tacos already has 4 and 4.1 specific sections. So, why not join? On 3/16/07, Hugo Palma [EMAIL PROTECTED] wrote: Jérôme BERNARD wrote: On 3/16/07, Hugo Palma [EMAIL PROTECTED] wrote: I've been thinking a little about the fact that Tapestry doesn't really have a place for the general community to use as a home for components, services and Tapestry related stuff that may be useful to others. I think this is why tapestry-contrib was created, but it being under Apache it doesn't really provide the freedom for the general community to join as developers and really get theirs hands dirty. So, i'm thinking something like a new project hosted in sourceforge or javaforge or something like that. The project should be managed by a Tapestry developer. Still, everyone that wanted to contribute, like Jerome, would be made a developer and would access to svn. I have some ideas on this but before i share them, does this sound stupid ? No. Sounds fine. Maybe create a specific T4, T4.1 and T5 sections though so that users can figure out which components they can use. That's the idea. Special conventions and infrastructure would have to be built to allow this to work correctly. PS - Sorry for stealing the thread No problem, after all, even though I can host my work on my own servers, an official home for this puppy would probably be better :-) Jérôme - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / JEE Consulting -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / JEE Consulting
Re: Autocompleter probs
updateComponents=ognl:{'clientArea'} ? did you mean updateComponents=ognl:{'clientUpdate'}? if so change div jwcid=[EMAIL PROTECTED] to div jwcid=[EMAIL PROTECTED] id =clientId:clientUpdate kiuma On 3/16/07, Yiannis Mavroukakis [EMAIL PROTECTED] wrote: Sorry, once more here it is html jwcid=@Shell ajaxEnabled=true browserLogLevel=DEBUG title=Edit Shipment body jwcid=@Body span jwcid=pageCss/ span jwcid=tabsScript/ div id=shipmentTabContainer div id=ccs form jwcid=[EMAIL PROTECTED]:AjaxForm updateComponents=ognl:{'clientArea'} div jwcid=[EMAIL PROTECTED] div class=titleTextClient/div span jwcid=@If condition=ognl:shipment.client!=null span jwcid=@If condition=ognl:!clientClicked span jwcid=clientClient/span /span span jwcid=@Else span class=auto_complete jwcid=clientAutoCompleter/ /span /span span jwcid=@Else span class=auto_complete jwcid=nullClientAutoCompleter/ /span a jwcid= [EMAIL PROTECTED] listener=listener:clientClick async=ognl:true Edit /a /div input type=submit jwcid=@Submit action=listener:doEditClientShipperCons async=ognl:true value=Save Changes/ /form /div /div !-- script jwcid=@tacos:DirtyFormWarning form=ognl:components.editShipment message=You have unsaved changes./ div id=updateStatus/div -- /body /html On Fri, 2007-03-16 at 07:51 +0100, Andrea Chiumenti wrote: empty ;p On 3/15/07, Yiannis Mavroukakis [EMAIL PROTECTED] wrote: Here you go :) Thank you, Yiannis -Original Message- From: Andrea Chiumenti [mailto:[EMAIL PROTECTED] Sent: 15 March 2007 18:39 To: Tapestry users Subject: Re: Autocompleter probs Send the template as attachment then ;) On 3/15/07, Yiannis Mavroukakis [EMAIL PROTECTED] wrote: Argh! Feel free to take me out back and shoot me in the head about that one However that's still not it :( Same issue.. -Original Message- From: Andrea Chiumenti [mailto:[EMAIL PROTECTED] Sent: Thursday, March 15, 2007 4:27 PM To: Tapestry users Subject: Re: Autocompleter probs try to change a jwcid=[EMAIL PROTECTED] updateComponents=ognl:{'clientUpdate'} listener=listener:clientClick to a jwcid=[EMAIL PROTECTED] updateComponents=ognl:{ 'clientUpdate'} listener=listener:clientClick See the space before listener. Also validate your html as a well formed xml. On 3/15/07, Yiannis Mavroukakis [EMAIL PROTECTED] wrote: Hello, I have the following html snippet form jwcid=[EMAIL PROTECTED] updateComponents=ognl:{'clientUpdate','shipperUpdate','consigneeUpdate' } div jwcid=[EMAIL PROTECTED] div class=titleTextClient/div span jwcid=@If condition=ognl:shipment.client!=null span jwcid=@If condition=ognl:!clientClicked a jwcid=[EMAIL PROTECTED] updateComponents=ognl:{'clientUpdate'} listener=listener:clientClick span jwcid=clientClient/span /a /span span jwcid=@Else span class=auto_complete jwcid=clientAutoCompleter/ /span /span span jwcid=@Else span class=auto_complete jwcid=nullClientAutoCompleter/ /span /div /form This, in an admittedly convoluted way, presents a link which when clicked becomes an autocompleter. So far so good, however when the clientUpdate component is refreshed and the autocompleter field appears, when I type into it I get the following error. DEBUG: [SyntaxError: syntax error, file: http://localhost:8080/cybertraxv3/app?service=assetpath=%2Fdojo%2Fdojo. js, line: 15] DEBUG: Any ideas what this might be? Thank you for
Re: Injecting services into application scope ASO
I think what you need is an initialize-method. setConfig cannot be called before the Manager constructor. See http://hivemind.apache.org/hivemind1/hivemind/BuilderFactory.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tapestry sub-projects / related projects
I like the idea, but only if someone active on the project has admin rights...Which no one does right now. So it could be that we need to move Tacos somewhere else. On 3/16/07, Andreas Andreou [EMAIL PROTECTED] wrote: +1 from me On 3/16/07, Hugo Palma [EMAIL PROTECTED] wrote: I have no problem with Tacos for this, as long as the current developers of Tacos are ok with opening the doors of svn to many more developers. I think a restructure of file structure would be needed and some stronger guidelines would have to be written, but i think it could work. Jesse Kuhnert wrote: I mostly just wanted to edit the subject line so we don't keep treading all over Jeromes announcement. I agree...The current site + demo do tend to be ajax driven, but there was a glimmer of hope that we'd be able to support more services and other things as well...Don't let my opinion sway anyone from starting whichever projects they like of course, I'll support all of them either way. ;) Speaking of Tacos, I think it'd be nice if at a minimum Andreas had admin support on it finally. What do you say Viktor? On 3/15/07, Andreas Andreou [EMAIL PROTECTED] wrote: I wouldn't tie tacos to ajax that closely... Renaming tacos-core to tacos-ajax and adding a whole bunch of new modules + a few more devs is certainly a way forward. I guess Viktor can help with the accounts, or perhaps give us access to do that. Tacos already has 4 and 4.1 specific sections. So, why not join? On 3/16/07, Hugo Palma [EMAIL PROTECTED] wrote: Jérôme BERNARD wrote: On 3/16/07, Hugo Palma [EMAIL PROTECTED] wrote: I've been thinking a little about the fact that Tapestry doesn't really have a place for the general community to use as a home for components, services and Tapestry related stuff that may be useful to others. I think this is why tapestry-contrib was created, but it being under Apache it doesn't really provide the freedom for the general community to join as developers and really get theirs hands dirty. So, i'm thinking something like a new project hosted in sourceforge or javaforge or something like that. The project should be managed by a Tapestry developer. Still, everyone that wanted to contribute, like Jerome, would be made a developer and would access to svn. I have some ideas on this but before i share them, does this sound stupid ? No. Sounds fine. Maybe create a specific T4, T4.1 and T5 sections though so that users can figure out which components they can use. That's the idea. Special conventions and infrastructure would have to be built to allow this to work correctly. PS - Sorry for stealing the thread No problem, after all, even though I can host my work on my own servers, an official home for this puppy would probably be better :-) Jérôme - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / JEE Consulting -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / JEE Consulting -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tapestry sub-projects / related projects
Yep, that's what'll happen if viktor doesn't comment / agree on the idea. On 3/16/07, Jesse Kuhnert [EMAIL PROTECTED] wrote: I like the idea, but only if someone active on the project has admin rights...Which no one does right now. So it could be that we need to move Tacos somewhere else. On 3/16/07, Andreas Andreou [EMAIL PROTECTED] wrote: +1 from me On 3/16/07, Hugo Palma [EMAIL PROTECTED] wrote: I have no problem with Tacos for this, as long as the current developers of Tacos are ok with opening the doors of svn to many more developers. I think a restructure of file structure would be needed and some stronger guidelines would have to be written, but i think it could work. Jesse Kuhnert wrote: I mostly just wanted to edit the subject line so we don't keep treading all over Jeromes announcement. I agree...The current site + demo do tend to be ajax driven, but there was a glimmer of hope that we'd be able to support more services and other things as well...Don't let my opinion sway anyone from starting whichever projects they like of course, I'll support all of them either way. ;) Speaking of Tacos, I think it'd be nice if at a minimum Andreas had admin support on it finally. What do you say Viktor? On 3/15/07, Andreas Andreou [EMAIL PROTECTED] wrote: I wouldn't tie tacos to ajax that closely... Renaming tacos-core to tacos-ajax and adding a whole bunch of new modules + a few more devs is certainly a way forward. I guess Viktor can help with the accounts, or perhaps give us access to do that. Tacos already has 4 and 4.1 specific sections. So, why not join? On 3/16/07, Hugo Palma [EMAIL PROTECTED] wrote: Jérôme BERNARD wrote: On 3/16/07, Hugo Palma [EMAIL PROTECTED] wrote: I've been thinking a little about the fact that Tapestry doesn't really have a place for the general community to use as a home for components, services and Tapestry related stuff that may be useful to others. I think this is why tapestry-contrib was created, but it being under Apache it doesn't really provide the freedom for the general community to join as developers and really get theirs hands dirty. So, i'm thinking something like a new project hosted in sourceforge or javaforge or something like that. The project should be managed by a Tapestry developer. Still, everyone that wanted to contribute, like Jerome, would be made a developer and would access to svn. I have some ideas on this but before i share them, does this sound stupid ? No. Sounds fine. Maybe create a specific T4, T4.1 and T5 sections though so that users can figure out which components they can use. That's the idea. Special conventions and infrastructure would have to be built to allow this to work correctly. PS - Sorry for stealing the thread No problem, after all, even though I can host my work on my own servers, an official home for this puppy would probably be better :-) Jérôme - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / JEE Consulting -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / JEE Consulting -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / JEE Consulting
Re: T4.1.2,ClassCastException when use abstract generic page.
Jira, please .? On 3/16/07, Jun Tsai [EMAIL PROTECTED] wrote: My Page Class abstract class APagea extends PersistentObject Thrown java.lang.ClassCastException org.apache.tapestry.enhance.GenericsMethodSignatureImpl.findType(GenericsMethodSignatureImpl.java:73) # org.apache.tapestry.enhance.GenericsMethodSignatureImpl.findParameterTypes(GenericsMethodSignatureImpl.java:98) # org.apache.tapestry.enhance.GenericsMethodSignatureImpl.init(GenericsMethodSignatureImpl.java:32) # org.apache.tapestry.enhance.GenericsClassInspectorImpl.getMethodSignature(GenericsClassInspectorImpl.java:36) # $ClassInspector_111596bc72b.getMethodSignature($ClassInspector_111596bc72b.java) # org.apache.tapestry.enhance.EnhancedClassValidatorImpl.validate(EnhancedClassValidatorImpl.java:84) # $EnhancedClassValidator_111596bc6ea.validate($EnhancedClassValidator_111596bc6ea.java) # org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getComponentConstructor(ComponentConstructorFactoryImpl.java:109) # $ComponentConstructorFactory_111596bc6d7.getComponentConstructor($ComponentConstructorFactory_111596bc6d7.java) # org.apache.tapestry.pageload.PageLoader.instantiatePage(PageLoader.java:564) # org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:591) # $IPageLoader_111596bc6d1.loadPage($IPageLoader_111596bc6d1.java) # $IPageLoader_111596bc6d2.loadPage($IPageLoader_111596bc6d2.java) # org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:119) . -- Welcome to China Java Users Group(CNJUG). http://cnjug.dev.java.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URGENT - catalina.policy defenitions
http://mindprod.com/jgloss/policyfile.html On 3/16/07, Hernâni Cerqueira [EMAIL PROTECTED] wrote: Hello all. I'm deployng a webapp in a tomcat 5.5.9 server with security manager enabled. I can change the permissions but not disable it, and I'm having some difficulties running my application, because of the security constrains. Does anyone knows wath are the best catalina.policy options to be able to run a tapestry 4 webapp? Thank's in advance. Hernâni - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 Select component
Thanks a lot Weisu, will try this now. Anjana Gopinath On Mar 15, 2007, at 8:23 PM, Weisu wrote: In 5.0.3, you can use a List to display the dropdown. The html template looks like: select t:type=select t:model=supplierName t:value=nameValue/ And the component class looks like: public List getSupplierName() { //define your list List result = ..; return result; } public void setSupplierName(List _supplierName){ this._supplierName = _supplierName; } Anjana Gopinath-2 wrote: Hi I am trying to use the tapestry 5 Select component to display a drop down box. I created a enum with different values and tried giving this enum as the model parameter. It seems to be displaying only the first element of the enum. I get a dropdown with the all the values if the enum is a part of beanform. Can some one please help me out? i couldnt find any thing related to this in the tapestry 5 website Anjana Gopinath -- View this message in context: http://www.nabble.com/T5-Select- component-tf3411735.html#a9506331 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 - What is the replacement of the PageRedirectException
onActivate() may return a a page object (or page name). This will send a new client-side redirect to the indicated page. On 3/16/07, CB [EMAIL PROTECTED] wrote: Hello, how can i redirect to another page, for example in a @SetupRender method? Thanks and best regards, Christian -- View this message in context: http://www.nabble.com/T5---What-is-the-replacement-of-the-PageRedirectException-tf3414072.html#a9513025 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 -- How to run stateless?
The Form component has a default validation tracker that is stored in a persistent field, that's where you session is coming from. Until client-side field persistence is implemented, there isn't a way to have both forms and statelessness. We don't claim Tapestry 5 is complete! On 3/16/07, CB [EMAIL PROTECTED] wrote: Hello, what is to do that T5 does not create an http session? I have no persistent fields, but the session is created. Thanks and best regards Christian -- View this message in context: http://www.nabble.com/T5How-to-run-stateless--tf3414051.html#a9512974 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 javascript
Shoudn't you copy dojo source to src/main/webapp/ instead of src/main/webapp/WEB-INF. Sorry if i'm totally wrong, never used dojo, but it's just a guess. On 3/16/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Jesse It could be unrelated to tapestry 5. I was trying to create a dojo widget, so added the dojo source folder under my src/main/webapp/WEB- INF directory. Also included script type=text/javascript djConfig = { isDebug: false, baseRelativePath: dojo/dojo.js, preventBackButtonFix: false }; /script script type=text/javascript src=dojo/dojo.js/script in my html. This is what i have done for Tapestry 4.0 also. But when i load the html, i see this error in the javascript console, XML tag name mismatch (expected link) dojo.js (line 4) /head This could be because of some things on my side. I am totally new to Jetty and Maven and T5. Will dig deeper into this later today. Thanks for your help. Anjana Gopinath On Mar 15, 2007, at 11:24 PM, Jesse Kuhnert wrote: There shouldn't be any incompatibilities between the libraries, if there are I'm sure many people would like to know. More than likely you were just having errors unrelated to T5 or prototype. (but maybe not, hard to say off hand ) On 3/15/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Thanks for responding , Howard. switched to ordinary html table with loop component. Anjana Gopinath On Mar 15, 2007, at 7:40 PM, Howard Lewis Ship wrote: It may be a conflict between the Prototype.js library and the Dojo libraries. I haven't tried this yet. On 3/15/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Hi, I am trying to build a small app using tapestry 5. And trying to add a dojo table. I keep getting javascript errors in Firefox, so was wondering whether anyone has tried dojo with tapestry 5? i need to have a table with checkboxes, wasnt sure how to do this with the tapestry grid component. can someone provide some hints please? Thanks!!! Anjana Gopinath -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 javascript
Oh...Yeah good point Pablo. WEB-INF would be a place for classes / etc.. On 3/16/07, Pablo Ruggia [EMAIL PROTECTED] wrote: Shoudn't you copy dojo source to src/main/webapp/ instead of src/main/webapp/WEB-INF. Sorry if i'm totally wrong, never used dojo, but it's just a guess. On 3/16/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Jesse It could be unrelated to tapestry 5. I was trying to create a dojo widget, so added the dojo source folder under my src/main/webapp/WEB- INF directory. Also included script type=text/javascript djConfig = { isDebug: false, baseRelativePath: dojo/dojo.js, preventBackButtonFix: false }; /script script type=text/javascript src=dojo/dojo.js/script in my html. This is what i have done for Tapestry 4.0 also. But when i load the html, i see this error in the javascript console, XML tag name mismatch (expected link) dojo.js (line 4) /head This could be because of some things on my side. I am totally new to Jetty and Maven and T5. Will dig deeper into this later today. Thanks for your help. Anjana Gopinath On Mar 15, 2007, at 11:24 PM, Jesse Kuhnert wrote: There shouldn't be any incompatibilities between the libraries, if there are I'm sure many people would like to know. More than likely you were just having errors unrelated to T5 or prototype. (but maybe not, hard to say off hand ) On 3/15/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Thanks for responding , Howard. switched to ordinary html table with loop component. Anjana Gopinath On Mar 15, 2007, at 7:40 PM, Howard Lewis Ship wrote: It may be a conflict between the Prototype.js library and the Dojo libraries. I haven't tried this yet. On 3/15/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Hi, I am trying to build a small app using tapestry 5. And trying to add a dojo table. I keep getting javascript errors in Firefox, so was wondering whether anyone has tried dojo with tapestry 5? i need to have a table with checkboxes, wasnt sure how to do this with the tapestry grid component. can someone provide some hints please? Thanks!!! Anjana Gopinath -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 javascript
Hey Thats right, sorry my bad. i blindly copied all the htmls and dojo folders from my T4 app's context directory and dropped it to my T5s WEB-INF directory. Thanks a lo for helping me, Pablo and Jesse! Anjana Gopinath True North Technology 11465 John's Creek Parkway, Suite 300 Duluth, GA 30079 On Mar 16, 2007, at 10:40 AM, Pablo Ruggia wrote: Shoudn't you copy dojo source to src/main/webapp/ instead of src/main/webapp/WEB-INF. Sorry if i'm totally wrong, never used dojo, but it's just a guess. On 3/16/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Jesse It could be unrelated to tapestry 5. I was trying to create a dojo widget, so added the dojo source folder under my src/main/webapp/WEB- INF directory. Also included script type=text/javascript djConfig = { isDebug: false, baseRelativePath: dojo/dojo.js, preventBackButtonFix: false }; /script script type=text/javascript src=dojo/dojo.js/script in my html. This is what i have done for Tapestry 4.0 also. But when i load the html, i see this error in the javascript console, XML tag name mismatch (expected link) dojo.js (line 4) /head This could be because of some things on my side. I am totally new to Jetty and Maven and T5. Will dig deeper into this later today. Thanks for your help. Anjana Gopinath On Mar 15, 2007, at 11:24 PM, Jesse Kuhnert wrote: There shouldn't be any incompatibilities between the libraries, if there are I'm sure many people would like to know. More than likely you were just having errors unrelated to T5 or prototype. (but maybe not, hard to say off hand ) On 3/15/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Thanks for responding , Howard. switched to ordinary html table with loop component. Anjana Gopinath On Mar 15, 2007, at 7:40 PM, Howard Lewis Ship wrote: It may be a conflict between the Prototype.js library and the Dojo libraries. I haven't tried this yet. On 3/15/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Hi, I am trying to build a small app using tapestry 5. And trying to add a dojo table. I keep getting javascript errors in Firefox, so was wondering whether anyone has tried dojo with tapestry 5? i need to have a table with checkboxes, wasnt sure how to do this with the tapestry grid component. can someone provide some hints please? Thanks!!! Anjana Gopinath -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic components with template (? extends BaseComponent)
I don't know enough about tapestry internals to say if this is a good idea, but I've played around with DynamicBlock and your solution looks a lot simpler. At a guess, it looks like your approach is setting up your dynamic component when tapestry is loading the page template. If it's part of tapestry template cache, that means it would only pick the dynamic content the first time the page is loaded and reuse the same component on every subsequent call to the page - unless you're running in dev mode with page caching disabled. But as I said, that's a guess. If I'm wrong, I want to know how well does it handle things like RenderBody and passing parameters to your component? If it handles those concerns well, I'm tempted to wrap it up into a generic DynamicComponent. If I'm right, it probably jives with Howard's vision of static structure/dynamic behavior, but may not function in the way you intended. -Steve Portuendo Vestado wrote: Hi all, I'm trying to find a way to have the Delegator component use some other component with a template (chosen at runtime) to render output, and the closest I found was using PageLoader's createImplicitComponent() function. Is this correct for my intent? Are there more proper means of achieving the same effect? Technically I'm not trying to attach an implicit component to the page dynamically - I simply want to be able to instantiate a regular component with a template, and delegate rendering to it (or to one of several regular components, chosen at runtime based on some criteria). Here's the code: Home.java [...] @InjectObject(service:tapestry.page.PageLoader) public abstract IPageLoader getPageLoader(); public IRender getDynamicComponent() { return getComponent(whatever); } public void finishLoad(IRequestCycle cycle, IPageLoader loader, IComponentSpecification specification) { super.finishLoad(cycle, loader, specification); IComponent iComponent = getPageLoader().createImplicitComponent(getRequestCycle(), this, whatever, layout/Test, getLocation()); this.addComponent(iComponent); } [...] Home.html [...] span jwcid=@Delegator delegate=ognl:dynamicComponent/ [...] This does delegate and produces output of whatever's in layout/Test component's template. Is there any downside to this approach (seems kinda hacky)? Or would a more proper way be to actually implement my own IRender which reads from a template somehow? Thanks, -p ___ Yahoo! Mail - Sempre a melhor opção para você! Experimente já e veja as novidades. http://br.yahoo.com/mailbeta/tudonovo/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Autocompleter probs
My apologies my stupid counter is increasing exponentially... Here is what I should have sent instead html jwcid=@Shell ajaxEnabled=true browserLogLevel=DEBUG title=Edit Shipment body jwcid=@Body span jwcid=pageCss/ span jwcid=tabsScript/ div id=shipmentTabContainer div id=ccs form jwcid=[EMAIL PROTECTED] updateComponents=ognl:{'clientUpdate'} div jwcid=[EMAIL PROTECTED] id =clientUpdate div class=titleTextClient/div span jwcid=@If condition=ognl:shipment.client!=null span jwcid=@If condition=ognl:!clientClicked a jwcid=[EMAIL PROTECTED] updateComponents=ognl:{'clientUpdate'} listener=listener:clientClick span jwcid=clientClient/span /a /span span jwcid=@Else span class=auto_complete jwcid=clientAutoCompleter/ /span /span span jwcid=@Else span class=auto_complete jwcid=nullClientAutoCompleter/ /span /div input type=submit jwcid=@Submit action=listener:doEditClientShipperCons async=ognl:true value=Save Changes/ /form /div /div /body /html On Fri, 2007-03-16 at 13:12 +0100, Andrea Chiumenti wrote: updateComponents=ognl:{'clientArea'} ? did you mean updateComponents=ognl:{'clientUpdate'}? if so Note:__ This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Jaguar Freight Services and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity. This e-mail has been scanned for all known viruses.
T5 submit
Hi How to specify a listener method in T5? I have a page with multiple submit buttons and need to navigate to a different page when the user clicks on a particular button. i tried doing this @OnEvent(component = deleteApp) String deleteApp() { System.out.println(deleteApp); return AddService; } but got an exception This type of event does not support return values from event handler methods cant find the listener parameter for submit component. Can some one please help me out? Thanks! Anjana Gopinath True North Technology 11465 John's Creek Parkway, Suite 300 Duluth, GA 30079 [EMAIL PROTECTED]
Re: T5 submit
You have two choices: 1) Using naming convention: public String onSubmitFromMyForm(){ return AnotherPage; } Where Submit is the event name and MyForm is the component id. 2) Using annotations: @OnEvent(value=SUBMIT, component=myForm) public String onSubmitFromMyForm(){ return AnotherPage; } On 3/16/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Hi How to specify a listener method in T5? I have a page with multiple submit buttons and need to navigate to a different page when the user clicks on a particular button. i tried doing this @OnEvent(component = deleteApp) String deleteApp() { System.out.println(deleteApp); return AddService; } but got an exception This type of event does not support return values from event handler methods cant find the listener parameter for submit component. Can some one please help me out? Thanks! Anjana Gopinath True North Technology 11465 John's Creek Parkway, Suite 300 Duluth, GA 30079 [EMAIL PROTECTED]
Re: Hivemind Registry and Spring
Hi, I managed to expose the Registry to Spring via a custom ApplicationInitializer instead of the SpringApplicationInitializer: service-point id=SpringApplicationInitializer interface=org.apache.tapestry.services.ApplicationInitializer visibility=private invoke-factory construct class=tapestry.services.CustomSpringApplicatonInitializer set-object property=beanFactoryHolder value=service:hivemind.lib.DefaultSpringBeanFactoryHolder / set-service property=appGlobals service-id= tapestry.globals.ApplicationGlobals / /construct /invoke-factory /service-point And then inject the tapestry globals to it. Then in the Custom initializer. I obtain the registry from the globals with this name org.apache.tapestry.Registry: + ApplictationName I obtain the application name from the Sepecification, but really Hivemind uses the name of the servlet, which is'nt always the same as the Application, so this isn't always a safe call, here is the code: public void initialize(HttpServlet servlet) { ServletContext context = servlet.getServletContext(); WebApplicationContext webappctx = (WebApplicationContext) context .getAttribute( WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE); if (webappctx == null) { throw new ApplicationRuntimeException(Spring Context is NULL); } RegistryBeanFactory rbf = new RegistryBeanFactory(webappctx); String regAttrName = org.apache.tapestry.Registry: + appGlobals.getSpecification().getName();; rbf.setRegistry((Registry) getAppGlobals().getWebContext().getAttribute( regAttrName)); beanFactoryHolder.setBeanFactory(rbf); } Then as the RegistryBeanFactory, which now holds a reference to the registry, builds a bean I can inject the right service onto it. But what I really want to inject into the Spring Bean is an StateObject... but when I look for it into the Registry, like this getRegistry().getConfigurationAsMap(tapestry.state.ApplicationObjects ).get(object-name)) I get an instance of StateObjectContribution :(, instead of an object of my StateObject's class. I there anyway of stripping the StateObjectContribution to obtain the right object? please help me I'm really puzzled with this one. cheers, miguel On 3/15/07, Jesse Kuhnert [EMAIL PROTECTED] wrote: You can't, unless you control it through your own ApplicationServlet implementation. (or know the context parameter it is stored in, which I don't remember off hand as I've never used it ) On 3/14/07, Miguel Angel Hernández [EMAIL PROTECTED] wrote: Hi all, How can I expose the Hivemind Registry in a spring bean? thanks Miguel -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5]Question on ASO configuration
I am trying to store a user as an ASO. I am able to set the user, but when I want to log out, I figured the right way to do it was to just set the user ASO to null. I believe this works fine, just that now when I chcek to see if the user is null or not, as expected, the application state manager will attempt to create a new instance of it. I figured this wouldn't be a problem, since I could just override the configuration to have something like: public void contributeApplicationStateManager(MappedConfigurationClass, ApplicationStateContribution configuration) { ApplicationStateCreatorUser creator = new ApplicationStateCreatorUser() { public User create() { return null; } }; configuration.add(User.class, new ApplicationStateContribution(session, creator)); } however this didn't seem to make any difference. I still get a java.lang.InstantiationException. Is there something I am missing? -- Peter Beshai Pure Mathematics/Computer Science Student University of Waterloo
Re: T5 submit
Note that you have more values to choose from than simply SUBMIT (note, you can use the value submit -- case insensitivity). You may be interested in only having your method called if the form submits successfully, in which case you would use the value success. You can view the list of event types forms have on the javadoc page: http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/corelib/components/Form.html On 3/16/07, Pablo Ruggia [EMAIL PROTECTED] wrote: You have two choices: 1) Using naming convention: public String onSubmitFromMyForm(){ return AnotherPage; } Where Submit is the event name and MyForm is the component id. 2) Using annotations: @OnEvent(value=SUBMIT, component=myForm) public String onSubmitFromMyForm(){ return AnotherPage; } On 3/16/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Hi How to specify a listener method in T5? I have a page with multiple submit buttons and need to navigate to a different page when the user clicks on a particular button. i tried doing this @OnEvent(component = deleteApp) String deleteApp() { System.out.println(deleteApp); return AddService; } but got an exception This type of event does not support return values from event handler methods cant find the listener parameter for submit component. Can some one please help me out? Thanks! Anjana Gopinath True North Technology 11465 John's Creek Parkway, Suite 300 Duluth, GA 30079 [EMAIL PROTECTED] -- Peter Beshai Pure Mathematics/Computer Science Student University of Waterloo
Can Tapestry 5 be used for production?
Greeting, everyone! I know Tapestry 5 only has preview releases at the moment. I'm excited to see the auto-reloading feature, which is the main reason why I'm considering it for the current project. Without this, though I've done 2 projects with Tapestry 3, I would still tend to drop it because it's just unreasonable having to restart the server for a simple HTML change (in production environment, with Apache as web server). Has anyone played enough with Tapestry 5 and have an idea about these: 1. How fast can the app be up at server restart? 2. Is it smooth working with Tomcat? 3. Basically, is there any major issue that would prevent one from using it for production? My project is due to finish within a month or two, so I actually need to make a decision rather quickly, say within a few days. If I can't use Tapestry 5, I might consider JSF. Any suggestion or ideas will be extremely helpful! Thanks a lot! Celia - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5]Question on ASO configuration
I haven't looked into this stuff yet, but if I were dealing with it I'd probably just make a new ApplicationState class with a user property that I could set at will, and let Tapestry instantiate the ApplicationState whenever it wants to. Of course, once T5 supports ASO flags, you'd want to start using those in order to prevent unnecessary session creation. On 3/16/07, Peter Beshai [EMAIL PROTECTED] wrote: I am trying to store a user as an ASO. I am able to set the user, but when I want to log out, I figured the right way to do it was to just set the user ASO to null. I believe this works fine, just that now when I chcek to see if the user is null or not, as expected, the application state manager will attempt to create a new instance of it. I figured this wouldn't be a problem, since I could just override the configuration to have something like: public void contributeApplicationStateManager(MappedConfigurationClass, ApplicationStateContribution configuration) { ApplicationStateCreatorUser creator = new ApplicationStateCreatorUser() { public User create() { return null; } }; configuration.add(User.class, new ApplicationStateContribution(session, creator)); } however this didn't seem to make any difference. I still get a java.lang.InstantiationException. Is there something I am missing? -- Peter Beshai Pure Mathematics/Computer Science Student University of Waterloo
Re: Can Tapestry 5 be used for production?
On Mar 16, 2007, at 3/161:40 PM , Celia Mou wrote: Greeting, everyone! I know Tapestry 5 only has preview releases at the moment. I'm excited to see the auto-reloading feature, which is the main reason why I'm considering it for the current project. Without this, though I've done 2 projects with Tapestry 3, I would still tend to drop it because it's just unreasonable having to restart the server for a simple HTML change (in production environment, with Apache as web server). Has anyone played enough with Tapestry 5 and have an idea about these: 1. How fast can the app be up at server restart? On my local machine (a core2duo 2.16 ghz mac with 2 gigs of ram), running jetty, a jetty restart takes under 1 second to be up and running the app again. 2. Is it smooth working with Tomcat? Yes. I'm running a set of pages off of tomcat (behind apache, connected via modjk), with no trouble. The only issue I ran into (http://issues.apache.org/jira/browse/ TAPESTRY-1343) has been resolved. 3. Basically, is there any major issue that would prevent one from using it for production? What exists in tap5 is extremely solid. The following may or may not be issues for you: 1) tap5 templates have to be valid xml. So, if you don't declare a doctype, you can't use html entities. 2) The SAX parser chokes on the html doctypes, so you have to use an xhtml doctype Daniel Gredler recently contributed a patch (yet to be applied) that makes the tapestry template parser an entity resolver, so one could theoretically do a local mapping of the html doctypes to the xhtml doctypes; this would let you declare your doctypes as html, but still keep the sax parser happy. (see http://issues.apache.org/jira/TAPESTRY-1263) 3) Doctypes that are put into templates are not transmitted to the client, so your html documents that get sent to the client never have doctypes I've submitted a patch for this; my patch includes the material in Daniel's patch for TAPESTRY-1263. See http://issues.apache.org/jira/TAPESTRY-1264 4) framework completeness: the framework still lacks native support for some things that you may or may not need, such as an Upload component. 5) the page testing facility has some bugs related to context assets and ASO's. Otherwise, the page/component testing ability is awesome, and a real boon. My personal thoughts: if you need upload support and serious ajax support, consider something else (eg: tap4.1). But if you don't need those, tap5 is great as it stands now. Robert My project is due to finish within a month or two, so I actually need to make a decision rather quickly, say within a few days. If I can't use Tapestry 5, I might consider JSF. Any suggestion or ideas will be extremely helpful! Thanks a lot! Celia - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 submit
Thanks Peter and Pablo I tried giving both options suggested by Pablo input t:type=Submit value=Select applications t:id=addApps / @OnEvent(value = submit,component=addApps) void addApps(){ System.out.println(---here ); // return viewSummary; } This is not getting invoked at all!. if i just give onEvent (component=addApps) , it is invoked , but wont take a returntype. Also tried public String onSubmitFromAddApps() { return ViewSummary; } That too didnt work Thanks Anjana Gopinath True North Technology 11465 John's Creek Parkway, Suite 300 Duluth, GA 30079 [EMAIL PROTECTED] On Mar 16, 2007, at 2:19 PM, Peter Beshai wrote: Note that you have more values to choose from than simply SUBMIT (note, you can use the value submit -- case insensitivity). You may be interested in only having your method called if the form submits successfully, in which case you would use the value success. You can view the list of event types forms have on the javadoc page: http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/ apache/tapestry/corelib/components/Form.html On 3/16/07, Pablo Ruggia [EMAIL PROTECTED] wrote: You have two choices: 1) Using naming convention: public String onSubmitFromMyForm(){ return AnotherPage; } Where Submit is the event name and MyForm is the component id. 2) Using annotations: @OnEvent(value=SUBMIT, component=myForm) public String onSubmitFromMyForm(){ return AnotherPage; } On 3/16/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Hi How to specify a listener method in T5? I have a page with multiple submit buttons and need to navigate to a different page when the user clicks on a particular button. i tried doing this @OnEvent(component = deleteApp) String deleteApp() { System.out.println(deleteApp); return AddService; } but got an exception This type of event does not support return values from event handler methods cant find the listener parameter for submit component. Can some one please help me out? Thanks! Anjana Gopinath True North Technology 11465 John's Creek Parkway, Suite 300 Duluth, GA 30079 [EMAIL PROTECTED] -- Peter Beshai Pure Mathematics/Computer Science Student University of Waterloo
Re: T5 submit
Can you send us your page template and class ? On 3/16/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Thanks Peter and Pablo I tried giving both options suggested by Pablo input t:type=Submit value=Select applications t:id=addApps / @OnEvent(value = submit,component=addApps) void addApps(){ System.out.println(---here ); // return viewSummary; } This is not getting invoked at all!. if i just give onEvent (component=addApps) , it is invoked , but wont take a returntype. Also tried public String onSubmitFromAddApps() { return ViewSummary; } That too didnt work Thanks Anjana Gopinath True North Technology 11465 John's Creek Parkway, Suite 300 Duluth, GA 30079 [EMAIL PROTECTED] On Mar 16, 2007, at 2:19 PM, Peter Beshai wrote: Note that you have more values to choose from than simply SUBMIT (note, you can use the value submit -- case insensitivity). You may be interested in only having your method called if the form submits successfully, in which case you would use the value success. You can view the list of event types forms have on the javadoc page: http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/ apache/tapestry/corelib/components/Form.html On 3/16/07, Pablo Ruggia [EMAIL PROTECTED] wrote: You have two choices: 1) Using naming convention: public String onSubmitFromMyForm(){ return AnotherPage; } Where Submit is the event name and MyForm is the component id. 2) Using annotations: @OnEvent(value=SUBMIT, component=myForm) public String onSubmitFromMyForm(){ return AnotherPage; } On 3/16/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Hi How to specify a listener method in T5? I have a page with multiple submit buttons and need to navigate to a different page when the user clicks on a particular button. i tried doing this @OnEvent(component = deleteApp) String deleteApp() { System.out.println(deleteApp); return AddService; } but got an exception This type of event does not support return values from event handler methods cant find the listener parameter for submit component. Can some one please help me out? Thanks! Anjana Gopinath True North Technology 11465 John's Creek Parkway, Suite 300 Duluth, GA 30079 [EMAIL PROTECTED] -- Peter Beshai Pure Mathematics/Computer Science Student University of Waterloo
Re: Can Tapestry 5 be used for production?
Speaking of 4.1, I remember seeing a website in the last week or so that said it should not be used for production yet. I am guessing that the page (possibly on apache.org) is out of date. Back to Tap 5, are there certain parts or a percentage of interfaces that we can count on not changing in Tap 5.0 final? I've heard lots of great stuff about it from the list. As an aside, I am just now learning about Spring integration with 4.0.1, so I guess I'm still pretty newb-ish. :-) Daniel On 3/16/07, Robert Zeigler [EMAIL PROTECTED] wrote: On Mar 16, 2007, at 3/161:40 PM , Celia Mou wrote: Greeting, everyone! I know Tapestry 5 only has preview releases at the moment. I'm excited to see the auto-reloading feature, which is the main reason why I'm considering it for the current project. Without this, though I've done 2 projects with Tapestry 3, I would still tend to drop it because it's just unreasonable having to restart the server for a simple HTML change (in production environment, with Apache as web server). Has anyone played enough with Tapestry 5 and have an idea about these: 1. How fast can the app be up at server restart? On my local machine (a core2duo 2.16 ghz mac with 2 gigs of ram), running jetty, a jetty restart takes under 1 second to be up and running the app again. 2. Is it smooth working with Tomcat? Yes. I'm running a set of pages off of tomcat (behind apache, connected via modjk), with no trouble. The only issue I ran into (http://issues.apache.org/jira/browse/ TAPESTRY-1343) has been resolved. 3. Basically, is there any major issue that would prevent one from using it for production? What exists in tap5 is extremely solid. The following may or may not be issues for you: 1) tap5 templates have to be valid xml. So, if you don't declare a doctype, you can't use html entities. 2) The SAX parser chokes on the html doctypes, so you have to use an xhtml doctype Daniel Gredler recently contributed a patch (yet to be applied) that makes the tapestry template parser an entity resolver, so one could theoretically do a local mapping of the html doctypes to the xhtml doctypes; this would let you declare your doctypes as html, but still keep the sax parser happy. (see http://issues.apache.org/jira/TAPESTRY-1263) 3) Doctypes that are put into templates are not transmitted to the client, so your html documents that get sent to the client never have doctypes I've submitted a patch for this; my patch includes the material in Daniel's patch for TAPESTRY-1263. See http://issues.apache.org/jira/TAPESTRY-1264 4) framework completeness: the framework still lacks native support for some things that you may or may not need, such as an Upload component. 5) the page testing facility has some bugs related to context assets and ASO's. Otherwise, the page/component testing ability is awesome, and a real boon. My personal thoughts: if you need upload support and serious ajax support, consider something else (eg: tap4.1). But if you don't need those, tap5 is great as it stands now. Robert My project is due to finish within a month or two, so I actually need to make a decision rather quickly, say within a few days. If I can't use Tapestry 5, I might consider JSF. Any suggestion or ideas will be extremely helpful! Thanks a lot! Celia - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 submit
Pabloi have attached a simple html and page class.Thanks a lot for looking into this. AddService.java Description: Binary data Anjana GopinathTrue North Technology11465 John's Creek Parkway, Suite 300Duluth, GA 30079[EMAIL PROTECTED] On Mar 16, 2007, at 4:01 PM, Pablo Ruggia wrote:Can you send us your page template and class ?On 3/16/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Thanks Peter and PabloI tried giving both options suggested by Pabloinput t:type="Submit" value="Select applications" t:id="addApps" / @OnEvent(value = "submit",component="addApps") void addApps(){ System.out.println("---here "); // return "viewSummary"; }This is not getting invoked at all!. if i just give onEvent(component="addApps") , it is invoked , but wont take a returntype.Also tried public String onSubmitFromAddApps() { return "ViewSummary"; }That too didnt workThanksAnjana GopinathTrue North Technology11465 John's Creek Parkway, Suite 300Duluth, GA 30079[EMAIL PROTECTED]On Mar 16, 2007, at 2:19 PM, Peter Beshai wrote: Note that you have more values to choose from than simply SUBMIT (note, you can use the value "submit" -- case insensitivity). You may be interested in only having your method called if the form submits successfully, in which case you would use the value "success". You can view the list of event types forms have on the javadoc page: http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/ apache/tapestry/corelib/components/Form.html On 3/16/07, Pablo Ruggia [EMAIL PROTECTED] wrote: You have two choices: 1) Using naming convention: public String onSubmitFromMyForm(){ return "AnotherPage"; } Where "Submit" is the event name and "MyForm" is the component id. 2) Using annotations: @OnEvent(value="SUBMIT", component="myForm") public String onSubmitFromMyForm(){ return "AnotherPage"; } On 3/16/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Hi How to specify a listener method in T5? I have a page with multiple submit buttons and need to navigate to a different page when the user clicks on a particular button. i tried doing this @OnEvent(component = "deleteApp") String deleteApp() { System.out.println("deleteApp"); return "AddService"; } but got an exception "This type of event does not support return values from event handler methods" cant find the listener parameter for submit component. Can some one please help me out? Thanks!Anjana Gopinath True North Technology 11465 John's Creek Parkway, Suite 300 Duluth, GA 30079 [EMAIL PROTECTED] -- Peter Beshai Pure Mathematics/Computer Science Student University of Waterloo
Re: T5 submit
The Form fire this this events: submit, success, prepare, validate and failure. The Submit component only fires selected event. So, if you use the form component, you have to use submit or success events. If you are listening to the button, then use selected event. So you have to put something like this: @OnEvent(value = selected,component=addApps) void addApps(){ System.out.println(---here ); // return viewSummary; } On 3/16/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Pablo i have attached a simple html and page class. Thanks a lot for looking into this. Anjana Gopinath True North Technology 11465 John's Creek Parkway, Suite 300 Duluth, GA 30079 [EMAIL PROTECTED] On Mar 16, 2007, at 4:01 PM, Pablo Ruggia wrote: Can you send us your page template and class ? On 3/16/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Thanks Peter and Pablo I tried giving both options suggested by Pablo input t:type=Submit value=Select applications t:id=addApps / @OnEvent(value = submit,component=addApps) void addApps(){ System.out.println(---here ); // return viewSummary; } This is not getting invoked at all!. if i just give onEvent (component=addApps) , it is invoked , but wont take a returntype. Also tried public String onSubmitFromAddApps() { return ViewSummary; } That too didnt work Thanks Anjana Gopinath True North Technology 11465 John's Creek Parkway, Suite 300 Duluth, GA 30079 [EMAIL PROTECTED] On Mar 16, 2007, at 2:19 PM, Peter Beshai wrote: Note that you have more values to choose from than simply SUBMIT (note, you can use the value submit -- case insensitivity). You may be interested in only having your method called if the form submits successfully, in which case you would use the value success. You can view the list of event types forms have on the javadoc page: http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/ apache/tapestry/corelib/components/Form.html On 3/16/07, Pablo Ruggia [EMAIL PROTECTED] wrote: You have two choices: 1) Using naming convention: public String onSubmitFromMyForm(){ return AnotherPage; } Where Submit is the event name and MyForm is the component id. 2) Using annotations: @OnEvent(value=SUBMIT, component=myForm) public String onSubmitFromMyForm(){ return AnotherPage; } On 3/16/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Hi How to specify a listener method in T5? I have a page with multiple submit buttons and need to navigate to a different page when the user clicks on a particular button. i tried doing this @OnEvent(component = deleteApp) String deleteApp() { System.out.println(deleteApp); return AddService; } but got an exception This type of event does not support return values from event handler methods cant find the listener parameter for submit component. Can some one please help me out? Thanks! Anjana Gopinath True North Technology 11465 John's Creek Parkway, Suite 300 Duluth, GA 30079 [EMAIL PROTECTED] -- Peter Beshai Pure Mathematics/Computer Science Student University of Waterloo
Re: Dynamic components with template (? extends BaseComponent)
Darn you're right, I've never even thought of that. finishLoad(), which I'm overriding to add the new implicit component, is called only once before the page gets cached. So basically, my dynamic component is only dynamic the first time template loads. The reason I chose this method is that if you do it (that is, attach a component via addComponent()) at render time, say in pageBeginRender(), it hits AbstractComponent.checkActiveLock() sentinel and throws a Component Home is active and its configuration state may not be changed, which is quite reasonable. I guess I'm still on the lookout for an option to delegate rendering to a component with a template. There must be a way of instantiating those just as simple as pages (i.e. with IRequestCycle.getPage(...)). Btw, DynamicBlock you mentioned, is this it: http://www.behindthesite.com/blog/C1931765677/E1630021481/? Does it work for 4.1 - seems a little old, September 2, 2004. Thanks, -P -- I don't know enough about tapestry internals to say if this is a good idea, but I've played around with DynamicBlock and your solution looks a lot simpler. At a guess, it looks like your approach is setting up your dynamic component when tapestry is loading the page template. If it's part of tapestry template cache, that means it would only pick the dynamic content the first time the page is loaded and reuse the same component on every subsequent call to the page - unless you're running in dev mode with page caching disabled. But as I said, that's a guess. If I'm wrong, I want to know how well does it handle things like RenderBody and passing parameters to your component? If it handles those concerns well, I'm tempted to wrap it up into a generic DynamicComponent. If I'm right, it probably jives with Howard's vision of static structure/dynamic behavior, but may not function in the way you intended. -Steve ___ Yahoo! Mail - Sempre a melhor opção para você! Experimente já e veja as novidades. http://br.yahoo.com/mailbeta/tudonovo/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]