Early steps getting Tapestry and Hibernate working via DAO
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
Re: Early steps getting Tapestry and Hibernate working via DAO
http://tapestry.apache.org/tapestry5/tapestry-hibernate/userguide.html Course I don't even use tapestry-hibernate at all, just the tapestry spring integration to inject spring/hibernate services. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Early-steps-getting-Tapestry-and-Hibernate-working-via-DAO-tp5591178p5591251.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: Early steps getting Tapestry and Hibernate working via DAO
On Fri, 01 Oct 2010 09:40:18 -0300, Alex W. Croton acro...@linkfinancial.eu wrote: Hi, Hi! 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 :-) See http://tapestry.apache.org/tapestry5.1/tapestry-hibernate/userguide.html. ;) Cheers! -- 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: Early steps getting Tapestry and Hibernate working via DAO
Having now had two replies directing to the same page - which I've looked at _so many_ times over the last few days that I ought to have my own page counter - I'm coming to the conclusion that I must be brain dead and looking through the obvious! Thanks for the replies - I'll set a new Eclipse project up and have a play with just this code from fresh. Regards, Alex 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 :-) See http://tapestry.apache.org/tapestry5.1/tapestry-hibernate/userguide.html. ;) Cheers! -- 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: Early steps getting Tapestry and Hibernate working via DAO
I gave presentation about Tapestry yesterday. In it I included hibernate integration example, I will share that after weekend. From my observation: make sure that You have both hibernate libraries in Your classpath. Double check did You annotated AppModule with @Submodule(HibernateModule.class). That are two related points that gave me a lot of trouble. Mainly because of eclipse weakest side: maven integration. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Early-steps-getting-Tapestry-and-Hibernate-working-via-DAO-tp5591178p5591360.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: Early steps getting Tapestry and Hibernate working via DAO
So, working through the code; I've built my own Person entity (and created it in the db) and have got the first stage of the example code working - I'm now getting to the 'Commiting Changes' part of the example. This has the following: @InjectPage Private PersonIndex personIndex; So ... what is this class (i.e. PersonIndex) and what does it need to do? It's obviously pretty critical, as it is the return from the onSuccess() method. Is this part of a larger example that I've not stumbled on? Sorry if this is totally obvious, but I'm just not getting it - and hey ... I haven't even got on to the DAO bit of the code yet! Regards, Alex Having now had two replies directing to the same page - which I've looked at _so many_ times over the last few days that I ought to have my own page counter - I'm coming to the conclusion that I must be brain dead and looking through the obvious! Thanks for the replies - I'll set a new Eclipse project up and have a play with just this code from fresh. See http://tapestry.apache.org/tapestry5.1/tapestry- hibernate/userguide.html. ;)
Re: RE: Early steps getting Tapestry and Hibernate working via DAO
PersonIndex is a page, probably listing all the people... On Oct 1, 2010 8:51 AM, Alex W. Croton acro...@linkfinancial.eu wrote: So, working through the code; I've built my own Person entity (and created it in the db) and have got the first stage of the example code working - I'm now getting to the 'Commiting Changes' part of the example. This has the following: @InjectPage Private PersonIndex personIndex; So ... what is this class (i.e. PersonIndex) and what does it need to do? It's obviously pretty critical, as it is the return from the onSuccess() method. Is this part of a larger example that I've not stumbled on? Sorry if this is totally obvious, but I'm just not getting it - and hey ... I haven't even got on to the DAO bit of the code yet! Regards, Alex Having now had two replies directing to the same page - which I've looked at _so many_ times over the last few days that I ought to have my own page counter - I'm coming to the conclusion that I must be brain dead and looking through the obvious! Thanks for the replies - I'll set a new Eclipse project up and have a play with just this code from fresh. See http://tapestry.apache.org/tapestry5.1/tapestry- hibernate/userguide.html. ;)
RE: RE: Early steps getting Tapestry and Hibernate working via DAO
Doh! Obviously looking for complexity ... and ignoring what the return value of onSuccess() is used for. Alex -Original Message- From: Josh Canfield [mailto:joshcanfi...@gmail.com] Sent: 01 October 2010 17:18 To: Tapestry users Subject: Re: RE: Early steps getting Tapestry and Hibernate working via DAO PersonIndex is a page, probably listing all the people... On Oct 1, 2010 8:51 AM, Alex W. Croton acro...@linkfinancial.eu wrote: So, working through the code; I've built my own Person entity (and created it in the db) and have got the first stage of the example code working - I'm now getting to the 'Commiting Changes' part of the example. This has the following: @InjectPage Private PersonIndex personIndex; So ... what is this class (i.e. PersonIndex) and what does it need to do? It's obviously pretty critical, as it is the return from the onSuccess() method. Is this part of a larger example that I've not stumbled on? Sorry if this is totally obvious, but I'm just not getting it - and hey ... I haven't even got on to the DAO bit of the code yet! Regards, Alex Having now had two replies directing to the same page - which I've looked at _so many_ times over the last few days that I ought to have my own page counter - I'm coming to the conclusion that I must be brain dead and looking through the obvious! Thanks for the replies - I'll set a new Eclipse project up and have a play with just this code from fresh. See http://tapestry.apache.org/tapestry5.1/tapestry- hibernate/userguide.html. ;) - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Early steps getting Tapestry and Hibernate working via DAO
That seems odd, you shouldn't need to use @SubModule; the necessary modules are automatically loaded if on the classpath. On Fri, Oct 1, 2010 at 6:31 AM, Michal Gruca michalgr...@gmail.com wrote: I gave presentation about Tapestry yesterday. In it I included hibernate integration example, I will share that after weekend. From my observation: make sure that You have both hibernate libraries in Your classpath. Double check did You annotated AppModule with @Submodule(HibernateModule.class). That are two related points that gave me a lot of trouble. Mainly because of eclipse weakest side: maven integration. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Early-steps-getting-Tapestry-and-Hibernate-working-via-DAO-tp5591178p5591360.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 -- 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: absolute asset url
What is your use case? I need to have absolute URL's for an application and I contribute an override for the AssetPathConstructor. 2010/9/30 Christian Koller christian.kol...@net-m.ch Hi all In a tapestry page i have: @Inject @Property @Path(context:/img/logo.gif) private Asset logo; If I print the logo I can see: /assets/7f46afe50e4fd75d/ctx/img/logo.gif What I need is an absolute url from the logo (e.g: http://localhost:8080/assets/7f46afe50e4fd75d/ctx/img/logo.gif). Is that possible without to use the request. I mean is there a better way as to fetch the host and port from the request and then to concatenate the stuff. Thx chris -- Jonathan Barker ITStrategic