T5: trying out tutorial hi/lo game, but...
Hi, I'm learning by trying out the hi/lo game, everytime I clicked one of the number links, the onActionFromLink was not called, here is the template: t:loop source=1..10 value=guess t:actionlink t:id=guess context=guess${guess}/t:actionlink /t:loop it generates following: /guess.guess/1 1 /guess.guess/2 2 /guess.guess/3 3 the Guess.java as follow: public class Guess { @Persist private int _target; private int _guess; public int getGuess() { return _guess; } public void setGuess(int _guess) { this._guess = _guess; } void setup(int target) { _target = target; } public int getTarget() { return _target; } @Persist private String _message; public String getMessage() { return _message; } String onActionFromLink(int guess) { if (guess == _target) return GameOver; if (guess _target) _message = String.format(%d is too low., guess); else _message = String.format(%d is too high., guess); return null; } } -- View this message in context: http://www.nabble.com/T5%3A-trying-out-tutorial-hi-lo-game%2C-but...-tf4309599.html#a12268676 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: Ajax example in doco not working?
I think Geoff is not complaining about @Any, but about @Insert. In fact, most components nowadays call AbstractComponent.renderIdAttribute(), including Any. Insert does not. This seems inconsistent to me and it's an easy fix, so I'd file an issue. -Original Message- From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 22, 2007 7:04 AM To: Tapestry users Subject: Re: Ajax example in doco not working? Id isn't a formal parameter of Any - so providing it forces @Any to render tags. Without it there are no tags / markup rendered at all - thus no client side elements to find and update in an ajax request. On 8/19/07, Geoff Callender [EMAIL PROTECTED] wrote: Is the basic Ajax example in the doco missing something (http:// tapestry.apache.org/tapestry4.1/ajax/basics.html)? The example has this: a jwcid=@DirectLink listener=listener:setTime updateComponents=timeRefresh time/a div jwcid=[EMAIL PROTECTED] value=ognl:time renderTag=true/ which rendered as: divSun Aug 19 21:29:00 EST 2007/div and it wouldn't update the time. It seems updateComponents must reference an id, so I tried adding an id explicitly: div jwcid=[EMAIL PROTECTED] value=ognl:time renderTag=true id=time/ which rendered as: div id=timeSun Aug 19 21:29:00 EST 2007/div and it started working! I have to admit, I was expecting that @Insert would render an id without my help, taking the name time from jwcid=[EMAIL PROTECTED]. So, is the example wrong, or is @Insert misbehaving, or is my environment misbehaving? Geoff -- 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [T4] update documentation to reflect client:page and client:app state scopes
please file a jira issue for this. Otherwise it'll get lost. -Original Message- From: Ulrich Stärk [mailto:[EMAIL PROTECTED] Sent: Friday, August 17, 2007 6:41 PM To: Tapestry users Subject: [T4] update documentation to reflect client:page and client:app state scopes Hi, could someone please update the docs for 4.0 and 4.1 to document the client:app and client:page scopes introduced in July 2005? Maybe just copy over the desciption from hibernate.persist.xml. Cheers, Uli - 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: [T4] update documentation to reflect client:page and client:app state scopes
Did so on saturday. Uli On Mi, 22.08.2007, 08:47, [EMAIL PROTECTED] sagte: please file a jira issue for this. Otherwise it'll get lost. -Original Message- From: Ulrich Stärk [mailto:[EMAIL PROTECTED] Sent: Friday, August 17, 2007 6:41 PM To: Tapestry users Subject: [T4] update documentation to reflect client:page and client:app state scopes Hi, could someone please update the docs for 4.0 and 4.1 to document the client:app and client:page scopes introduced in July 2005? Maybe just copy over the desciption from hibernate.persist.xml. Cheers, Uli - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antwort: T5: trying out tutorial hi/lo game, but...
Angelo Chen [EMAIL PROTECTED] wrote: Hi, I'm learning by trying out the hi/lo game, everytime I clicked one of the number links, the onActionFromLink was not called, here is the template: It should be onActionFromGuess because the link's id is guess. -- Chris
Re: [T4] compputing url relative to the context
Let Tapestry inject the infrastructure:contextPath object like @InjectObject(infrastructure:contextPath) public abstract String getContextPath(); Then write some computeUrl method similar to this one (just typed this in, no guarantee that this will work). public String computeUrl() { String locale = getLocale().getCountry().toLowerCase(); return getContextPath() + /Public/flags/ + locale + .gif; } Cheers, Uli On Mi, 22.08.2007, 01:53, #Cyrille37# sagte: Hello, I could not find how to compute a url ... It is for a component which give the user the possibility to change his locale by clicking on a image (country flags). Urls should be like : /theApp/Public/flags/fr.gif There is 2 dynamics parts : * the application context : /theApp * the available locale code : fr like : context/Public/flags/localeCode.gif I thought about asset name=xxx path=context: / but it is not possible because path attribute started by context: could not use ognl expression. Also thought about img jwcid=@Any src=ognl: page.context + '/xxx/' + currentLoopItem + '.gif' / but page.context does not exists. I really could not find how to compute the context part of urls. Have you got any idea please ? Thanks cyrille - 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: Tapestry 4.1.2 Javaassist and runtime errors
Hi Jessie, Thanks for your reply. I don't think this problem relates to OGNL... The thing is that these classes are pretty ordinary page classes with Strings and Integers, really nothing special, and besides it works great for a while, and then after a random period it gets confused? which tells me it's not OGNL related. The bug is very difficult to reproduce because it happens after a random period of normal activity. When it breaks though, all page classes seem to break. My guess is that the error occurs either after garbage collection or a servlet exception, and may relate to class reloading somehow. Stopping and starting the servlet corrects it... I'm very confused :'( Peter Jesse Kuhnert wrote: I think you are right - it probably did happen when upgrading from 4.1.1 - 4.1.2. I changed a few things wrt OGNL and this is probably something related. If you file a re-produceable bug report here http://jira.opensymphony.com/browse/OGNL I will look in to it. (re-produceable meaning that I have the ability to re-produce your error exactly by knowing the object types (exact) and values involved in whatever expressions aren't compiling. Haven't heard about classes disappearing before so not sure what that is. The Tapestry 4.1 demos all run on 4.1.2 / tomcat. On 8/21/07, Peter Stavrinides [EMAIL PROTECTED] wrote: Hi All, Can anyone help me to understand what's going on here... I run my servlet on Tomcat, it works great for a while, but then some classes seem to disappear, or at least they cant be found by Hivemind, and the log fills up with errors like this one: org.apache.hivemind.ApplicationRuntimeException: Unable to add method java.lang.Object get(ognl.OgnlContext, java.lang.Object) to class $ASTProperty_11488aa7b43: [source error] no such class: $RiskModel_61 Caused by: javassist.CannotCompileException: [source error] no such class: $RiskModel_61 What is javassist doing and why cant Hivemind find my classes any more? This error has appeared since upgrading to 4.1.2 from 4.1.1. Kind regards Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Antwort: T5: trying out tutorial hi/lo game, but...
Hi Chris, Now it works, thanks. however I can't see those too high and too low messages as in the tutorial, any fix to this? Thanks, Christian Koeberl wrote: Angelo Chen [EMAIL PROTECTED] wrote: Hi, I'm learning by trying out the hi/lo game, everytime I clicked one of the number links, the onActionFromLink was not called, here is the template: It should be onActionFromGuess because the link's id is guess. -- Chris -- View this message in context: http://www.nabble.com/T5%3A-trying-out-tutorial-hi-lo-game%2C-but...-tf4309599.html#a12270059 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: Tapestry 4.1.2 Javaassist and runtime errors
Hi Peter can you try to set the property org.apache.tapestry.page-pool-evict-idle-page-minutes to -1? You can, for example, add the following to your application's hivemind.xml : contribution configuration-id=hivemind.ApplicationDefaults default symbol=org.apache.tapestry.page-pool-evict-idle-page-minutes value=-1 / /contribution Does this help? Marcus -Original Message- From: Peter Stavrinides [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 22, 2007 10:05 AM To: Tapestry users Subject: Re: Tapestry 4.1.2 Javaassist and runtime errors Hi Jessie, Thanks for your reply. I don't think this problem relates to OGNL... The thing is that these classes are pretty ordinary page classes with Strings and Integers, really nothing special, and besides it works great for a while, and then after a random period it gets confused? which tells me it's not OGNL related. The bug is very difficult to reproduce because it happens after a random period of normal activity. When it breaks though, all page classes seem to break. My guess is that the error occurs either after garbage collection or a servlet exception, and may relate to class reloading somehow. Stopping and starting the servlet corrects it... I'm very confused :'( Peter Jesse Kuhnert wrote: I think you are right - it probably did happen when upgrading from 4.1.1 - 4.1.2. I changed a few things wrt OGNL and this is probably something related. If you file a re-produceable bug report here http://jira.opensymphony.com/browse/OGNL I will look in to it. (re-produceable meaning that I have the ability to re-produce your error exactly by knowing the object types (exact) and values involved in whatever expressions aren't compiling. Haven't heard about classes disappearing before so not sure what that is. The Tapestry 4.1 demos all run on 4.1.2 / tomcat. On 8/21/07, Peter Stavrinides [EMAIL PROTECTED] wrote: Hi All, Can anyone help me to understand what's going on here... I run my servlet on Tomcat, it works great for a while, but then some classes seem to disappear, or at least they cant be found by Hivemind, and the log fills up with errors like this one: org.apache.hivemind.ApplicationRuntimeException: Unable to add method java.lang.Object get(ognl.OgnlContext, java.lang.Object) to class $ASTProperty_11488aa7b43: [source error] no such class: $RiskModel_61 Caused by: javassist.CannotCompileException: [source error] no such class: $RiskModel_61 What is javassist doing and why cant Hivemind find my classes any more? This error has appeared since upgrading to 4.1.2 from 4.1.1. Kind regards Peter - 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]
[T5] Marking fields in error
I've got a friend who is color blind. I've shown to him the way how the fields in error are marked in T5 - just making everything red, without using any error markers - and this doesn't look convincing to him. So I suggest T5 developers adding some kind of error marker - two red asterisks or an icon - on the right side of a field in error. That would be helpful for many users. Thanks, Alexander -- CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown. This email transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright 2007 CIGNA ==
Re: [T4] dojo 0.9 upgrade, any plan?
In a month or so I might be able to contribute some code. But how to deal with backward compatibility? I mean switching to a tapestry version with dojo 0.9 might oblige people to rewrite custom widget and, in general, dojo code (unless one wants to also retain old 0.4.x widgets/support but it would be more complicated). Is there a aproximative release date for 4.1.3? On 8/22/07, Jesse Kuhnert [EMAIL PROTECTED] wrote: Nope. No plans on my end at least. I suspect if it is to come from Howard or myself it will make its first appearance in T5. (not that I wouldn't love to move to it in T4) On 8/21/07, Martino Piccinato [EMAIL PROTECTED] wrote: Is there any plan to upgrade to new dojo 0.9 for tapestry 4.1.3? This should require some changes to existing widget and dojo support as dojo version 0.9 breaks previous API. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5:Tiles?
Hi, Is there a way to do something like Struts with Tiles in Tapestry 5? samples? Thanks. A.C. -- View this message in context: http://www.nabble.com/T5%3ATiles--tf4310807.html#a12272065 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] Marking fields in error
T5 _does_ mark a field with an error marker. field-error-marker.png Cheers, Nick. Kolesnikov, Alexander GNI wrote: I've got a friend who is color blind. I've shown to him the way how the fields in error are marked in T5 - just making everything red, without using any error markers - and this doesn't look convincing to him. So I suggest T5 developers adding some kind of error marker - two red asterisks or an icon - on the right side of a field in error. That would be helpful for many users. Thanks, Alexander -- CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown. This email transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright 2007 CIGNA == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [T5] Marking fields in error
Okay, so I am taking this back :) I was looking at the screenshots in the User Guide. But in this case, do I have an opportunity to override the existing marker? Thanks, Alexander -Original Message- From: Nick Westgate [mailto:[EMAIL PROTECTED] Sent: 22 August 2007 11:37 To: Tapestry users Subject: Re: [T5] Marking fields in error T5 _does_ mark a field with an error marker. field-error-marker.png Cheers, Nick. Kolesnikov, Alexander GNI wrote: I've got a friend who is color blind. I've shown to him the way how the fields in error are marked in T5 - just making everything red, without using any error markers - and this doesn't look convincing to him. So I suggest T5 developers adding some kind of error marker - two red asterisks or an icon - on the right side of a field in error. That would be helpful for many users. Thanks, Alexander -- CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown. This email transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright 2007 CIGNA == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown. This email transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright 2007 CIGNA == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5:Simple form submit
Hi, I have finished the tutorial in the T5 site, it uses BeanFormEdit, can somebody show me how to do the basic form edit/submit? like a textField for username, a button to submit, then how the java side capture the two fields? thanks. A.C. -- View this message in context: http://www.nabble.com/T5%3ASimple-form-submit-tf4310884.html#a12272283 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:Simple form submit
There is a login example right here: http://tapestry.apache.org/tapestry5/tapestry-core/guide/validation.html Cheers, Nick. Angelo Chen wrote: Hi, I have finished the tutorial in the T5 site, it uses BeanFormEdit, can somebody show me how to do the basic form edit/submit? like a textField for username, a button to submit, then how the java side capture the two fields? thanks. A.C. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Tiles?
Hi Angelo, I had the same question and as I understood - you have to write your own custom component see http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html and now I try to implement this - if you are interested - we can communicate about the topic and create some kind of howto... 2007/8/22, Angelo Chen [EMAIL PROTECTED] : Hi, Is there a way to do something like Struts with Tiles in Tapestry 5? samples? Thanks. A.C. -- View this message in context: http://www.nabble.com/T5%3ATiles--tf4310807.html#a12272065 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] Marking fields in error
I'm sure, you can, though I haven't tried this yet. You could try just overriding that asset in your project. For colours you can override styles in your own CSS files. If you want more substantial changes, look into overriding the DefaultValidationDecorator. Search the source for: DefaultValidationDelegate Cheers, Nick. Kolesnikov, Alexander GNI wrote: Okay, so I am taking this back :) I was looking at the screenshots in the User Guide. But in this case, do I have an opportunity to override the existing marker? Thanks, Alexander -Original Message- From: Nick Westgate [mailto:[EMAIL PROTECTED] Sent: 22 August 2007 11:37 To: Tapestry users Subject: Re: [T5] Marking fields in error T5 _does_ mark a field with an error marker. field-error-marker.png Cheers, Nick. Kolesnikov, Alexander GNI wrote: I've got a friend who is color blind. I've shown to him the way how the fields in error are marked in T5 - just making everything red, without using any error markers - and this doesn't look convincing to him. So I suggest T5 developers adding some kind of error marker - two red asterisks or an icon - on the right side of a field in error. That would be helpful for many users. Thanks, Alexander -- CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown. This email transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright 2007 CIGNA == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown. This email transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright 2007 CIGNA == - 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] Marking fields in error
Right now it seems that the path for the marker image is hardcoded. But you could try to create a file org/apache/tapestry/field-error-marker.png in your classpath and store your own marker there. This should override the default marker. This is similar to http://wiki.apache.org/tapestry/Tapestry5HowToOverrideTheDefaultErrorMessageBanner. HTH, Uli On Mi, 22.08.2007, 12:42, Kolesnikov, Alexander GNI sagte: Okay, so I am taking this back :) I was looking at the screenshots in the User Guide. But in this case, do I have an opportunity to override the existing marker? Thanks, Alexander -Original Message- From: Nick Westgate [mailto:[EMAIL PROTECTED] Sent: 22 August 2007 11:37 To: Tapestry users Subject: Re: [T5] Marking fields in error T5 _does_ mark a field with an error marker. field-error-marker.png Cheers, Nick. Kolesnikov, Alexander GNI wrote: I've got a friend who is color blind. I've shown to him the way how the fields in error are marked in T5 - just making everything red, without using any error markers - and this doesn't look convincing to him. So I suggest T5 developers adding some kind of error marker - two red asterisks or an icon - on the right side of a field in error. That would be helpful for many users. Thanks, Alexander -- CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown. This email transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright 2007 CIGNA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown. This email transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright 2007 CIGNA ===- 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: Ajax example in doco not working?
That's right - it's the @Insert that surprised me. I''l put it in JIRA. Thanks. On 22/08/2007, at 4:37 PM, [EMAIL PROTECTED] wrote: I think Geoff is not complaining about @Any, but about @Insert. In fact, most components nowadays call AbstractComponent.renderIdAttribute(), including Any. Insert does not. This seems inconsistent to me and it's an easy fix, so I'd file an issue. -Original Message- From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 22, 2007 7:04 AM To: Tapestry users Subject: Re: Ajax example in doco not working? Id isn't a formal parameter of Any - so providing it forces @Any to render tags. Without it there are no tags / markup rendered at all - thus no client side elements to find and update in an ajax request. On 8/19/07, Geoff Callender [EMAIL PROTECTED] wrote: Is the basic Ajax example in the doco missing something (http:// tapestry.apache.org/tapestry4.1/ajax/basics.html)? The example has this: a jwcid=@DirectLink listener=listener:setTime updateComponents=timeRefresh time/a div jwcid=[EMAIL PROTECTED] value=ognl:time renderTag=true/ which rendered as: divSun Aug 19 21:29:00 EST 2007/div and it wouldn't update the time. It seems updateComponents must reference an id, so I tried adding an id explicitly: div jwcid=[EMAIL PROTECTED] value=ognl:time renderTag=true id=time/ which rendered as: div id=timeSun Aug 19 21:29:00 EST 2007/div and it started working! I have to admit, I was expecting that @Insert would render an id without my help, taking the name time from jwcid=[EMAIL PROTECTED]. So, is the example wrong, or is @Insert misbehaving, or is my environment misbehaving? Geoff -- 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] - 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] Marking fields in error
Yeah, I know about styles, but not sure how to override an asset that comes with a component. If it was a named asset, like in T4, I would probably know what to do, but T5 uses a path... I am looking for a simple solution that could go into the book ;) Cheers, Alex -Original Message- From: Nick Westgate [mailto:[EMAIL PROTECTED] Sent: 22 August 2007 12:26 To: Tapestry users Subject: Re: [T5] Marking fields in error I'm sure, you can, though I haven't tried this yet. You could try just overriding that asset in your project. For colours you can override styles in your own CSS files. If you want more substantial changes, look into overriding the DefaultValidationDecorator. Search the source for: DefaultValidationDelegate Cheers, Nick. Kolesnikov, Alexander GNI wrote: Okay, so I am taking this back :) I was looking at the screenshots in the User Guide. But in this case, do I have an opportunity to override the existing marker? Thanks, Alexander -Original Message- From: Nick Westgate [mailto:[EMAIL PROTECTED] Sent: 22 August 2007 11:37 To: Tapestry users Subject: Re: [T5] Marking fields in error T5 _does_ mark a field with an error marker. field-error-marker.png Cheers, Nick. Kolesnikov, Alexander GNI wrote: I've got a friend who is color blind. I've shown to him the way how the fields in error are marked in T5 - just making everything red, without using any error markers - and this doesn't look convincing to him. So I suggest T5 developers adding some kind of error marker - two red asterisks or an icon - on the right side of a field in error. That would be helpful for many users. Thanks, Alexander - - CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown. This email transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright 2007 CIGNA == == == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown. This email transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright 2007 CIGNA == - 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] -- CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown. This email transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright 2007 CIGNA == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [T5] Marking fields in error
Thanks, Uli, will try this! -Original Message- From: Ulrich Stärk [mailto:[EMAIL PROTECTED] Sent: 22 August 2007 12:36 To: Tapestry users Subject: RE: [T5] Marking fields in error Right now it seems that the path for the marker image is hardcoded. But you could try to create a file org/apache/tapestry/field-error-marker.png in your classpath and store your own marker there. This should override the default marker. This is similar to http://wiki.apache.org/tapestry/Tapestry5HowToOverrideTheDefaultErrorMessageBanner. HTH, Uli On Mi, 22.08.2007, 12:42, Kolesnikov, Alexander GNI sagte: Okay, so I am taking this back :) I was looking at the screenshots in the User Guide. But in this case, do I have an opportunity to override the existing marker? Thanks, Alexander -Original Message- From: Nick Westgate [mailto:[EMAIL PROTECTED] Sent: 22 August 2007 11:37 To: Tapestry users Subject: Re: [T5] Marking fields in error T5 _does_ mark a field with an error marker. field-error-marker.png Cheers, Nick. Kolesnikov, Alexander GNI wrote: I've got a friend who is color blind. I've shown to him the way how the fields in error are marked in T5 - just making everything red, without using any error markers - and this doesn't look convincing to him. So I suggest T5 developers adding some kind of error marker - two red asterisks or an icon - on the right side of a field in error. That would be helpful for many users. Thanks, Alexander - - CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown. This email transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright 2007 CIGNA == == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown. This email transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright 2007 CIGNA ===- 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] -- CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown. This email transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright 2007 CIGNA == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Tiles?
If this help, try to follow my example above: create a class under src/main/java/org/example/myapp/components called Layout.java, for example. Now we put a css stylesheet and a title, just to illustrate: public class Layout { @Inject @Path(context:assets/css/layout.css) private Asset layoutCSS; private String title = Some Title; public Asset getLayoutCSS() { return layoutCSS; } public String getTitle() { return title; } } now, create a template under src/main/resources/org/example/myapp/components with the same name (i.e. Layout.html): html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; head title{title}/title link href=${layoutCSS} rel=stylesheet type=text/css/ /head body table width=100% height=100% border=0 tr td valign=top height=100% t:bodyPage content goes here./t:body /td /tr /table /body /html let the Start.html use this template as it's base adding this lines to it: t:layout xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; !-- put the rest of the page here -- /t:layout and you're done! very simple! :) 2007/8/22, Anton Gavazuk [EMAIL PROTECTED]: Hi Angelo, I had the same question and as I understood - you have to write your own custom component see http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html and now I try to implement this - if you are interested - we can communicate about the topic and create some kind of howto... 2007/8/22, Angelo Chen [EMAIL PROTECTED] : Hi, Is there a way to do something like Struts with Tiles in Tapestry 5? samples? Thanks. A.C. -- View this message in context: http://www.nabble.com/T5%3ATiles--tf4310807.html#a12272065 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Atenciosamente, Marcelo Lotif
Re: Tapestry 4.1.2 Javaassist and runtime errors
Hi Marcus Thanks for this, I will add it and wait... because this error is time delayed it may be a while before it triggers and I reply, but I will. Thanks again, Peter [EMAIL PROTECTED] wrote: Hi Peter can you try to set the property org.apache.tapestry.page-pool-evict-idle-page-minutes to -1? You can, for example, add the following to your application's hivemind.xml : contribution configuration-id=hivemind.ApplicationDefaults default symbol=org.apache.tapestry.page-pool-evict-idle-page-minutes value=-1 / /contribution Does this help? Marcus -Original Message- From: Peter Stavrinides [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 22, 2007 10:05 AM To: Tapestry users Subject: Re: Tapestry 4.1.2 Javaassist and runtime errors Hi Jessie, Thanks for your reply. I don't think this problem relates to OGNL... The thing is that these classes are pretty ordinary page classes with Strings and Integers, really nothing special, and besides it works great for a while, and then after a random period it gets confused? which tells me it's not OGNL related. The bug is very difficult to reproduce because it happens after a random period of normal activity. When it breaks though, all page classes seem to break. My guess is that the error occurs either after garbage collection or a servlet exception, and may relate to class reloading somehow. Stopping and starting the servlet corrects it... I'm very confused :'( Peter Jesse Kuhnert wrote: I think you are right - it probably did happen when upgrading from 4.1.1 - 4.1.2. I changed a few things wrt OGNL and this is probably something related. If you file a re-produceable bug report here http://jira.opensymphony.com/browse/OGNL I will look in to it. (re-produceable meaning that I have the ability to re-produce your error exactly by knowing the object types (exact) and values involved in whatever expressions aren't compiling. Haven't heard about classes disappearing before so not sure what that is. The Tapestry 4.1 demos all run on 4.1.2 / tomcat. On 8/21/07, Peter Stavrinides [EMAIL PROTECTED] wrote: Hi All, Can anyone help me to understand what's going on here... I run my servlet on Tomcat, it works great for a while, but then some classes seem to disappear, or at least they cant be found by Hivemind, and the log fills up with errors like this one: org.apache.hivemind.ApplicationRuntimeException: Unable to add method java.lang.Object get(ognl.OgnlContext, java.lang.Object) to class $ASTProperty_11488aa7b43: [source error] no such class: $RiskModel_61 Caused by: javassist.CannotCompileException: [source error] no such class: $RiskModel_61 What is javassist doing and why cant Hivemind find my classes any more? This error has appeared since upgrading to 4.1.2 from 4.1.1. Kind regards Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T4] compputing url relative to the context
Ulrich Stärk a écrit : Let Tapestry inject the infrastructure:contextPath object like @InjectObject(infrastructure:contextPath) public abstract String getContextPath(); Then write some computeUrl method similar to this one (just typed this in, no guarantee that this will work). public String computeUrl() { String locale = getLocale().getCountry().toLowerCase(); return getContextPath() + /Public/flags/ + locale + .gif; } Thank you Ulrich, This is the Java way, what is the Ognl way ? To use in Html and/or Jwc files. Cyrille Cheers, Uli On Mi, 22.08.2007, 01:53, #Cyrille37# sagte: Hello, I could not find how to compute a url ... It is for a component which give the user the possibility to change his locale by clicking on a image (country flags). Urls should be like : /theApp/Public/flags/fr.gif There is 2 dynamics parts : * the application context : /theApp * the available locale code : fr like : context/Public/flags/localeCode.gif I thought about asset name=xxx path=context: / but it is not possible because path attribute started by context: could not use ognl expression. Also thought about img jwcid=@Any src=ognl: page.context + '/xxx/' + currentLoopItem + '.gif' / but page.context does not exists. I really could not find how to compute the context part of urls. Have you got any idea please ? Thanks cyrille - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
organizing HTML templates into subdirectories
I have a sub directory called admin under WEB-INF .My servlet mapping is servlet-mapping servlet-namedentaprise/servlet-name url-pattern/app/url-pattern /servlet-mapping i have ListClient.html in admin directory.I am unable to get the page ListClient.where i have to specify my sub directory? any ideas? -- View this message in context: http://www.nabble.com/organizing-HTML-templates-into-subdirectories-tf4311520.html#a12274323 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: organizing HTML templates into subdirectories
The page name should be used as admin/ListClient and its class should be in whatever.admin subpackage. -Original Message- From: abhilash [mailto:[EMAIL PROTECTED] Sent: 22 August 2007 14:15 To: users@tapestry.apache.org Subject: organizing HTML templates into subdirectories I have a sub directory called admin under WEB-INF .My servlet mapping is servlet-mapping servlet-namedentaprise/servlet-name url-pattern/app/url-pattern /servlet-mapping i have ListClient.html in admin directory.I am unable to get the page ListClient.where i have to specify my sub directory? any ideas? -- View this message in context: http://www.nabble.com/organizing-HTML-templates-into-subdirectories-tf43 11520.html#a12274323 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown. This email transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright 2007 CIGNA == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Tiles?
Of course you are not at all limited to only one of these layout components. While you can only request one per page or component, the layout you request could itself use another layout. For lack of a better term, these used to be called Borders in Tapestry 4. You can also have these borders on Components, not just pages. This can be useful for wrapping a component in a box, for example. Borders are really simple to make, as you've seen from Marcelo. Now lets say you end up having lots of borders/layout components. If you want to put them into a directory under components/, you'll access them using a . between the directory name and the border component name. i.e. for components/layouts/border1.html you would use: t:layouts.border1 xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; On 8/22/07, Marcelo lotif [EMAIL PROTECTED] wrote: If this help, try to follow my example above: create a class under src/main/java/org/example/myapp/components called Layout.java, for example. Now we put a css stylesheet and a title, just to illustrate: public class Layout { @Inject @Path(context:assets/css/layout.css) private Asset layoutCSS; private String title = Some Title; public Asset getLayoutCSS() { return layoutCSS; } public String getTitle() { return title; } } now, create a template under src/main/resources/org/example/myapp/components with the same name (i.e. Layout.html): html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; head title{title}/title link href=${layoutCSS} rel=stylesheet type=text/css/ /head body table width=100% height=100% border=0 tr td valign=top height=100% t:bodyPage content goes here./t:body /td /tr /table /body /html let the Start.html use this template as it's base adding this lines to it: t:layout xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; !-- put the rest of the page here -- /t:layout and you're done! very simple! :) 2007/8/22, Anton Gavazuk [EMAIL PROTECTED]: Hi Angelo, I had the same question and as I understood - you have to write your own custom component see http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html and now I try to implement this - if you are interested - we can communicate about the topic and create some kind of howto... 2007/8/22, Angelo Chen [EMAIL PROTECTED] : Hi, Is there a way to do something like Struts with Tiles in Tapestry 5? samples? Thanks. A.C. -- View this message in context: http://www.nabble.com/T5%3ATiles--tf4310807.html#a12272065 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Atenciosamente, Marcelo Lotif - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Antwort: T5: trying out tutorial hi/lo game, but...
For the app to work I had to change this tag t:actionlink t:id=guess context=guess${guess}/t:actionlink the id should equal link -Original Message- From: Christian Koeberl [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 22, 2007 2:35 AM To: Tapestry users Subject: Antwort: T5: trying out tutorial hi/lo game, but... Angelo Chen [EMAIL PROTECTED] wrote: Hi, I'm learning by trying out the hi/lo game, everytime I clicked one of the number links, the onActionFromLink was not called, here is the template: It should be onActionFromGuess because the link's id is guess. -- Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T4] compputing url relative to the context
Well, rename computeUrl() to getYouNameIt() and access it using ognl:youNameIt from your template or page specification. Uli #Cyrille37# schrieb: Ulrich Stärk a écrit : Let Tapestry inject the infrastructure:contextPath object like @InjectObject(infrastructure:contextPath) public abstract String getContextPath(); Then write some computeUrl method similar to this one (just typed this in, no guarantee that this will work). public String computeUrl() { String locale = getLocale().getCountry().toLowerCase(); return getContextPath() + /Public/flags/ + locale + .gif; } Thank you Ulrich, This is the Java way, what is the Ognl way ? To use in Html and/or Jwc files. Cyrille Cheers, Uli On Mi, 22.08.2007, 01:53, #Cyrille37# sagte: Hello, I could not find how to compute a url ... It is for a component which give the user the possibility to change his locale by clicking on a image (country flags). Urls should be like : /theApp/Public/flags/fr.gif There is 2 dynamics parts : * the application context : /theApp * the available locale code : fr like : context/Public/flags/localeCode.gif I thought about asset name=xxx path=context: / but it is not possible because path attribute started by context: could not use ognl expression. Also thought about img jwcid=@Any src=ognl: page.context + '/xxx/' + currentLoopItem + '.gif' / but page.context does not exists. I really could not find how to compute the context part of urls. Have you got any idea please ? Thanks cyrille - 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: organizing HTML pages into subdirectories
On Wed, 22 Aug 2007 06:17:17 -0700 (PDT), abhilash wrote I have a sub directory called admin under WEB-INF .My servlet mapping is servlet-mapping servlet-namedentaprise/servlet- name url-pattern/app/url-pattern /servlet-mapping i have ListClient.html in admin directory.I am unable to get the page ListClient.where i have to specify my sub directory? any ideas? -- View this message in context: http://www.nabble.com/organizing-HTML- pages-into-subdirectories-tf4311520.html#a12274323 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] You can specify the location in the dentaprise.application file, like this: page name=ListClient specification-path=admin/ListClients.page/ Put the .page and .html file in the same directory. The dentaprise.application file should be in the WEB-INF directory. Hope this helps... Hans Drexler GeoTax en WOZ-Support b.v. e: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] BeanEditForm CSS suggestion
IIRC, there was an error in the error CSS that some of us ran into, with a margin being set at -20px instead of 20px. I overrode that style to fix the problem. I believe it is this: div.t-error li { list-style-type: disc; margin-left: 20px; } I agree CSS for layout and positioning is not the answer for all of us -- I've switched back and forth a few times already (with tables). I think the only decent answer is to not pick a side, and let there be an implementation for both. Is there room for a chapter on extending the BeanEditForm (thereby changing the markup that gets output, so at least you have a specific CSS tag for everything?) On 8/22/07, Kolesnikov, Alexander GNI [EMAIL PROTECTED] wrote: Thanks, guys, You see, if it was just for myself I would certainly do as you suggest. The problem is that I am writing a book on T5 and the idea is to keep the book as simple as possible. So far I have managed to do this, and I am already in chapter 6. What can be easier than BeanEditForm? Just insert a short line of code into the page template, and here you have a lot of stuff in one moment, including a fully blown validation! Do you want to change which properties are displayed and how they are edited? That's easy (two ways: changing the edited object or using BeanModel)... Do you want to change the look of the form? Just override the default CSS styles... Blah, blah.. Everything goes on easily. But finally we see a form with error messages going awry in major browsers (displayed across the left border of the component) and submit button that cannot be positioned without creating a custom component or doing some tricks... As a result, there is an impression that BeanEditForm is good only for quick prototyping where you do not care about the appearance. Although it would be so easy to make it both powerful AND looking nice. I.m.o. the problem of BeanEditForm is that its layout was created by a CSS purist who cannot bear using tables even when they make things tremendously easier. If a table was used as a skeleton, the error messages would never go across the border, whichever browser you use. And if a row or, well, DIV for the submit button had a special style, the component as a whole would become much more useful. Tapestry 5 is in active development, and I am simply trying to provide some feedback to its developers. I would say that making things easier and more reliable would assist in wider acceptance of the framework. Cheers, Alexander -Original Message- From: Chris Lewis [mailto:[EMAIL PROTECTED] Sent: 20 August 2007 17:19 To: Tapestry users Subject: Re: [T5] BeanEditForm CSS suggestion You can extend the BeadEditForm instead of copying it can't you? That would be a pain... Daniel Jue wrote: In general, Tapestry's defaults are good -- they get you up and running. But for people who want to add more pieces of flair to the components, we'll probably end up needing to copy the component and make changes as needed. For example, rewriting the Grid component's template to make changes to the DOM that gets output. Or adding more CSS tags to the elements of the bean form, so we can make more specific CSS changes if we want to. As for the colon. it's plausible that you may want a question mark after a field label, or perhaps in some locales you may not want a prompt character at all. For an immediate fix, without affecting your other submit buttons, maybe you can wrap your bean edit form inside a div, and use that div's class as a way to help target the submit button. On 8/20/07, Kolesnikov, Alexander GNI [EMAIL PROTECTED] wrote: Thank you, Chris, CSS2 has a lot of wonderful stuff in it, but the problem is that it doesn't work consistently in different browsers. For example, your solution works in Firefox, but not in IE6, the most popular Web browser these days. On the other hand, having a different style for the button area would work in every browser, and it would allow someone to use a different background for the button area too - why not? Another style used for BeanEditForm I am not happy with is this: FORM.t-beaneditor LABEL:after { content: :; } Looks like a clever use of CSS2, but again, this doesn't work in both IE6 and IE7. Also, in some other browsers (don't remember now, probably Opera), the colon seems to be lower than the label, not properly aligned. And, if you think about it, why not to have this colon hard-coded? What else one would wish to place after the label instead of a colon? A semicolon? :/ Alexander -Original Message- From: Chris Lewis [mailto:[EMAIL PROTECTED] Sent: 17 August 2007 18:07 To: Tapestry users Subject: Re: [T5] BeanEditForm CSS suggestion Alexander, You can use CSS2 attribute selectors to match only submit input types. Try this: div.t-beaneditor-row
Re: Recursion of components
Hello Todd, Todd Orr wrote: I'm also trying to perform this type of recursive structure. I don't agree that this makes anything simpler. Recursion is a powerful and concise tool for these situations. I will say that it is often abused, but this is a perfect use case. A recursive solution to this problem is far simpler and maybe more correct than this iterative approach. I read again my post and saw that I didn't express myself properly (put it on my low level in English). I should have write :The non-support of recursive structure seems to bring a lots of simplification with it _for Tapestry internal, replication and performance problematics_. It seems to be a design choice, and as I'm not a Tapestry developer, I can't explain exactly why it was done, even if replication/pool of pages seems to be around. I came from functional programming projects where this kind of structure is quite common, so personaly, I find that it's a real lake. First off, the proposed solution requires complicated logic. Fine, it's not rocket science, but the recursive alternative (if there was one in tap) is far easier to read and understand. From a tech-management point of view the simplicity of the code is a major factor in its long term maintainability as well as its bugginess. Secondly, the proposed solution requires adding raw HTML output to code. This may be a more esoteric and arguable point, but Tapestry excels in having a clear and easy to use separation between the view/presentation and the logic components of the application's construction. Again, with regards to maintainability, it is twice as hard to maintain code if the concerns are spread throughout conceptually separate pieces of code. If you look at the source code for for component, you will see that it is far from being trivial. It also deals with raw output, and different case are need if the loop is in a form or not... But the use of for component is quite simple. You could design a Tree component that handle this stuff and just use it elsewhere in a simple way. with a clear separation between template using this component and the component. It's what I did in a tree component : http://svn.forge.objectweb.org/cgi-bin/viewcvs.cgi/interldap/interldap-wui-t5/trunk/src/main/java/org/interldap/wui/tapestry/components/Tree.java?view=markuprev=97 Third, this approach makes it impossible for any node in the tree to contain any non-trivial nested components. I see that you can create links...wow. Kinda limiting if you ask me. This limits the usefulness and extendability of the code. If more complex functionality is required (lets say by a major client or some other critical business need) within this pseudo-recursive implementation it might force the developers to completely switch out frameworks to one more suitable for the job. This is a huge risk from a business perspective. Ok, so here, the problem is that the tree component is not well designed (or not as much generic as it should be). Perhaps a real tree component in standard lib would be good. But it has little to do with the lack of recursion structure, that is painful. A tree structure would be (at best) a bypass for this lack. -- Francois Armand Etudes Développements J2EE LINAGORA SA - http://www.linagora.com Tél.: +33 (0)1 58 18 68 28 --- InterLDAP - http://interldap.org FederID - http://www.federid.org/ Open Source identities management and federation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [T5] BeanEditForm CSS suggestion
Believe it or not, but I managed to have those error messages looking properly for a screenshot - in an older Netscape browser! :D I hope the guys will fix the error before the book will be printed. Thanks for finding it! Is there room for a chapter on extending the BeanEditForm Unfortunately not. The publisher requires the book to be 250 pages thick out of their technological/commercial considerations, at the very most 300. I can squeeze in to this the very fundamentals only. On the other hand, if this book will attract more active Tapestry developers, the publisher might want to create a more in-depth book one day. BeanEditForm took a half of chapter 5, leaving another half to Grid. Cheers, Alex -Original Message- From: Daniel Jue [mailto:[EMAIL PROTECTED] Sent: 22 August 2007 14:34 To: Tapestry users Subject: Re: [T5] BeanEditForm CSS suggestion IIRC, there was an error in the error CSS that some of us ran into, with a margin being set at -20px instead of 20px. I overrode that style to fix the problem. I believe it is this: div.t-error li { list-style-type: disc; margin-left: 20px; } I agree CSS for layout and positioning is not the answer for all of us -- I've switched back and forth a few times already (with tables). I think the only decent answer is to not pick a side, and let there be an implementation for both. Is there room for a chapter on extending the BeanEditForm (thereby changing the markup that gets output, so at least you have a specific CSS tag for everything?) On 8/22/07, Kolesnikov, Alexander GNI [EMAIL PROTECTED] wrote: Thanks, guys, You see, if it was just for myself I would certainly do as you suggest. The problem is that I am writing a book on T5 and the idea is to keep the book as simple as possible. So far I have managed to do this, and I am already in chapter 6. What can be easier than BeanEditForm? Just insert a short line of code into the page template, and here you have a lot of stuff in one moment, including a fully blown validation! Do you want to change which properties are displayed and how they are edited? That's easy (two ways: changing the edited object or using BeanModel)... Do you want to change the look of the form? Just override the default CSS styles... Blah, blah.. Everything goes on easily. But finally we see a form with error messages going awry in major browsers (displayed across the left border of the component) and submit button that cannot be positioned without creating a custom component or doing some tricks... As a result, there is an impression that BeanEditForm is good only for quick prototyping where you do not care about the appearance. Although it would be so easy to make it both powerful AND looking nice. I.m.o. the problem of BeanEditForm is that its layout was created by a CSS purist who cannot bear using tables even when they make things tremendously easier. If a table was used as a skeleton, the error messages would never go across the border, whichever browser you use. And if a row or, well, DIV for the submit button had a special style, the component as a whole would become much more useful. Tapestry 5 is in active development, and I am simply trying to provide some feedback to its developers. I would say that making things easier and more reliable would assist in wider acceptance of the framework. Cheers, Alexander -Original Message- From: Chris Lewis [mailto:[EMAIL PROTECTED] Sent: 20 August 2007 17:19 To: Tapestry users Subject: Re: [T5] BeanEditForm CSS suggestion You can extend the BeadEditForm instead of copying it can't you? That would be a pain... Daniel Jue wrote: In general, Tapestry's defaults are good -- they get you up and running. But for people who want to add more pieces of flair to the components, we'll probably end up needing to copy the component and make changes as needed. For example, rewriting the Grid component's template to make changes to the DOM that gets output. Or adding more CSS tags to the elements of the bean form, so we can make more specific CSS changes if we want to. As for the colon. it's plausible that you may want a question mark after a field label, or perhaps in some locales you may not want a prompt character at all. For an immediate fix, without affecting your other submit buttons, maybe you can wrap your bean edit form inside a div, and use that div's class as a way to help target the submit button. On 8/20/07, Kolesnikov, Alexander GNI [EMAIL PROTECTED] wrote: Thank you, Chris, CSS2 has a lot of wonderful stuff in it, but the problem is that it doesn't work consistently in different browsers. For example, your solution works in Firefox, but not in IE6, the most popular Web browser these days. On the other hand, having a different style for the button area would work in every browser, and it would
Re: T5:Simple form submit
Thanks nick, it's just what I need, one more question: t:label for =userName / input t:type=TextField t:id = userName t:validate=required size=30 / Nick Westgate wrote: There is a login example right here: http://tapestry.apache.org/tapestry5/tapestry-core/guide/validation.html Cheers, Nick. Angelo Chen wrote: Hi, I have finished the tutorial in the T5 site, it uses BeanFormEdit, can somebody show me how to do the basic form edit/submit? like a textField for username, a button to submit, then how the java side capture the two fields? thanks. A.C. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3ASimple-form-submit-tf4310884.html#a12275209 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:Simple form submit
And what exactly is the question? Angelo Chen schrieb: Thanks nick, it's just what I need, one more question: t:label for =userName / input t:type=TextField t:id = userName t:validate=required size=30 / Nick Westgate wrote: There is a login example right here: http://tapestry.apache.org/tapestry5/tapestry-core/guide/validation.html Cheers, Nick. Angelo Chen wrote: Hi, I have finished the tutorial in the T5 site, it uses BeanFormEdit, can somebody show me how to do the basic form edit/submit? like a textField for username, a button to submit, then how the java side capture the two fields? thanks. A.C. - 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:Simple form submit
oh, sorry, t:label for =userName / this generates a label User Name, where is this come from, T5 just breaks the words? if I want to put some other text into the label, how? also trying out that login example: http://tapestry.apache.org/tapestry5/tapestry-core/guide/validation.html @Component private Form _form; this will generat an error during starting: [ERROR] Login Embedded component(s) form are defined within component class org.example.hilo.pages.Login, but are not present in the component template but it still works, why? Ulrich Stärk wrote: And what exactly is the question? Angelo Chen schrieb: Thanks nick, it's just what I need, one more question: t:label for =userName / input t:type=TextField t:id = userName t:validate=required size=30 / Nick Westgate wrote: There is a login example right here: http://tapestry.apache.org/tapestry5/tapestry-core/guide/validation.html Cheers, Nick. Angelo Chen wrote: Hi, I have finished the tutorial in the T5 site, it uses BeanFormEdit, can somebody show me how to do the basic form edit/submit? like a textField for username, a button to submit, then how the java side capture the two fields? thanks. A.C. - 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] -- View this message in context: http://www.nabble.com/T5%3ASimple-form-submit-tf4310884.html#a12275925 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Edit List in BeanEditForm
Hello, I would like to know if there is a (rather simple) way to add support for list edition for bean used in BeanEditForm. I would like to be able to add/remove element from list, and edit them. For example, my UserBean has a phonenumber property, witch is a ListString. I would like that the bean edit form present something like : --- [phonenumber1] _remove_ [phonenumber2] _remove_ _Add_a_PhoneNumber_ --- Or at least the input field for each element of the list. I do not really understand how works conduit, and I can't find documentation on them... Any help would be appreciated. -- Francois Armand Etudes Développements J2EE LINAGORA SA - http://www.linagora.com Tél.: +33 (0)1 58 18 68 28 --- InterLDAP - http://interldap.org FederID - http://www.federid.org/ Open Source identities management and federation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: abstract or no
Hi Danie, Thanks for suggeseting T5, after one day learning, somehow I know how to create a basic T5 app, cool framkework. was reading the book Enjoying Web development with Tapestry before, after several chapters, I found myself enjoying nothing, with all those diagrams, xml specs, etc.. T5 is really something enjoyable, you almost like writing a desktop app, if ajax is added, that will be better than Google's GWT. A.C. Daniel Jue wrote: If you can wait for AJAX functionality (late 2007?) , I would say go with Tapestry 5. If you need AJAX immediately, the latest Tapestry 4 is best. Tapestry 5 is the next generation Tapestry, and the T4 code is not directly compatible. That said, your T4 code isn't completely useless either. T5 is still very component based. I've only worked with Tapestry 4 and 5, and I would say that Tapestry 5 is easier to learn, although for many people it's been a challenge to get started initially (mostly due to quickstart directions that weren't updated, regarding Maven). Also some T5 quickstarts included a few lines of code that needed to be changed or removed in order for the code to work. Don't be discouraged if it doesn't all come together at once -- people who have it running seem to love it, even though it is not fully completed. Maven's a great tool, and after you learn the basics I think newcomers will like it. There is a free ebook on the web that will teach you more that you'll need to know about Maven. In Tapestry 5, almost everything you'll need to write is a non abstract class. The directory structure of your web application is much better defined, IMHO. One of the best things is that there are no more xml files for your pages. For me it made things much simpler. I'm not a Tapestry expert by any means, and I sometimes find myself wanting to do things the hard way. Luckily there are a lot of nice people on this list who have politely corrected me, and shown me the better way. In addition there is a wiki page for T5 that is actively updated. I'm only a junior developer, so I try to add simple things that would help out people like myself. But others add more advanced how-to's. You might want to take a look, since it also links to sample code included in Tapestry. From there you can get a feel of how it works. http://wiki.apache.org/tapestry/Tapestry5HowTos On 8/20/07, Angelo Chen [EMAIL PROTECTED] wrote: Hi Daniel, Thanks for the reply, I'm learning Tapestry 4, from those samples I saw, it's ok to use either abtract or not as page class, so which one is better? maybe non abstract class to be compatible with Tapestry 5? I'm just evaluating frameworks for a coming project, is it advisable to use Tapestry 5 instead of 4? Thanks. A.C. Daniel Jue wrote: Hi Tapestry 4 relied more on abstract classes. In Tapestry 5, you are usually writing concrete classes -- tapestry does it's magic on all the classes under /pages. You can still have an abstract class to base your pages on, but that class should probably go in /base instead of /pages, since it wont have a page template of it's own. I believe this is covered on the Tapestry 5 main website. On 8/20/07, Angelo Chen [EMAIL PROTECTED] wrote: -- View this message in context: http://www.nabble.com/abstract-or-no-tf4298749.html#a12246721 Sent from the Tapestry - User mailing list archive at Nabble.com. - 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] -- View this message in context: http://www.nabble.com/abstract-or-no-tf4298749.html#a12276044 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5:Maven or not?
Hi, is it a must to use maven for T5? I use it to create a project then import to Intellij as a native project, it works very well. A.C. -- View this message in context: http://www.nabble.com/T5%3AMaven-or-not--tf4312105.html#a12276382 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5:Login and session
Hi, what is the correct way to manage sessions in T5? let's say, user has to login before it can go to other pages, how other pages check if a request is from a logined user or not? Thanks. A.C. -- View this message in context: http://www.nabble.com/T5%3ALogin-and-session-tf4312177.html#a12276631 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: [T4] compputing url relative to the context
Ulrich Stärk a écrit : Well, rename computeUrl() to getYouNameIt() and access it using ognl:youNameIt from your template or page specification. I compute the url in the html in a for loop. So the stuff I miss is how to access infrastructure:contextPath from ognl. I did this ognl:page.engine.infrastructure.contextPath+'/Public/flags/'+localeItem.language+'.gif' and it's working ! Great. cyrille Uli #Cyrille37# schrieb: Ulrich Stärk a écrit : Let Tapestry inject the infrastructure:contextPath object like @InjectObject(infrastructure:contextPath) public abstract String getContextPath(); Then write some computeUrl method similar to this one (just typed this in, no guarantee that this will work). public String computeUrl() { String locale = getLocale().getCountry().toLowerCase(); return getContextPath() + /Public/flags/ + locale + .gif; } Thank you Ulrich, This is the Java way, what is the Ognl way ? To use in Html and/or Jwc files. Cyrille Cheers, Uli On Mi, 22.08.2007, 01:53, #Cyrille37# sagte: Hello, I could not find how to compute a url ... It is for a component which give the user the possibility to change his locale by clicking on a image (country flags). Urls should be like : /theApp/Public/flags/fr.gif There is 2 dynamics parts : * the application context : /theApp * the available locale code : fr like : context/Public/flags/localeCode.gif I thought about asset name=xxx path=context: / but it is not possible because path attribute started by context: could not use ognl expression. Also thought about img jwcid=@Any src=ognl: page.context + '/xxx/' + currentLoopItem + '.gif' / but page.context does not exists. I really could not find how to compute the context part of urls. Have you got any idea please ? Thanks cyrille - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Maven or not?
No, it is not required. It sure felt like it was required back when everyone was using Tapestry snapshots--but that was only to keep up with all the changes. However, the directory structure that the Tapestry Achetypes setup are pretty helpful. On 8/22/07, Angelo Chen [EMAIL PROTECTED] wrote: Hi, is it a must to use maven for T5? I use it to create a project then import to Intellij as a native project, it works very well. A.C. -- View this message in context: http://www.nabble.com/T5%3AMaven-or-not--tf4312105.html#a12276382 Sent from the Tapestry - User mailing list archive at Nabble.com. - 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:Login and session
Please check the Tapestry website and Wiki. Specifically the T5 section, and more specifically the Tapestry-Core section. http://tapestry.apache.org/tapestry5/tapestry-core/guide/appstate.html You probably won't need the Configuring ASOs part right now. On 8/22/07, Angelo Chen [EMAIL PROTECTED] wrote: Hi, what is the correct way to manage sessions in T5? let's say, user has to login before it can go to other pages, how other pages check if a request is from a logined user or not? Thanks. A.C. -- View this message in context: http://www.nabble.com/T5%3ALogin-and-session-tf4312177.html#a12276631 Sent from the Tapestry - User mailing list archive at Nabble.com. - 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:Login and session
Application State is for it. see http://tapestry.apache.org/tapestry5/tapestry-core/guide/appstate.html I have written some examples like this: There are follwing page classes to be protected. UserEdit.java ShopSetting.java if the session is null , above these pages won't be opened. firstly I let all them extends AdminRootPage.java. the class is like this: public class AdminRootPage { @ApplicationState private SessionData _session; private boolean _sessionExists; String onActivate() { if(!_sessionExists){ return Login; } return null; } } The session data is a value object which you can put any fields value in it. Usually the SessionData cotain the current user information whick like this public class SessionData { private String username ; public String getUsername() { return username; } public void setUsername(String name) { this.username = name; } When you visit http://./useredit , the adminRootPage.onActive() will check the sessionData is null. If it's null then go to page Login. the Login.java may be like this public class Login { . // the method will be execute when a submit button named 'login' on Login.html void onSelectedFromLogin() { User user = _service.checkValidUser(username,password); // init session if it's a valid user. if (user==null) { loginFrm.recordError(_passwordField, Invalid user name or password.); } _session.setUsername(username); _session.setUser(user); this.nextPage = PageConstant.SHOP_OVERVIEW; } } After onSelectedFromLogin() is executed, the session will be initialized a appropriated value 2007/8/22, Angelo Chen [EMAIL PROTECTED]: Hi, what is the correct way to manage sessions in T5? let's say, user has to login before it can go to other pages, how other pages check if a request is from a logined user or not? Thanks. A.C. -- View this message in context: http://www.nabble.com/T5%3ALogin-and-session-tf4312177.html#a12276631 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: [T4] compputing url relative to the context
If localeItem is the value of your for component, you can put all this into your page class and thus simplify your template. The for component will take care, that getLocaleItem() in your page class will return the actual LocaleItem. getComputeUrl() could be public String getComputeUrl() { String locale = getLocaleItem().getLanguage(); return getContextPath() + /Public/flags/ + locale + .gif; } and then simplify your expression to ognl:computeUrl. It's a question of style but I find it more readable that way. Uli #Cyrille37# schrieb: Ulrich Stärk a écrit : Well, rename computeUrl() to getYouNameIt() and access it using ognl:youNameIt from your template or page specification. I compute the url in the html in a for loop. So the stuff I miss is how to access infrastructure:contextPath from ognl. I did this ognl:page.engine.infrastructure.contextPath+'/Public/flags/'+localeItem.language+'.gif' and it's working ! Great. cyrille Uli #Cyrille37# schrieb: Ulrich Stärk a écrit : Let Tapestry inject the infrastructure:contextPath object like @InjectObject(infrastructure:contextPath) public abstract String getContextPath(); Then write some computeUrl method similar to this one (just typed this in, no guarantee that this will work). public String computeUrl() { String locale = getLocale().getCountry().toLowerCase(); return getContextPath() + /Public/flags/ + locale + .gif; } Thank you Ulrich, This is the Java way, what is the Ognl way ? To use in Html and/or Jwc files. Cyrille Cheers, Uli On Mi, 22.08.2007, 01:53, #Cyrille37# sagte: Hello, I could not find how to compute a url ... It is for a component which give the user the possibility to change his locale by clicking on a image (country flags). Urls should be like : /theApp/Public/flags/fr.gif There is 2 dynamics parts : * the application context : /theApp * the available locale code : fr like : context/Public/flags/localeCode.gif I thought about asset name=xxx path=context: / but it is not possible because path attribute started by context: could not use ognl expression. Also thought about img jwcid=@Any src=ognl: page.context + '/xxx/' + currentLoopItem + '.gif' / but page.context does not exists. I really could not find how to compute the context part of urls. Have you got any idea please ? Thanks cyrille - 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:Simple form submit
Tapestry generates the content of the label as follows: the first character of the id attribute of your input component is converted to upper case and a space is inserted before every upper case character. If you want to name the label differently just give the label attribute of your input component some value (see AbstractField in http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html). Uli Angelo Chen schrieb: oh, sorry, t:label for =userName / this generates a label User Name, where is this come from, T5 just breaks the words? if I want to put some other text into the label, how? also trying out that login example: http://tapestry.apache.org/tapestry5/tapestry-core/guide/validation.html @Component private Form _form; this will generat an error during starting: [ERROR] Login Embedded component(s) form are defined within component class org.example.hilo.pages.Login, but are not present in the component template but it still works, why? Ulrich Stärk wrote: And what exactly is the question? Angelo Chen schrieb: Thanks nick, it's just what I need, one more question: t:label for =userName / input t:type=TextField t:id = userName t:validate=required size=30 / Nick Westgate wrote: There is a login example right here: http://tapestry.apache.org/tapestry5/tapestry-core/guide/validation.html Cheers, Nick. Angelo Chen wrote: Hi, I have finished the tutorial in the T5 site, it uses BeanFormEdit, can somebody show me how to do the basic form edit/submit? like a textField for username, a button to submit, then how the java side capture the two fields? thanks. A.C. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 Type to ValueEncoderFactory
On 2007-08-16, at 05:10, Nick Westgate wrote: Indeed. Hence the JIRA. Howard has mentioned the possibility of merging the two type coercion systems. That Would be great! What I currently do to seamlessly use Entities across the framework (activation / deactivation, parameters, RadioGroup / Radio: - I have a service public interface EntityCoercionConfigurator { void configureEntityCoercions(ConfigurationCoercionTuple?, ? configuration); void configureEntityValueEncoders(MappedConfigurationClass, ValueEncoderFactory configuration); Which discovers all registered Entities (JPA, Hibernate). It is then used in public void contributeTypeCoercer( @Inject EntityCoercionConfigurator configurator, ConfigurationCoercionTuple configuration) { configurator.configureEntityCoercions(configuration); } This gives me the String - Entity and Entity - String coercions I need. So far so good! What I don't like is that I also have to public void contributeValueEncoderSource( @Inject EntityCoercionConfigurator configurator, MappedConfigurationClass, ValueEncoderFactory configuration) { configurator.configureEntityValueEncoders(configuration); } Which currently instantates a ValueEncoderFactory that produces just one ValueEncoder that routes all toClient() and toValue() calls to the type coercer. This is not that bad but I'd like to leave out the second step. :) P.S. It might be good that such code finds it's place in tapestry- hibernate. I'd be glad to contribute it if there is interest for that. Cheers, Ognen -- Ognen Ivanovski | [EMAIL PROTECTED] phone +389 -2- 30 64 532 | fax +389 -2- 30 79 495 Netcetera | 1000 Skopje | Macedonia | http://netcetera.com.mk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T4] compputing url relative to the context
Ulrich Stärk a écrit : If localeItem is the value of your for component, you can put all this into your page class and thus simplify your template. The for component will take care, that getLocaleItem() in your page class will return the actual LocaleItem. getComputeUrl() could be public String getComputeUrl() { String locale = getLocaleItem().getLanguage(); return getContextPath() + /Public/flags/ + locale + .gif; } and then simplify your expression to ognl:computeUrl. It's a question of style but I find it more readable that way. Thanks for your time and this nice proposition. I'll use your way. Cheers, cyrille Uli #Cyrille37# schrieb: Ulrich Stärk a écrit : Well, rename computeUrl() to getYouNameIt() and access it using ognl:youNameIt from your template or page specification. I compute the url in the html in a for loop. So the stuff I miss is how to access infrastructure:contextPath from ognl. I did this ognl:page.engine.infrastructure.contextPath+'/Public/flags/'+localeItem.language+'.gif' and it's working ! Great. cyrille Uli #Cyrille37# schrieb: Ulrich Stärk a écrit : Let Tapestry inject the infrastructure:contextPath object like @InjectObject(infrastructure:contextPath) public abstract String getContextPath(); Then write some computeUrl method similar to this one (just typed this in, no guarantee that this will work). public String computeUrl() { String locale = getLocale().getCountry().toLowerCase(); return getContextPath() + /Public/flags/ + locale + .gif; } Thank you Ulrich, This is the Java way, what is the Ognl way ? To use in Html and/or Jwc files. Cyrille Cheers, Uli On Mi, 22.08.2007, 01:53, #Cyrille37# sagte: Hello, I could not find how to compute a url ... It is for a component which give the user the possibility to change his locale by clicking on a image (country flags). Urls should be like : /theApp/Public/flags/fr.gif There is 2 dynamics parts : * the application context : /theApp * the available locale code : fr like : context/Public/flags/localeCode.gif I thought about asset name=xxx path=context: / but it is not possible because path attribute started by context: could not use ognl expression. Also thought about img jwcid=@Any src=ognl: page.context + '/xxx/' + currentLoopItem + '.gif' / but page.context does not exists. I really could not find how to compute the context part of urls. Have you got any idea please ? Thanks cyrille - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Simple form submit
Or preferably see the actual TextField component docs on that page. The label used in the TextField is used for validation errors as well as for the Label component, so it's only defined in one place. (= Good) As for the error, it's because no id is defined for the form. I can't test the code right now, but the error might go away if you change to this: @Component(id = form) private Form _form; Cheers, Nick. Ulrich Stärk wrote: Tapestry generates the content of the label as follows: the first character of the id attribute of your input component is converted to upper case and a space is inserted before every upper case character. If you want to name the label differently just give the label attribute of your input component some value (see AbstractField in http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html). Uli Angelo Chen schrieb: oh, sorry, t:label for =userName / this generates a label User Name, where is this come from, T5 just breaks the words? if I want to put some other text into the label, how? also trying out that login example: http://tapestry.apache.org/tapestry5/tapestry-core/guide/validation.html @Component private Form _form; this will generat an error during starting: [ERROR] Login Embedded component(s) form are defined within component class org.example.hilo.pages.Login, but are not present in the component template but it still works, why? Ulrich Stärk wrote: And what exactly is the question? Angelo Chen schrieb: Thanks nick, it's just what I need, one more question: t:label for =userName / input t:type=TextField t:id = userName t:validate=required size=30 / Nick Westgate wrote: There is a login example right here: http://tapestry.apache.org/tapestry5/tapestry-core/guide/validation.html Cheers, Nick. Angelo Chen wrote: Hi, I have finished the tutorial in the T5 site, it uses BeanFormEdit, can somebody show me how to do the basic form edit/submit? like a textField for username, a button to submit, then how the java side capture the two fields? thanks. A.C. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3ASimple-form-submit-tf4310884.html#a12277378 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: Grid sample
http://wiki.apache.org/tapestry/Tapestry5CheckOutTheSourceCode the tapestry wiki is a good place to find those simple things http://wiki.apache.org/tapestry/Tapestry5HowTos 2007/8/22, Angelo Chen [EMAIL PROTECTED]: Hi, Is there a simple grid sample? thanks. A.C. -- View this message in context: http://www.nabble.com/T5%3A-Grid-sample-tf4312370.html#a12277308 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Atenciosamente, Marcelo Lotif
Re: T5:Maven or not?
On 8/22/07, Daniel Jue [EMAIL PROTECTED] wrote: No, it is not required. It sure felt like it was required back when everyone was using Tapestry snapshots--but that was only to keep up with all the changes. However, the directory structure that the Tapestry Achetypes setup are pretty helpful. And you'll get a lot of help when needing more dependencies for your project, or deploying or your project or ... :-) -- regards, Robin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Maven or not?
Not in my experience - Maven caused T5 to behave strangely when used with jetty:run The moment I stopped using Maven and just run jetty directly and point it to target directory, everything became nice and smooth. I like Maven's idea but it just does not work reliably for me. --- Robin Helgelin [EMAIL PROTECTED] wrote: On 8/22/07, Daniel Jue [EMAIL PROTECTED] wrote: No, it is not required. It sure felt like it was required back when everyone was using Tapestry snapshots--but that was only to keep up with all the changes. However, the directory structure that the Tapestry Achetypes setup are pretty helpful. And you'll get a lot of help when needing more dependencies for your project, or deploying or your project or ... :-) -- regards, Robin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Konstantin Ignatyev PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2,700 tons of CFCs to the stratosphere, and increase their population by 263,000 Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools. New York: State University of New York Press, 1997: (4) (5) (p.206) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Maven or not?
On 8/22/07, Konstantin Ignatyev [EMAIL PROTECTED] wrote: Not in my experience - Maven caused T5 to behave strangely when used with jetty:run Define stangely? I never had any problems with jetty:run. -- regards, Robin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with tapestry-spring while upgrading from 4.1.2-SNAPSHOT to 4.1.3-SNAPSHOT
This problem still seems to exist in 4.1.3-SNAPSHOT. I'm assuming you haven't had time to look at it yet? Matt Jessek wrote: Hmmmsounds like the latter. Will check it out tonight. On 8/15/07, mraible [EMAIL PROTECTED] wrote: I'm getting this same error when upgrading from Tapestry 4.0.2 to 4.1.3-SNAPSHOT. It sounds like there may need to be a new release of Tapestry Spring that's compiled against 4.1.3? Or maybe 4.1.3 needs to change something so its backwards compatible? Matt Ovidiu Hurducas-2 wrote: Hi! I'm building an application that uses Tapestry 4.1.2, Spring 2.0.6(integrated with tapestry-spring 1.0.0) and Hibernate 3.2.1, Tomcat 6.0.14, jdk1.6. All went well before until recently when because of a bug in the InlineEditBox component (is about the listener problem) I've been forced to upgrade from 4.1.2-SNAPSHOT to 4.1.3-SNAPSHOT. Now the application won't even load the first page or any other page. I've been keeping the Hibernate session open for lazy loading by using the OpenSessionInViewFilter. My Hibernate config in web.xml looks like: context-param param-namecontextConfigLocation/param-name param-value /WEB-INF/applicationContext-dao.xml,/WEB-INF/applicationContext- service.xml,/WEB-INF/applicationContext-jdbc.xml /param-value /context-param listener listener-class org.springframework.web.context.ContextLoaderListener /listener-class /listener !-- Spring open session hibernate config -- filter filter-namehibernateFilter/filter-name filter-class org.springframework.orm.hibernate3.support.OpenSessionInViewFilter /filter-class /filter filter-mapping filter-namehibernateFilter/filter-name url-pattern*.html/url-pattern /filter-mapping filter-mapping filter-namehibernateFilter/filter-name url-pattern/g/url-pattern /filter-mapping The in the server error page the message look like: javax.servlet.ServletException: Servlet execution threw an exception org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) *root cause* java.lang.AbstractMethodError: com.javaforge.tapestry.spring.SpringBeanInjectionWorker.performEnhancement(Lorg/apache/tapestry/enhance/EnhancementOperation;Lorg/apache/tapestry/spec/InjectSpecification;Lorg/apache/tapestry/spec/IComponentSpecification;)V $InjectEnhancementWorker_1146ad9bd87.performEnhancement($InjectEnhancementWorker_1146ad9bd87.java) $InjectEnhancementWorker_1146ad9bd86.performEnhancement($InjectEnhancementWorker_1146ad9bd86.java) org.apache.tapestry.enhance.DispatchToInjectWorker.invokeWorker(DispatchToInjectWorker.java:61) org.apache.tapestry.enhance.DispatchToInjectWorker.performEnhancement(DispatchToInjectWorker.java:45) $EnhancementWorker_1146ad9bd54.performEnhancement($EnhancementWorker_1146ad9bd54.java) $EnhancementWorker_1146ad9bd6c.performEnhancement($EnhancementWorker_1146ad9bd6c.java) $EnhancementWorker_1146ad9bd3e.performEnhancement($EnhancementWorker_1146ad9bd3e.java) org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getComponentConstructor(ComponentConstructorFactoryImpl.java:103) $ComponentConstructorFactory_1146ad9bd25.getComponentConstructor($ComponentConstructorFactory_1146ad9bd25.java) org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java:556) org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.java:496) $IPageLoader_1146ad9bd1f.createImplicitComponent($IPageLoader_1146ad9bd1f.java) $IPageLoader_1146ad9bd20.createImplicitComponent($IPageLoader_1146ad9bd20.java) org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplicitComponent(ComponentTemplateLoaderLogic.java:203) org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(ComponentTemplateLoaderLogic.java:158) org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(ComponentTemplateLoaderLogic.java:98) org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(ComponentTemplateLoaderLogic.java:75) org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(ComponentTemplateLoaderImpl.java:60) $ComponentTemplateLoader_1146ad9bd29.loadTemplate($ComponentTemplateLoader_1146ad9bd29.java) org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.java:673) org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:92) org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:122) $Header_4.finishLoad($Header_4.java) ... In the server log I got this message:
Re: T5:Maven or not?
Sometimes it will pick-up changes in the html templates and page classes and sometimes not. When I started using jetty directly it would always detect changes so T5 dynamic class loading worked as it supposed to work. --- Robin Helgelin [EMAIL PROTECTED] wrote: On 8/22/07, Konstantin Ignatyev [EMAIL PROTECTED] wrote: Not in my experience - Maven caused T5 to behave strangely when used with jetty:run Define stangely? I never had any problems with jetty:run. -- regards, Robin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Konstantin Ignatyev PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2,700 tons of CFCs to the stratosphere, and increase their population by 263,000 Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools. New York: State University of New York Press, 1997: (4) (5) (p.206) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Maven or not?
On 8/22/07, Konstantin Ignatyev [EMAIL PROTECTED] wrote: Sometimes it will pick-up changes in the html templates and page classes and sometimes not. When I started using jetty directly it would always detect changes so T5 dynamic class loading worked as it supposed to work. Ok? Maybe it's your Ide that gives you trouble? -- regards, Robin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5.0.5] Caching and IE6
That's the problem. The meta tag isn't working... Gabriel Lozano wrote: Hi, I have had the same problem. I have a page for managing the items in a list (select list). But when i go to the page where the list is I have to hit the refresh button. By the way, does the meta content worked? Hope to see a good solution for this!!. 2007/8/22, Siddhartha Argollo [EMAIL PROTECTED]: Hi all, I'm having an annoying problem with my pages in IE6. It doesn't happen with firefox. When the page has auto-links, sometimes it doesn't refresh when the link is clicked. The state before the click continues to be shown in the browser, in despite of the postback. I have to hit the refresh button to view the new state of the page. It even happens with the pager of the Grid component. I already inject all may pages with META CONTENT=NO-CACHE HTTP-EQUIV=CACHE-CONTROL/META META CONTENT=NO-CACHE HTTP-EQUIV=PRAGMA/META Anybody else has notice that? Is there something else I might try to solve this issue? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Siddhartha Argollo Técnico Judiciário TRE-BA [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Maven or not?
Maybe, but the quick fix was to stop using maven :) - as usual. Maybe I am not compatible with Maven ;) --- Robin Helgelin [EMAIL PROTECTED] wrote: On 8/22/07, Konstantin Ignatyev [EMAIL PROTECTED] wrote: Sometimes it will pick-up changes in the html templates and page classes and sometimes not. When I started using jetty directly it would always detect changes so T5 dynamic class loading worked as it supposed to work. Ok? Maybe it's your Ide that gives you trouble? -- regards, Robin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Konstantin Ignatyev PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2,700 tons of CFCs to the stratosphere, and increase their population by 263,000 Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools. New York: State University of New York Press, 1997: (4) (5) (p.206) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DynamicSelectionList Hivemind NullPointerException
I'm trying to get the DynamicSelectionList component working in an existing Tapestry 4.0 project. http://lombok.demon.co.uk/tapestry4Demo/ I copied all of the source files from the custom class example into my own packages, but when I try to submit the form on the page, I get this error: org.apache.hivemind.ApplicationRuntimeException Parameter name must not be null. Any ideas? Thanks! J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket vs tapestry ?
Hi Alex, I would say Tapestry 5 wins the challenge unless you plane to use T4. Tapestry 5 uses annotations, and this is a very important advanced feature in Java. You don't need to extend WOComponent, WebPage or what ever. I think all frameworks will use the annotations in the future; the question is when is available. T5 does and it's ready. In other words, the real question you should ask Do I want to use annotations or classical framework? Try T5 a little, and you will fast mention the power of annotations. Signature IT-Consult Armainak Sarkis - Original Message - From: Alex Shneyderman [EMAIL PROTECTED] To: users@tapestry.apache.org; [EMAIL PROTECTED] Sent: Wednesday, August 22, 2007 10:13 AM Subject: wicket vs tapestry ? I just started to look for a component based framework. I came across both tapestry and wicket (and it would be hard not to as you guys share the same host) but I kind of fail to see what the differences are? From my limited experiments with both, wicket and tapestry seem to be quite similar. So, I wonder if there is anything I am not seeing? Anyone has a comparisson map of wicket vs tapestry? Alex. PS: I like both frameworks for their lightness I just feel that I will need to stick with one to be pragmatic :-( - 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: DynamicSelectionList Hivemind NullPointerException
Well, some mandatory parameter of some component must not be null :-) How about giving us a bit more? Page template, page class, line in the template at which the error occurs... Uli Jacob Arnold schrieb: I'm trying to get the DynamicSelectionList component working in an existing Tapestry 4.0 project. http://lombok.demon.co.uk/tapestry4Demo/ I copied all of the source files from the custom class example into my own packages, but when I try to submit the form on the page, I get this error: org.apache.hivemind.ApplicationRuntimeException Parameter name must not be null. Any ideas? Thanks! J - 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: DynamicSelectionList Hivemind NullPointerException
Thanks for the quick response. The source is exactly as here except I changed the package names: http://lombok.demon.co.uk/tapestry4Demo/pages/dynamicSelectionList/TestDSLComponent2Source.html The error occurs on line 7 of TestDSLComponent2.page: page-specification class=gov.nmcourts.caselookup.pages.TestDSLComponent2 Thanks, Jacob Ulrich Stärk wrote: Well, some mandatory parameter of some component must not be null :-) How about giving us a bit more? Page template, page class, line in the template at which the error occurs... Uli Jacob Arnold schrieb: I'm trying to get the DynamicSelectionList component working in an existing Tapestry 4.0 project. http://lombok.demon.co.uk/tapestry4Demo/ I copied all of the source files from the custom class example into my own packages, but when I try to submit the form on the page, I get this error: org.apache.hivemind.ApplicationRuntimeException Parameter name must not be null. Any ideas? Thanks! J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket vs tapestry ?
A colleague of mine and I had a discussion about this because he was sorting through new frameworks to use for a new project. I have been using Tapestry since v3 and wanted him to give it a try. Unfotunately he ended up picking Wicket because of the fear that Tapestry has issues with backward compatibility. I am now wondering if I made the right choice in choosing tapestry for my applications. He built his application quickly and it is impressive using Wickets built in AJAX components. Upgrading in Tapestry has been a pain going from 3 - 4 and obviously 5 isn't even possible. I wish I could have choose tap 5 for my latest project but it was too beta and doesn't play well with other frameworks, ie a large legacy app with a Struts like framework. Anyway its a hard decision, they both have plus' and minus' ~chris On 8/22/07, John [EMAIL PROTECTED] wrote: Hi Alex, I would say Tapestry 5 wins the challenge unless you plane to use T4. Tapestry 5 uses annotations, and this is a very important advanced feature in Java. You don't need to extend WOComponent, WebPage or what ever. I think all frameworks will use the annotations in the future; the question is when is available. T5 does and it's ready. In other words, the real question you should ask Do I want to use annotations or classical framework? Try T5 a little, and you will fast mention the power of annotations. Signature IT-Consult Armainak Sarkis - Original Message - From: Alex Shneyderman [EMAIL PROTECTED] To: users@tapestry.apache.org; [EMAIL PROTECTED] Sent: Wednesday, August 22, 2007 10:13 AM Subject: wicket vs tapestry ? I just started to look for a component based framework. I came across both tapestry and wicket (and it would be hard not to as you guys share the same host) but I kind of fail to see what the differences are? From my limited experiments with both, wicket and tapestry seem to be quite similar. So, I wonder if there is anything I am not seeing? Anyone has a comparisson map of wicket vs tapestry? Alex. PS: I like both frameworks for their lightness I just feel that I will need to stick with one to be pragmatic :-( - 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] -- ~chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DynamicSelectionList Hivemind NullPointerException
Please give us the exact error message (doesn't need to be the whole stack trace but a few more lines from which we can see at which point the exception is thrown would be helpful...). Uli Jacob Arnold schrieb: Thanks for the quick response. The source is exactly as here except I changed the package names: http://lombok.demon.co.uk/tapestry4Demo/pages/dynamicSelectionList/TestDSLComponent2Source.html The error occurs on line 7 of TestDSLComponent2.page: page-specification class=gov.nmcourts.caselookup.pages.TestDSLComponent2 Thanks, Jacob Ulrich Stärk wrote: Well, some mandatory parameter of some component must not be null :-) How about giving us a bit more? Page template, page class, line in the template at which the error occurs... Uli Jacob Arnold schrieb: I'm trying to get the DynamicSelectionList component working in an existing Tapestry 4.0 project. http://lombok.demon.co.uk/tapestry4Demo/ I copied all of the source files from the custom class example into my own packages, but when I try to submit the form on the page, I get this error: org.apache.hivemind.ApplicationRuntimeException Parameter name must not be null. Any ideas? Thanks! J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket vs tapestry ?
My story: I have been very satisfied Tapestry 3 used and T3 has helped tremendously with building applications in the past. Then I was busy doing other things although keeping eye on T and recently I needed to build a live prototype quickly, naturally my first reaction was to pick up Dreamweaver and try Tapestry 5. T5 is amazingly good BUT I needed Ajax support and at this moment Wicket makes leaps and bounds around T5 in this area. So I abandoned T5 and started using Wicket - so far I am very satisfied with it although worry if Wicket is production grade for high traffic sites because of its heavy use of HttpSession as storage. So for now I will use Wicket for prototyping and small apps and keep my eye on T5. T4 is no-go for me - I am too lazy --- Chris Chiappone [EMAIL PROTECTED] wrote: A colleague of mine and I had a discussion about this because he was sorting through new frameworks to use for a new project. I have been using Tapestry since v3 and wanted him to give it a try. Unfotunately he ended up picking Wicket because of the fear that Tapestry has issues with backward compatibility. I am now wondering if I made the right choice in choosing tapestry for my applications. He built his application quickly and it is impressive using Wickets built in AJAX components. Upgrading in Tapestry has been a pain going from 3 - 4 and obviously 5 isn't even possible. I wish I could have choose tap 5 for my latest project but it was too beta and doesn't play well with other frameworks, ie a large legacy app with a Struts like framework. Anyway its a hard decision, they both have plus' and minus' ~chris On 8/22/07, John [EMAIL PROTECTED] wrote: Hi Alex, I would say Tapestry 5 wins the challenge unless you plane to use T4. Tapestry 5 uses annotations, and this is a very important advanced feature in Java. You don't need to extend WOComponent, WebPage or what ever. I think all frameworks will use the annotations in the future; the question is when is available. T5 does and it's ready. In other words, the real question you should ask Do I want to use annotations or classical framework? Try T5 a little, and you will fast mention the power of annotations. Signature IT-Consult Armainak Sarkis - Original Message - From: Alex Shneyderman [EMAIL PROTECTED] To: users@tapestry.apache.org; [EMAIL PROTECTED] Sent: Wednesday, August 22, 2007 10:13 AM Subject: wicket vs tapestry ? I just started to look for a component based framework. I came across both tapestry and wicket (and it would be hard not to as you guys share the same host) but I kind of fail to see what the differences are? From my limited experiments with both, wicket and tapestry seem to be quite similar. So, I wonder if there is anything I am not seeing? Anyone has a comparisson map of wicket vs tapestry? Alex. PS: I like both frameworks for their lightness I just feel that I will need to stick with one to be pragmatic :-( - 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] -- ~chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Konstantin Ignatyev PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2,700 tons of CFCs to the stratosphere, and increase their population by 263,000 Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools. New York: State University of New York Press, 1997: (4) (5) (p.206) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Integration testing Tapestry 4 applications
Hugo, Have you run into any snags using this in the past month? Carlos -- View this message in context: http://www.nabble.com/Integration-testing-Tapestry-4-applications-tf3927683.html#a12283397 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: wicket vs tapestry ?
I have a similar story. In a commercial environment, we are using T3 very heavily. We have benefitted tremendously from a component library that we have added to over time. We have built a number of very similar applications and so the component library has proven to be a great advantage. However... T3, is essentially an abandoned framework. In the commercial setting, we are struggling with how to proceed with a greenfield project. We are a bit loathe to use our T3 for that, despite our large component library because it is, like Latin, a 'dead' framework. T5 isn't ready, so that's out. I've been using Wicket (1.3 from SVN) on a side venture. I thought that I would pick it up very quickly based on my experience in approaching web apps using an event-driven component model. I found that I struggled a bit. There are some very compelling features in Wicket and I have been enjoying those tremendously. But I have spent too long trying to figure out the right way to do some things in Wicket at times. This, perhaps, could just be me. This brings me to my next point. Based on our experience with Tapestry, my current thinking is that UIs are essentially disposable anyway. View technologies change so fast that a hot framework one day (Struts), is scorned the next. If you have developed your application with good separation of concerns, it should be a lot easier to replace the UI technology. I like that Wicket has made a commitment to backwards compatibility. This, however, can be a double-edged sword but that's another topic. The idea here is that you want to pick something that will have staying power, but at the same time prevent lock in. I feel like I'm rambling a bit now so I'll just put in a couple thoughts about Wicket: 1) Overall I really like it. The API is quite large tho and it can be difficult to understand the intent of the design at times. I hope the Wicket in Action book will help with that. 2) I like the back button support. My thinking is that extending Wicket's AJAX integration to also support the back button (somehow) is a must. Virtually everyone who uses Wicket will use it's AJAX functionality. Almost all of these will need solve this problem. Sure would be nice if it was included. 3) The design-by-inheritance model (WebPage, AbstractBehavior, etc). has produced a somewhat fragmented library. Reminds me of the days of MFC. T5's approach in this respect seems quite attractive. Thanks for listening, Erik On 8/22/07, Konstantin Ignatyev [EMAIL PROTECTED] wrote: My story: I have been very satisfied Tapestry 3 used and T3 has helped tremendously with building applications in the past. Then I was busy doing other things although keeping eye on T and recently I needed to build a live prototype quickly, naturally my first reaction was to pick up Dreamweaver and try Tapestry 5. T5 is amazingly good BUT I needed Ajax support and at this moment Wicket makes leaps and bounds around T5 in this area. So I abandoned T5 and started using Wicket - so far I am very satisfied with it although worry if Wicket is production grade for high traffic sites because of its heavy use of HttpSession as storage. So for now I will use Wicket for prototyping and small apps and keep my eye on T5. T4 is no-go for me - I am too lazy --- Chris Chiappone [EMAIL PROTECTED] wrote: A colleague of mine and I had a discussion about this because he was sorting through new frameworks to use for a new project. I have been using Tapestry since v3 and wanted him to give it a try. Unfotunately he ended up picking Wicket because of the fear that Tapestry has issues with backward compatibility. I am now wondering if I made the right choice in choosing tapestry for my applications. He built his application quickly and it is impressive using Wickets built in AJAX components. Upgrading in Tapestry has been a pain going from 3 - 4 and obviously 5 isn't even possible. I wish I could have choose tap 5 for my latest project but it was too beta and doesn't play well with other frameworks, ie a large legacy app with a Struts like framework. Anyway its a hard decision, they both have plus' and minus' ~chris On 8/22/07, John [EMAIL PROTECTED] wrote: Hi Alex, I would say Tapestry 5 wins the challenge unless you plane to use T4. Tapestry 5 uses annotations, and this is a very important advanced feature in Java. You don't need to extend WOComponent, WebPage or what ever. I think all frameworks will use the annotations in the future; the question is when is available. T5 does and it's ready. In other words, the real question you should ask Do I want to use annotations or classical framework? Try T5 a little, and you will fast mention the power of annotations. Signature IT-Consult Armainak Sarkis - Original Message -
Re: Problems with tapestry-spring while upgrading from 4.1.2-SNAPSHOT to 4.1.3-SNAPSHOT
I re-factored things and brought the interfaces involved in the stack trace provided back to their previous signature (as last touched by Howard). Are you sure you have the very latest 4.1.3-SNAPSHOT version? A new sample stack trace would be able to shed more light on it from here. On 8/22/07, mraible [EMAIL PROTECTED] wrote: This problem still seems to exist in 4.1.3-SNAPSHOT. I'm assuming you haven't had time to look at it yet? Matt snipped -- 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.0.5] Caching and IE6
I don't know what an auto link is - but if you are creating ajax requests then you have to do something stupid like: // pseudo javascript var url = url; url += new Date(); Otherwise ie will see the same url and not bother to make the request. (a premature optimization I guess) On 8/22/07, Siddhartha Argollo [EMAIL PROTECTED] wrote: Hi all, I'm having an annoying problem with my pages in IE6. It doesn't happen with firefox. When the page has auto-links, sometimes it doesn't refresh when the link is clicked. The state before the click continues to be shown in the browser, in despite of the postback. I have to hit the refresh button to view the new state of the page. It even happens with the pager of the Grid component. I already inject all may pages with META CONTENT=NO-CACHE HTTP-EQUIV=CACHE-CONTROL/META META CONTENT=NO-CACHE HTTP-EQUIV=PRAGMA/META Anybody else has notice that? Is there something else I might try to solve this issue? Thanks. - 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: Problems with tapestry-spring while upgrading from 4.1.2-SNAPSHOT to 4.1.3-SNAPSHOT
Seems to be fixed now - thanks! Matt Jessek wrote: I re-factored things and brought the interfaces involved in the stack trace provided back to their previous signature (as last touched by Howard). Are you sure you have the very latest 4.1.3-SNAPSHOT version? A new sample stack trace would be able to shed more light on it from here. On 8/22/07, mraible [EMAIL PROTECTED] wrote: This problem still seems to exist in 4.1.3-SNAPSHOT. I'm assuming you haven't had time to look at it yet? Matt snipped -- 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] -- View this message in context: http://www.nabble.com/Problems-with-tapestry-spring-while-upgrading-from-4.1.2-SNAPSHOT-to-4.1.3-SNAPSHOT-tf4275060.html#a12284776 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: Problems with tapestry-spring while upgrading from 4.1.2-SNAPSHOT to 4.1.3-SNAPSHOT
This appears to be caused by EhCache's GZipFilter (v 1.3.0). This is strange since the rest of my .js files work fine with this filter. Here's the response headers with the gzipFilter enabled: Expires: Thu, 21 Aug 2008 23:33:06 GMT Last-Modified: Wed, 22 Aug 2007 23:13:32 GMT Cache-Control: public, max-age=7776000 Content-Encoding: gzip Etag: W/36171-1187824412000 Content-Length: 36204 Content-Type: application/x-javascript; charset=UTF-8 Server: Jetty(6.1.5) 200 OK And without: Expires: Thu, 21 Aug 2008 23:36:54 GMT Last-Modified: Wed, 22 Aug 2007 23:13:32 GMT Cache-Control: public, max-age=7776000 Content-Encoding: gzip Etag: W/36171-1187824412000 Content-Length: 36171 Content-Type: application/x-javascript; charset=UTF-8 Server: Jetty(6.1.5) 200 OK Is Tapestry already doing some gzipping? It looks like the file is smaller w/o the EhCache filter enabled. Thanks, Matt mraible wrote: I tried backing down to 4.1.2 and my application at least comes up. I noticed it's now including a dojo javascript file. However, if I navigate to its path: http://localhost:9000/assets/static/dojo-0.4.3/dojo3.js It's all jumbled text with funky characters instead of JavaScript. Is this as designed? Matt sample � -- View this message in context: http://www.nabble.com/Problems-with-tapestry-spring-while-upgrading-from-4.1.2-SNAPSHOT-to-4.1.3-SNAPSHOT-tf4275060.html#a12285008 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: Ajax, Releases
Hi, looking at T5's roadmap, it says ajax support will be in by summer 2007, is the ajax already part of some beta versions? and will soon be in a pre-release? and T5's final release is Fall, 2007, possible? Thanks, A.C. -- View this message in context: http://www.nabble.com/T5%3A-Ajax%2C-Releases-tf4314840.html#a12285626 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:Simple form submit
Hi Nick, Thanks. I tried : @Component(id = form) private Form _form; error still there, the related html part is: t:form ... something between here /t:form Nick Westgate wrote: Or preferably see the actual TextField component docs on that page. The label used in the TextField is used for validation errors as well as for the Label component, so it's only defined in one place. (= Good) As for the error, it's because no id is defined for the form. I can't test the code right now, but the error might go away if you change to this: @Component(id = form) private Form _form; Cheers, Nick. Ulrich Stärk wrote: Tapestry generates the content of the label as follows: the first character of the id attribute of your input component is converted to upper case and a space is inserted before every upper case character. If you want to name the label differently just give the label attribute of your input component some value (see AbstractField in http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html). Uli Angelo Chen schrieb: oh, sorry, t:label for =userName / this generates a label User Name, where is this come from, T5 just breaks the words? if I want to put some other text into the label, how? also trying out that login example: http://tapestry.apache.org/tapestry5/tapestry-core/guide/validation.html @Component private Form _form; this will generat an error during starting: [ERROR] Login Embedded component(s) form are defined within component class org.example.hilo.pages.Login, but are not present in the component template but it still works, why? Ulrich Stärk wrote: And what exactly is the question? Angelo Chen schrieb: Thanks nick, it's just what I need, one more question: t:label for =userName / input t:type=TextField t:id = userName t:validate=required size=30 / Nick Westgate wrote: There is a login example right here: http://tapestry.apache.org/tapestry5/tapestry-core/guide/validation.html Cheers, Nick. Angelo Chen wrote: Hi, I have finished the tutorial in the T5 site, it uses BeanFormEdit, can somebody show me how to do the basic form edit/submit? like a textField for username, a button to submit, then how the java side capture the two fields? thanks. A.C. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3ASimple-form-submit-tf4310884.html#a12286021 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5:Grid demo and import
Hi, I am trying the grid demos in the HowTo wiki page, the sample is looking for something like this: import org.apache.tapestry.integration.app1.services.ToDoDatabase where can I find that? it is not in the T5 package downloaded by Maven, Thanks, A.C. -- View this message in context: http://www.nabble.com/T5%3AGrid-demo-and-import-tf4315097.html#a12286496 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:Grid demo and import
It's in the source distribution. Not sure if that is available through the maven repositories, but you can download it from the Tapestry main website. You can also browse it online by going through the wiki link for the online sample code, and traversing up and over some directories. On 8/22/07, Angelo Chen [EMAIL PROTECTED] wrote: Hi, I am trying the grid demos in the HowTo wiki page, the sample is looking for something like this: import org.apache.tapestry.integration.app1.services.ToDoDatabase where can I find that? it is not in the T5 package downloaded by Maven, Thanks, A.C. -- View this message in context: http://www.nabble.com/T5%3AGrid-demo-and-import-tf4315097.html#a12286496 Sent from the Tapestry - User mailing list archive at Nabble.com. - 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:Simple form submit
Yeah, there is a small bug in the template error reporting. t:form is a component of type Form that is assigned a default id, and that's the same as the type name form. This matches Form _form. To get rid of the error use: t:form t:id=form You could use a better name than form though, like loginForm. ;-) t:form t:id=loginForm @Component private Form loginForm; Cheers, Nick. Angelo Chen wrote: Hi Nick, Thanks. I tried : @Component(id = form) private Form _form; error still there, the related html part is: t:form ... something between here /t:form Nick Westgate wrote: Or preferably see the actual TextField component docs on that page. The label used in the TextField is used for validation errors as well as for the Label component, so it's only defined in one place. (= Good) As for the error, it's because no id is defined for the form. I can't test the code right now, but the error might go away if you change to this: @Component(id = form) private Form _form; Cheers, Nick. Ulrich Stärk wrote: Tapestry generates the content of the label as follows: the first character of the id attribute of your input component is converted to upper case and a space is inserted before every upper case character. If you want to name the label differently just give the label attribute of your input component some value (see AbstractField in http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html). Uli Angelo Chen schrieb: oh, sorry, t:label for =userName / this generates a label User Name, where is this come from, T5 just breaks the words? if I want to put some other text into the label, how? also trying out that login example: http://tapestry.apache.org/tapestry5/tapestry-core/guide/validation.html @Component private Form _form; this will generat an error during starting: [ERROR] Login Embedded component(s) form are defined within component class org.example.hilo.pages.Login, but are not present in the component template but it still works, why? Ulrich Stärk wrote: And what exactly is the question? Angelo Chen schrieb: Thanks nick, it's just what I need, one more question: t:label for =userName / input t:type=TextField t:id = userName t:validate=required size=30 / Nick Westgate wrote: There is a login example right here: http://tapestry.apache.org/tapestry5/tapestry-core/guide/validation.html Cheers, Nick. Angelo Chen wrote: Hi, I have finished the tutorial in the T5 site, it uses BeanFormEdit, can somebody show me how to do the basic form edit/submit? like a textField for username, a button to submit, then how the java side capture the two fields? thanks. A.C. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:Simple form submit
This fixs the problem, thanks. Nick Westgate wrote: Yeah, there is a small bug in the template error reporting. t:form is a component of type Form that is assigned a default id, and that's the same as the type name form. This matches Form _form. To get rid of the error use: t:form t:id=form You could use a better name than form though, like loginForm. ;-) t:form t:id=loginForm -- View this message in context: http://www.nabble.com/T5%3ASimple-form-submit-tf4310884.html#a12286975 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: organizing HTML pages into subdirectories
Thanks for the reply but problem is my html page is unable to find its java class! am i missing to give something in specifications? abhilash wrote: I have a sub directory called admin under WEB-INF .My servlet mapping is servlet-mapping servlet-namedentaprise/servlet-name url-pattern/app/url-pattern /servlet-mapping i have ListClient.html in admin directory.I am unable to get the page ListClient.where i have to specify my sub directory? any ideas? -- View this message in context: http://www.nabble.com/organizing-HTML-pages-into-subdirectories-tf4311520.html#a12287877 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]