Re: Early steps getting Tapestry and Hibernate working via DAO
https://bitbucket.org/mgruca/tjug_tapestry_30.09.10/downloads That should run in eclipse with m2 plugin. Check it out, maybe it will help to find solution. In case if revision 9 wouldn't work, try previous one. Rev 9 are changes that I made during presentation, they should not affect anything, but I prefer to mention it just in case.a With regards Michał Gruca Alex W. Croton wrote: Hi, I am a real newbie when it comes to Tapestry and even worse than that when it comes to Hibernate. I am using Tapestry 5.1.0 and Hibernate 3.3.1 - talking to a MySQL database. I've got the code from the Tapestry5HowToUseTapestryHibernate working fine, but in the application that I am putting together I want/need to be able to use DAO to interface between the various components of the application. After 3 days of various Googling, I'm far more confused than when I started - it seems that the examples that I have been able to find are either for a different version of Tapestry - or appear to be using some form of magic that my environment is lacking :-) Can anyone offer any pointers to get me going on what 'bits' I need where please? Regards, Alex C -- View this message in context: http://tapestry-users.832.n2.nabble.com/Early-steps-getting-Tapestry-and-Hibernate-working-via-DAO-tp5591178p5601938.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: Easy FckEditor in Form with associated Zone
Ville, thank you. Ticket opend : http://kenai.com/jira/browse/T5_EASY_FCKEDITOR-4 Peter Hi, I will take a look at the old FCK editor (The main effort has been put to the newer CK integration.) to make it compatible with 5.2. I'll take a look at this also, but unfortunately it will take 2-4 weeks, as I'm a bit busy now. I suspect that the AJAX submit breaks the editor default logic that handles the value from editor to underlaying textfield process - so the probable answer is to register some T5 event listener that does this instead. - Ville Ps. Please open a JIRA ticket for this in http://kenai.com/jira/browse/T5_EASY_FCKEDITOR - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Is there any way to render the get method of form?
Point us to the Jira Lutz, the HTML 2 specification details the following: If the processing of a form is idempotent (i.e. it has no lasting observable effect on the state of the world), then the form method should be GET. Many database searches have no visible side-effects and make ideal applications of query forms. and: If the service associated with the processing of a form has side effects (for example, modification of a database or subscription to a service), the method should be POST. so I believe you have a case. Cheers, Peter - Original Message - From: Lutz Hühnken lh.tapestry.l...@googlemail.com To: Tapestry users users@tapestry.apache.org Sent: Tuesday, 28 September, 2010 21:00:06 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Is there any way to render the get method of form? Dear Thiago, thanks for your patient reply and the advice. Of course I realize that I can still implement a search with Tapestry, with redirect-after-post or else, and I have actually done so in the past. But please take a minute and think about these two things: 1. You say, GET was always meant to be used in request that don't change the state of the application (including database) and this is exactly what I would like to use it for - as I said, a search. You could re-phrase your argument: POST was meant for requests that do change the state. So why do I have to use it for requests that do not? 2. Of course, a lot of things are doable, change the DOM and what not. But wasn't the idea of Tapestry make the simple things easy, the difficult things possible? A form with method=get is totally valid HTML, and I think it should be easy, not complicated. These two reasons are why I said the lack of get-forms is puzzling me, it just seems somewhat inconsistent with the rest of Tapestry (which I use and will continue to use with great pleasure). I did as you told me and created a JIRA ticket (a wish) for it: https://issues.apache.org/jira/browse/TAP5-1285; Keep up the good work, Lutz -- altocon GmbH http://www.altocon.de/ Software Development, Consulting Hamburg, Germany - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.2, Google Application Engine] Can't get a method to be realized (i.e. invoke a method)
Thanks for the advice you are totally correct. But this error also occurs on jetty. I made a mistake putting GAE in the subject. The error actually happens on both GAE and local jetty. I took my development locally to speed up the development process. Thank you for your time. On Tue, Oct 5, 2010 at 12:10 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Mon, 04 Oct 2010 18:29:26 -0300, Muhammad Mohsen m.gelb...@gmail.com wrote: Hi All, Hi! I strongly suggest you to try to make your application work on Jetty or Tomcat first, specially if you're still learning Tapestry, and after that try the GAE, as it is a different environment. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Muhammad Mohsen Hussien Jr. Java Software Engineer
Re: [T5.2] Principle 1, Static Structure Dynamic Behaviour
Hi Actually, there is no problem if you do that since you generate a valid action URL of your form and use request service to read parameter values. But this is not how Tapestry has been designed, Tapestry is a component oriented framework, not an action oriented framework. Static structure simply means that you cannot create *new* instances of component at runtime. That does not mean that you as a developer can't go beyond this principle and use Request.getParameter() method or even generate plain HTML in dom tree But if you use Tapestry components, you must be aware that even if you put a component inside a loop, the inner component will be 'rendered' n-times but ultimately there is only ONE instance of this component. 2010/10/5 iberck ibe...@gmail.com: Hi, thank you for the response So I don't understand the principle 1. What happend if I add a html element in the tree dom and I get the value from the request after submit ? I'm violating the principle? Is there a problem if I do that? -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-2-Principle-1-Static-Structure-Dynamic-Behaviour-tp3198357p3198857.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Regards, Christophe Cordenier. Committer on Apache Tapestry 5 Co-creator of wooki @wookicentral.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.2, Google Application Engine] Can't get a method to be realized (i.e. invoke a method)
You'll find more information in the console log, but from the little bit you've shown me, it looks like your classpath is missing a referenced library, the one that provided class NestableRuntimeException. On Tue, Oct 5, 2010 at 12:17 AM, Muhammad Mohsen m.gelb...@gmail.com wrote: Thanks for the advice you are totally correct. But this error also occurs on jetty. I made a mistake putting GAE in the subject. The error actually happens on both GAE and local jetty. I took my development locally to speed up the development process. Thank you for your time. On Tue, Oct 5, 2010 at 12:10 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Mon, 04 Oct 2010 18:29:26 -0300, Muhammad Mohsen m.gelb...@gmail.com wrote: Hi All, Hi! I strongly suggest you to try to make your application work on Jetty or Tomcat first, specially if you're still learning Tapestry, and after that try the GAE, as it is a different environment. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Muhammad Mohsen Hussien Jr. Java Software Engineer -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.2] Principle 1, Static Structure Dynamic Behaviour
terrific response Thank you very much -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-2-Principle-1-Static-Structure-Dynamic-Behaviour-tp3198357p3198975.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: TapX / YUI / Tap 5.2.0
Hi, You can look at the demo page of the tapx-yui component itself : http://github.com/hlship/tapx/blob/692195d119d6beda1b664bcd1e268f0f6944c447/tapx-yui/src/test/resources/yui/demo/pages/RichTextEditorDemo.tml http://github.com/hlship/tapx/blob/692195d119d6beda1b664bcd1e268f0f6944c447/tapx-yui/src/test/java/yui/demo/pages/RichTextEditorDemo.java If you want more options, you have to customize it and add some config toolbar options : http://developer.yahoo.com/yui/editor/ Regards, Laurent GUÉRIN -Message d'origine- De : Jim O'Callaghan [mailto:jc1000...@yahoo.co.uk] Envoyé : mardi 5 octobre 2010 10:56 À : 'Tapestry users' Objet : TapX / YUI / Tap 5.2.0 Can anyone point to an online example of using the YUI Editor with Tap 5.2.0 - thanks. Regards, Jim. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Dynamically loading a component
hi omar, this is not as horrible as it sounds ... testing gets a lot easier i have a fairly big T5 application with many modules. within this application i have many master - detail views where the detail view depends on the type of object within the master list and those types can be deployed as needed. ie. if i also deploy my order module my master view might show some order entry and if i dont deploy it it wont show up. if i click on this entry i want to be directed to a order specific page that is defined in another (web) module. therefore i created a service that contains a contribution of pages to the specific detail view which is used to render / create the appropriate links. i also have a BlockService (...Registry) where i can contribute blocks that should be reused in multiple pages and modules. so you always know in advance what you are gonna render. even the possible combinations. for more details take a look at the BeanEditor implementation. g, kris Von:Omar Carvajal tapes...@carvajalonline.com An: Tapestry users users@tapestry.apache.org Datum: 05.10.2010 06:19 Betreff:Re: Dynamically loading a component This is horrible news since I have no way of knowing the components that needs to be called at design time (other wise I would use a t:block). There is no magic that can be done to achieve this at all? Even if I have to use the internal services. Thanks for your quick response. Omar On Oct 4, 2010, at 18:41, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Mon, 04 Oct 2010 19:35:38 -0300, Omar Carvajal tapes...@carvajalonline.com wrote: Hey all, Hi! I am trying to dynamically load a component which must be determined at run time, I figured I must use a t:delegate to render the component. On the Java side of things I cannot figure out how to instantiate the actual component. I saw the @Component annotation with the type parameter but this does not let me dynamically load a component from a function. Does anybody have any idea on how to do this? Declare the components inside a t:block. t:block are not rendered unless you pass it to a Delegate or return it to update a Zone. You cannot instantiate components in Java code, as Tapestry is static structure, dynamic behavior (including rendering). Take a look at http://tapestry.apache.org/tapestry5.1/cookbook/switch.html. It shows you how to render blocks dynamically, but the same approach can be used for components as well. You'll use @InjectComponent to get access in your Java code to the component instances declared in templates. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.2] Principle 1, Static Structure Dynamic Behaviour
Thank you all for your answers The concept is more clear for me... But I have another question? From this principle of static structure dynamic behaviour, can I create with T5 a CRM based on plugins like drupal/jomla ? Thanks in advance -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-2-Principle-1-Static-Structure-Dynamic-Behaviour-tp3198357p3199239.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5.2] Live class reloading not working with jetty
Since we upgraded to T5.2, live class reloading has not worked correctly, however if we downgrade it works fine. We're using Jetty kicked off using the runjettyrun plugin for Eclipse. When making just a simple tml change, using the running application again has a long pause before it does anything, and after a few requests it falls over out of permgen space. All of our developers are experiencing this, and it's a real shame that one of the major strengths of Tapestry is not working for us anymore. Is there something I need to change to get live class reloading working with T5.2? Thanks, Andy
Re: [T5.2] Principle 1, Static Structure Dynamic Behaviour
On Tue, 05 Oct 2010 02:41:18 -0300, iberck ibe...@gmail.com wrote: Hi, thank you for the response Hi! So I don't understand the principle 1. What happend if I add a html element in the tree dom and I get the value from the request after submit ? I'm violating the principle? You are not violating the principle. The static structure we're talking about is the page and component instances, not the result of their rendering. Is there a problem if I do that? No problem at all. :) -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.2] Principle 1, Static Structure Dynamic Behaviour
On Tue, 05 Oct 2010 07:46:22 -0300, iberck ibe...@gmail.com wrote: But I have another question? From this principle of static structure dynamic behaviour, can I create with T5 a CRM based on plugins like drupal/jomla ? Yes. I can think of two approaches: 1) Override or advise the Tapestry template loading service, so users can edit templates. 2) (Strongly preferred) Use some templating engine like Freemarker to let the users edit content and Tapestry for anything else. Tapestry templates were always meant to be used by developers only, not end users, while Freemarker and similar tools are way more suited for this task. Search the mailing list for CMS for more discussions about this. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.2] Live class reloading not working with jetty
What kind of memory settings are you using? This works fine for me (on a Mac of course), but with -Xmx600M ... and you may need to extend permspace as well. Long pauses sound like GC to me ... On Tue, Oct 5, 2010 at 3:52 AM, Blower, Andy andy.blo...@proquest.co.uk wrote: Since we upgraded to T5.2, live class reloading has not worked correctly, however if we downgrade it works fine. We're using Jetty kicked off using the runjettyrun plugin for Eclipse. When making just a simple tml change, using the running application again has a long pause before it does anything, and after a few requests it falls over out of permgen space. All of our developers are experiencing this, and it's a real shame that one of the major strengths of Tapestry is not working for us anymore. Is there something I need to change to get live class reloading working with T5.2? Thanks, Andy -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.2] Principle 1, Static Structure Dynamic Behaviour
My Tapx library includes a component that reads an external template file (as XML) and can render it as part of a Tapestry page, including delegating parts of it to blocks, and processing expansions. Documentation coming (but lower priority than T5.2 docs, so be patient). On Tue, Oct 5, 2010 at 4:18 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Tue, 05 Oct 2010 07:46:22 -0300, iberck ibe...@gmail.com wrote: But I have another question? From this principle of static structure dynamic behaviour, can I create with T5 a CRM based on plugins like drupal/jomla ? Yes. I can think of two approaches: 1) Override or advise the Tapestry template loading service, so users can edit templates. 2) (Strongly preferred) Use some templating engine like Freemarker to let the users edit content and Tapestry for anything else. Tapestry templates were always meant to be used by developers only, not end users, while Freemarker and similar tools are way more suited for this task. Search the mailing list for CMS for more discussions about this. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.2] Live class reloading not working with jetty
Are you using Java 1.5? The classes are not GCed by 1.5 - with 1.6 it works for us. Cheers, Chris -- View this message in context: http://tapestry-users.832.n2.nabble.com/T5-2-Live-class-reloading-not-working-with-jetty-tp5602647p5602934.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.2, Google Application Engine] Can't get a method to be realized (i.e. invoke a method)
Thanks a lot. I think Haward is correct but I can't confirm as I have no access to that code at the moment. I'll make sure to get back to you about that :) It's the *commons-lang-2.1.jar* that is mussing from the class path. I thought that this is the exception thrown. Not that its not actually a ClassNotFoundException. It's just because it's called NestableRuntime* Exception* I thought that this is the exception ! Which brings one more thing. What are the basic jars needed for tapestry to operate ? And another question please (but this may change the scope of this thread i'm afraid) why doesn't eclipse copy all included libraries in my project's class path to my lib folder *web-inf\lib* automatically !? Thanks again :) On Tue, Oct 5, 2010 at 9:40 AM, Howard Lewis Ship hls...@gmail.com wrote: You'll find more information in the console log, but from the little bit you've shown me, it looks like your classpath is missing a referenced library, the one that provided class NestableRuntimeException. On Tue, Oct 5, 2010 at 12:17 AM, Muhammad Mohsen m.gelb...@gmail.com wrote: Thanks for the advice you are totally correct. But this error also occurs on jetty. I made a mistake putting GAE in the subject. The error actually happens on both GAE and local jetty. I took my development locally to speed up the development process. Thank you for your time. On Tue, Oct 5, 2010 at 12:10 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Mon, 04 Oct 2010 18:29:26 -0300, Muhammad Mohsen m.gelb...@gmail.com wrote: Hi All, Hi! I strongly suggest you to try to make your application work on Jetty or Tomcat first, specially if you're still learning Tapestry, and after that try the GAE, as it is a different environment. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Muhammad Mohsen Hussien Jr. Java Software Engineer -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Muhammad Mohsen Hussien Jr. Java Software Engineer
Re: Is there any way to render the get method of form?
Here's a mixin, implement activation context and one GET request with the search terms in the context will be done: t:textfield value=dummy t:mixins=livelinkcontext t:linkId=linkid t:placeholder=placeholdergibberish3452 / t:pagelink id=linkid page=index context=literal:placeholdergibberish3452Search/t:pagelink /** * Replace the context of a link with a value from a textfield */ @IncludeJavaScriptLibrary({context:/js/mixins.js}) public class LiveLinkContext { @InjectContainer private ClientElement element; @Inject private RenderSupport renderSupport; @Parameter(defaultPrefix=literal) private String linkId; @Parameter(defaultPrefix=literal) private String placeholder; void afterRender() { renderSupport.addScript(String.format(new LiveLinkContext('%s','%s','%s');, element.getClientId(), linkId, placeholder)); } } var LiveLinkContext = Class.create({ initialize : function(textfieldId,linkId,placeholder) { try { this.textfield = $(textfieldId); this.link = $(linkId); this.oldhref = this.link.href; this.regex = new RegExp(placeholder, g); Event.observe(this.textfield, 'keyup', this.updateContext.bindAsEventListener(this)); this.updateContext(); } catch (ex) { //log(ex); } }, updateContext : function() { this.link.href = this.oldhref.replace(this.regex, this.textfield.value); } }); -- View this message in context: http://tapestry-users.832.n2.nabble.com/Is-there-any-way-to-render-the-get-method-of-form-tp5449243p5603046.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5.2] Constructor issue
Hi all. While preparing small showcase app, odd problem came out. When I created domain object with two constructors (first was default NOOP, second one had two parameters string and enum, it was meant for manual initialization only) and tried to use it with beaneditform I received exception that tapestry cannot handle my object creation. After removing parametrized constructor, error disappeared. It's bit odd IMHO. Tapestry should be capable to instantiate objects that have more than one constructor. Also @SessionState behaved weirdly. I was annotating java.util.Date. Error came up if I haven't instantiate object manually. Date has default constructor so Tapestry should be fine with constructing new Date on it's own. Maybe there are some reasons for that kind of behavior, but as I see it those are bugs. Should I create jira ticket for that? Tested on tapestry 5.2.1-snapshot. Link to application sources: https://bitbucket.org/mgruca/tjug_tapestry_30.09.10/downloads (last revision or two were stripped out from additional constructors. Content may be in Polish, but code should be all in En) -- View this message in context: http://tapestry-users.832.n2.nabble.com/T5-2-Constructor-issue-tp5603058p5603058.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.2] Constructor issue
On Tue, 05 Oct 2010 10:09:09 -0300, Michal Gruca michalgr...@gmail.com wrote: Hi all. Hi! After removing parametrized constructor, error disappeared. It's bit odd IMHO. That's documented behavior: http://tapestry.apache.org/tapestry5.1/guide/appstate.html. This page is for 5.1, but it should be the same for 5.2. Summary: Tapestry uses the same logic for choosing a constructor used by Tapestry IoC. That page shows you how to control the way you classes are instantiated. Tapestry should be capable to instantiate objects that have more than one constructor. The problem here is: which constructor should be used? Tapestry IoC chooses the one with the most parameters. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.2, Google Application Engine] Can't get a method to be realized (i.e. invoke a method)
On Tue, Oct 5, 2010 at 16:41, Muhammad Mohsen m.gelb...@gmail.com wrote: Thanks a lot. I think Haward is correct but I can't confirm as I have no access to that code at the moment. I'll make sure to get back to you about that :) It's the *commons-lang-2.1.jar* that is mussing from the class path. I thought that this is the exception thrown. Not that its not actually a ClassNotFoundException. It's just because it's called NestableRuntime* Exception* I thought that this is the exception ! Which brings one more thing. What are the basic jars needed for tapestry to operate ? I believe this ones: dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-ioc/artifactId version5.2.0/version /dependency dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry5-annotations/artifactId version5.2.0/version /dependency dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-core/artifactId version5.2.0/version /dependency And another question please (but this may change the scope of this thread i'm afraid) why doesn't eclipse copy all included libraries in my project's class path to my lib folder *web-inf\lib* automatically !? Because Eclipse is not a packaging tool. (best way) Try to use maven2 for this purpose. (bad way) Or just create web-inf\lib folder in your project, put all your jars there and setup project classpath to use these jars. Then you should probably configure output of your source folders so that they compile classes to web-inf\classes, etc. Thanks again :) On Tue, Oct 5, 2010 at 9:40 AM, Howard Lewis Ship hls...@gmail.com wrote: You'll find more information in the console log, but from the little bit you've shown me, it looks like your classpath is missing a referenced library, the one that provided class NestableRuntimeException. On Tue, Oct 5, 2010 at 12:17 AM, Muhammad Mohsen m.gelb...@gmail.com wrote: Thanks for the advice you are totally correct. But this error also occurs on jetty. I made a mistake putting GAE in the subject. The error actually happens on both GAE and local jetty. I took my development locally to speed up the development process. Thank you for your time. On Tue, Oct 5, 2010 at 12:10 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Mon, 04 Oct 2010 18:29:26 -0300, Muhammad Mohsen m.gelb...@gmail.com wrote: Hi All, Hi! I strongly suggest you to try to make your application work on Jetty or Tomcat first, specially if you're still learning Tapestry, and after that try the GAE, as it is a different environment. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Muhammad Mohsen Hussien Jr. Java Software Engineer -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Muhammad Mohsen Hussien Jr. Java Software Engineer -- Dmitry Gusev AnjLab Team http://anjlab.com
Re: [T5.2, Google Application Engine] Can't get a method to be realized (i.e. invoke a method)
Tapestry doesn't use commons-lang, but some code in your application apparently does. On Tue, Oct 5, 2010 at 5:41 AM, Muhammad Mohsen m.gelb...@gmail.com wrote: Thanks a lot. I think Haward is correct but I can't confirm as I have no access to that code at the moment. I'll make sure to get back to you about that :) It's the *commons-lang-2.1.jar* that is mussing from the class path. I thought that this is the exception thrown. Not that its not actually a ClassNotFoundException. It's just because it's called NestableRuntime* Exception* I thought that this is the exception ! Which brings one more thing. What are the basic jars needed for tapestry to operate ? And another question please (but this may change the scope of this thread i'm afraid) why doesn't eclipse copy all included libraries in my project's class path to my lib folder *web-inf\lib* automatically !? Thanks again :) On Tue, Oct 5, 2010 at 9:40 AM, Howard Lewis Ship hls...@gmail.com wrote: You'll find more information in the console log, but from the little bit you've shown me, it looks like your classpath is missing a referenced library, the one that provided class NestableRuntimeException. On Tue, Oct 5, 2010 at 12:17 AM, Muhammad Mohsen m.gelb...@gmail.com wrote: Thanks for the advice you are totally correct. But this error also occurs on jetty. I made a mistake putting GAE in the subject. The error actually happens on both GAE and local jetty. I took my development locally to speed up the development process. Thank you for your time. On Tue, Oct 5, 2010 at 12:10 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Mon, 04 Oct 2010 18:29:26 -0300, Muhammad Mohsen m.gelb...@gmail.com wrote: Hi All, Hi! I strongly suggest you to try to make your application work on Jetty or Tomcat first, specially if you're still learning Tapestry, and after that try the GAE, as it is a different environment. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Muhammad Mohsen Hussien Jr. Java Software Engineer -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Muhammad Mohsen Hussien Jr. Java Software Engineer -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
T5.1 - authenticating page access contributing a sevice
Hi All, I know there has been some discussion on best approaches in tapestry for authenticating access to web pages, so apologies if i have missed the answer to this: Initially I was tempted by the simplest approach - that is just store some UserState in the session via @SessionState and check this in onActivate(). However I feel using a @RequiresLogin annotation approach is a little more robust. I've been following Howard's tutorial here: http://tapestryjava.blogspot.com/2009/12/securing-tapestry-pages-with.html Now my question is two-fold: 1) How do I define and contribute a service in tapestry? 2) How does this guy know that the user _is_ authenticated? Should my service cache logged-in users itself, or can it access the session? Thanks for help, Richard. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.2] Constructor issue
I must disagree. But first to clarify. I described two cases. 1. BeanEditForm that cannot instantiate my object 2. Same issue for SSO creating java.util.Date AD 1. Quote from BeanEditForm doc: Often, the BeanEditForm can create the object as needed (assuming a public, no arguments constructor). So i provided such constructor in my entity (public no agrs) + I added another one that taken String and custom enum. What I assumed was that T5 will just use the one that it can use and leave other one alone. Due to that behavior no object handled to BeanEditForm should have more constructors than default one, or should be always created manually, and that is bit more than user need to do. Ad 2. Quote from linked documentation: The first time you access an SSO, it is created automatically. Typically, the SSO will have a public no-args constructor ... but you may inject dependencies into the SSO via its constructor, as you can with a Tapestry IoC service implementation. In this case I wanted to use Date. Maybe not some real case scenario, so let's think about shoping basket for example. It may have default no args for T5 and second one if I want to instantiate it with some products. If T5 always takes constructor with most arguments it will fail on that scenario also, meaning that I will have to check boolean variable companion exist on every page on which I wan't to use my object. IMHO the best would be try to use no-args constructor or use one with most args and if You fail try another one and another till You succeed (meaning reach default no-args or error when there is no default no-args constructor). Regards Michał -- View this message in context: http://tapestry-users.832.n2.nabble.com/T5-2-Constructor-issue-tp5603058p5603560.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.2] Constructor issue
On Tue, 05 Oct 2010 12:17:46 -0300, Michal Gruca michalgr...@gmail.com wrote: I must disagree. But first to clarify. I described two cases. 1. BeanEditForm that cannot instantiate my object BeanEditor (used internally for BeanEditForm) uses the no-args constructor if it exists. I apologize for not making this distinction clear. 2. Same issue for SSO creating java.util.Date ApplicationStateManager(Impl) uses ObjectLocator.autobuild() to construct instances. Ad 2. Quote from linked documentation: The first time you access an SSO, it is created automatically. Typically, the SSO will have a public no-args constructor ... but you may inject dependencies into the SSO via its constructor, as you can with a Tapestry IoC service implementation. In this case I wanted to use Date. Maybe not some real case scenario, so let's think about shoping basket for example. It may have default no args for T5 and second one if I want to instantiate it with some products. If T5 always takes constructor with most arguments it will fail on that scenario also, meaning that I will have to check boolean variable companion exist on every page on which I wan't to use my object. In this case, use @SessionState(create = false) so the field is null when it's not in the session. and you don't need to declare a boolean variable. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5.1 - authenticating page access contributing a sevice
Hi Thiago, That's tremendous, thanks for the help. R. -Original Message- From: Thiago H. de Paula Figueiredo thiag...@gmail.com Reply-to: Tapestry users users@tapestry.apache.org To: Tapestry users users@tapestry.apache.org Subject: Re: T5.1 - authenticating page access contributing a sevice Date: Tue, 05 Oct 2010 12:28:41 -0300 On Tue, 05 Oct 2010 12:01:57 -0300, Richard Hill r...@su3analytics.com wrote: Hi All, Hi! Now my question is two-fold: 1) How do I define and contribute a service in tapestry? Using Tapestry IoC: http://tapestry.apache.org/tapestry5.1/tapestry-ioc/service.html. 2) How does this guy know that the user _is_ authenticated? Should my service cache logged-in users itself, or can it access the session? Both options sound the same to me. In your RequestFilter (or any other class that isn't a page, component or mixin), use the ApplicationStateManager service to get or set the value of a given class persisted using @SessionState. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.2] Constructor issue
Often, the BeanEditForm can create the object as needed (assuming a public, no arguments constructor). I believe the java docs are out of date. The change happened in a dependent class and the docs don't reflect the change. As Thiago said, the current strategy is to try to make the most complete object is built based on the available constructors. This lets you build beans that have access to services via constructor injection (like a service). I think failing to pick the correct constructor is a defect that Tapestry *should* solve. Principle 2 is Adaptive API, which should adapt to your code. One option is to try them until you get one that works... this could lead to frustration during development if it's not obvious which constructor is getting called... Date has multiple constructors, so this is essentially the same problem. Josh On Tue, Oct 5, 2010 at 8:17 AM, Michal Gruca michalgr...@gmail.com wrote: I must disagree. But first to clarify. I described two cases. 1. BeanEditForm that cannot instantiate my object 2. Same issue for SSO creating java.util.Date AD 1. Quote from BeanEditForm doc: Often, the BeanEditForm can create the object as needed (assuming a public, no arguments constructor). So i provided such constructor in my entity (public no agrs) + I added another one that taken String and custom enum. What I assumed was that T5 will just use the one that it can use and leave other one alone. Due to that behavior no object handled to BeanEditForm should have more constructors than default one, or should be always created manually, and that is bit more than user need to do. Ad 2. Quote from linked documentation: The first time you access an SSO, it is created automatically. Typically, the SSO will have a public no-args constructor ... but you may inject dependencies into the SSO via its constructor, as you can with a Tapestry IoC service implementation. In this case I wanted to use Date. Maybe not some real case scenario, so let's think about shoping basket for example. It may have default no args for T5 and second one if I want to instantiate it with some products. If T5 always takes constructor with most arguments it will fail on that scenario also, meaning that I will have to check boolean variable companion exist on every page on which I wan't to use my object. IMHO the best would be try to use no-args constructor or use one with most args and if You fail try another one and another till You succeed (meaning reach default no-args or error when there is no default no-args constructor). Regards Michał -- View this message in context: http://tapestry-users.832.n2.nabble.com/T5-2-Constructor-issue-tp5603058p5603560.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- -- http://www.bodylabgym.com - a private, by appointment only, one-on-one health and fitness facility. -- http://www.ectransition.com - Quality Electronic Cigarettes at a reasonable price! -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.2] Constructor issue
Your are correct and this has been the behavior since at least 5.1. On Tue, Oct 5, 2010 at 9:21 AM, Josh Canfield joshcanfi...@gmail.com wrote: BeanEditor (used internally for BeanEditForm) uses the no-args constructor if it exists. I apologize for not making this distinction clear. I'm looking at the 5.2 source and BeanEditor uses the BeanModel to get the instance, calls newInstance() which also uses the ObjectLocator.autobuild On Tue, Oct 5, 2010 at 8:32 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Tue, 05 Oct 2010 12:17:46 -0300, Michal Gruca michalgr...@gmail.com wrote: I must disagree. But first to clarify. I described two cases. 1. BeanEditForm that cannot instantiate my object BeanEditor (used internally for BeanEditForm) uses the no-args constructor if it exists. I apologize for not making this distinction clear. 2. Same issue for SSO creating java.util.Date ApplicationStateManager(Impl) uses ObjectLocator.autobuild() to construct instances. Ad 2. Quote from linked documentation: The first time you access an SSO, it is created automatically. Typically, the SSO will have a public no-args constructor ... but you may inject dependencies into the SSO via its constructor, as you can with a Tapestry IoC service implementation. In this case I wanted to use Date. Maybe not some real case scenario, so let's think about shoping basket for example. It may have default no args for T5 and second one if I want to instantiate it with some products. If T5 always takes constructor with most arguments it will fail on that scenario also, meaning that I will have to check boolean variable companion exist on every page on which I wan't to use my object. In this case, use @SessionState(create = false) so the field is null when it's not in the session. and you don't need to declare a boolean variable. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- -- http://www.bodylabgym.com - a private, by appointment only, one-on-one health and fitness facility. -- http://www.ectransition.com - Quality Electronic Cigarettes at a reasonable price! -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.2] Constructor issue
Remember that you can place @Inject on the constructor that should be used if there's any ambiguity. On Tue, Oct 5, 2010 at 9:22 AM, Howard Lewis Ship hls...@gmail.com wrote: Your are correct and this has been the behavior since at least 5.1. On Tue, Oct 5, 2010 at 9:21 AM, Josh Canfield joshcanfi...@gmail.com wrote: BeanEditor (used internally for BeanEditForm) uses the no-args constructor if it exists. I apologize for not making this distinction clear. I'm looking at the 5.2 source and BeanEditor uses the BeanModel to get the instance, calls newInstance() which also uses the ObjectLocator.autobuild On Tue, Oct 5, 2010 at 8:32 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Tue, 05 Oct 2010 12:17:46 -0300, Michal Gruca michalgr...@gmail.com wrote: I must disagree. But first to clarify. I described two cases. 1. BeanEditForm that cannot instantiate my object BeanEditor (used internally for BeanEditForm) uses the no-args constructor if it exists. I apologize for not making this distinction clear. 2. Same issue for SSO creating java.util.Date ApplicationStateManager(Impl) uses ObjectLocator.autobuild() to construct instances. Ad 2. Quote from linked documentation: The first time you access an SSO, it is created automatically. Typically, the SSO will have a public no-args constructor ... but you may inject dependencies into the SSO via its constructor, as you can with a Tapestry IoC service implementation. In this case I wanted to use Date. Maybe not some real case scenario, so let's think about shoping basket for example. It may have default no args for T5 and second one if I want to instantiate it with some products. If T5 always takes constructor with most arguments it will fail on that scenario also, meaning that I will have to check boolean variable companion exist on every page on which I wan't to use my object. In this case, use @SessionState(create = false) so the field is null when it's not in the session. and you don't need to declare a boolean variable. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- -- http://www.bodylabgym.com - a private, by appointment only, one-on-one health and fitness facility. -- http://www.ectransition.com - Quality Electronic Cigarettes at a reasonable price! -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.2] Principle 1, Static Structure Dynamic Behaviour
Thank you Howard, Thank you Thiago -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-2-Principle-1-Static-Structure-Dynamic-Behaviour-tp3198357p3199978.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Injecting Tapestry Services into Spring beans
Would someone please enlighten me on how to achieve this? Tapestry 5.1 release notes state that Tapestry Services can now be injected into Spring Beans, when using the Tapestry/Spring integration library. Integration of spring beans into tapestry pages works fine, but injecting Tapestry services into spring beans only gives me a null object. I read a mailing list thread where one user had succeeded in this by using Spring's context:component-scan and then @autowired on the beans, but when I tried this I got errors No service implements the interface org.apache.tapestry5.services.Session or any other service I'm trying to inject I have not enabled legacy mode in my web.xml. Here is my web.xml ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameMy App/display-name context-param !-- The only significant configuration for Tapestry 5, this informs Tapestry of where to look for pages, components and mixins. -- param-nametapestry.app-package/param-name param-valueca.my.app/param-value /context-param context-param param-namecontextConfigLocation/param-name param-value/WEB-INF/daoContext.xml /WEB-INF/applicationContext.xml /WEB-INF/securityContext.xml/param-value /context-param filter filter-nameHibernateFilter/filter-name filter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class init-param param-namesessionFactoryBeanName/param-name param-valueassessmentSessionFactory/param-value /init-param /filter filter-mapping filter-nameHibernateFilter/filter-name url-pattern/*/url-pattern /filter-mapping filter filter-nameapp/filter-name !-- Special filter that adds in a T5 IoC module derived from the Spring WebApplicationContext. -- filter-classorg.apache.tapestry5.spring.TapestrySpringFilter/filter-class /filter filter-mapping filter-nameapp/filter-name url-pattern/*/url-pattern dispatcherFORWARD/dispatcher dispatcherREQUEST/dispatcher /filter-mapping /web-app I would really appreciate if someone could give me a heads up on where my problem might be. Thanks.
RE: [T5.2] Constructor issue
I thought you should annotate the constructor you want the BEF to use with: @Inject ... to let Tap know which constructor to use. Regards, Jim. -Original Message- From: Michal Gruca [mailto:michalgr...@gmail.com] Sent: 05 October 2010 14:09 To: users@tapestry.apache.org Subject: [T5.2] Constructor issue Hi all. While preparing small showcase app, odd problem came out. When I created domain object with two constructors (first was default NOOP, second one had two parameters string and enum, it was meant for manual initialization only) and tried to use it with beaneditform I received exception that tapestry cannot handle my object creation. After removing parametrized constructor, error disappeared. It's bit odd IMHO. Tapestry should be capable to instantiate objects that have more than one constructor. Also @SessionState behaved weirdly. I was annotating java.util.Date. Error came up if I haven't instantiate object manually. Date has default constructor so Tapestry should be fine with constructing new Date on it's own. Maybe there are some reasons for that kind of behavior, but as I see it those are bugs. Should I create jira ticket for that? Tested on tapestry 5.2.1-snapshot. Link to application sources: https://bitbucket.org/mgruca/tjug_tapestry_30.09.10/downloads (last revision or two were stripped out from additional constructors. Content may be in Polish, but code should be all in En) -- View this message in context: http://tapestry-users.832.n2.nabble.com/T5-2-Constructor-issue-tp5603058p560 3058.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Injecting Tapestry Services into Spring beans
Ok please ignore that it was just me being stupid. I got it working now. Thanks. --- On Tue, 10/5/10, Jeshurun Daniel sjeshu...@yahoo.ca wrote: From: Jeshurun Daniel sjeshu...@yahoo.ca Subject: Injecting Tapestry Services into Spring beans To: Tapestry users users@tapestry.apache.org Received: Tuesday, October 5, 2010, 1:25 PM Would someone please enlighten me on how to achieve this? Tapestry 5.1 release notes state that Tapestry Services can now be injected into Spring Beans, when using the Tapestry/Spring integration library. Integration of spring beans into tapestry pages works fine, but injecting Tapestry services into spring beans only gives me a null object. I read a mailing list thread where one user had succeeded in this by using Spring's context:component-scan and then @autowired on the beans, but when I tried this I got errors No service implements the interface org.apache.tapestry5.services.Session or any other service I'm trying to inject I have not enabled legacy mode in my web.xml. Here is my web.xml ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameMy App/display-name context-param !-- The only significant configuration for Tapestry 5, this informs Tapestry of where to look for pages, components and mixins. -- param-nametapestry.app-package/param-name param-valueca.my.app/param-value /context-param context-param param-namecontextConfigLocation/param-name param-value/WEB-INF/daoContext.xml /WEB-INF/applicationContext.xml /WEB-INF/securityContext.xml/param-value /context-param filter filter-nameHibernateFilter/filter-name filter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class init-param param-namesessionFactoryBeanName/param-name param-valueassessmentSessionFactory/param-value /init-param /filter filter-mapping filter-nameHibernateFilter/filter-name url-pattern/*/url-pattern /filter-mapping filter filter-nameapp/filter-name !-- Special filter that adds in a T5 IoC module derived from the Spring WebApplicationContext. -- filter-classorg.apache.tapestry5.spring.TapestrySpringFilter/filter-class /filter filter-mapping filter-nameapp/filter-name url-pattern/*/url-pattern dispatcherFORWARD/dispatcher dispatcherREQUEST/dispatcher /filter-mapping /web-app I would really appreciate if someone could give me a heads up on where my problem might be. Thanks.
Re: [T5.2, Google Application Engine] Can't get a method to be realized (i.e. invoke a method)
Back home 15 minutes ago, couldn't wait to try this and you are correct Howard. A jar I'm using needs commons-lang to operate. Thank you all for your time..and pardon me for such a silly mistake :) On Tue, Oct 5, 2010 at 4:55 PM, Howard Lewis Ship hls...@gmail.com wrote: Tapestry doesn't use commons-lang, but some code in your application apparently does. On Tue, Oct 5, 2010 at 5:41 AM, Muhammad Mohsen m.gelb...@gmail.com wrote: Thanks a lot. I think Haward is correct but I can't confirm as I have no access to that code at the moment. I'll make sure to get back to you about that :) It's the *commons-lang-2.1.jar* that is mussing from the class path. I thought that this is the exception thrown. Not that its not actually a ClassNotFoundException. It's just because it's called NestableRuntime* Exception* I thought that this is the exception ! Which brings one more thing. What are the basic jars needed for tapestry to operate ? And another question please (but this may change the scope of this thread i'm afraid) why doesn't eclipse copy all included libraries in my project's class path to my lib folder *web-inf\lib* automatically !? Thanks again :) On Tue, Oct 5, 2010 at 9:40 AM, Howard Lewis Ship hls...@gmail.com wrote: You'll find more information in the console log, but from the little bit you've shown me, it looks like your classpath is missing a referenced library, the one that provided class NestableRuntimeException. On Tue, Oct 5, 2010 at 12:17 AM, Muhammad Mohsen m.gelb...@gmail.com wrote: Thanks for the advice you are totally correct. But this error also occurs on jetty. I made a mistake putting GAE in the subject. The error actually happens on both GAE and local jetty. I took my development locally to speed up the development process. Thank you for your time. On Tue, Oct 5, 2010 at 12:10 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Mon, 04 Oct 2010 18:29:26 -0300, Muhammad Mohsen m.gelb...@gmail.com wrote: Hi All, Hi! I strongly suggest you to try to make your application work on Jetty or Tomcat first, specially if you're still learning Tapestry, and after that try the GAE, as it is a different environment. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Muhammad Mohsen Hussien Jr. Java Software Engineer -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Muhammad Mohsen Hussien Jr. Java Software Engineer -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Muhammad Mohsen Hussien Jr. Java Software Engineer