RE: [ADV] Upcoming Tapestry Training: London, Paris
Looking forward to it. SkillsMatter is in a new building too. -Original Message- From: Howard Lewis Ship [mailto:hls...@gmail.com] Sent: 22 December 2009 18:03 To: Tapestry users Subject: [ADV] Upcoming Tapestry Training: London, Paris I'll be doing two trainings with SkillsMatter (http://skillsmatter.com) in London (Feb 10 2010) and in Paris (Feb 15 2010). This is my standard three day Tapestry course, as described on my web page (http://howardlewisship.com/training.html) delivered at a much better price than I can normally offer ... especially if you act fast enough to get the 2-for-1 training in London! http://skillsmatter.com/course-details/java-jee/tapestry-web-development I teach Tapestry as a hands-on workshop, oriented towards Tapestry (and Java web development) newbies. The class has a proven track record for getting people up-to speed in Tapestry 5 quickly. This represents one of my many long-term goals for Tapestry: to offer public enrollment training and grow the size of the T5 community. If you are in the London or Paris areas, this is a great chance to learn Tapestry from the source. -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: Discussion
I don't agree with the OP that the ServerSide discussion shows Tapestry "has lost the battle" - two posters state they don't want to see Tapestry mentioned. That's all there is. However, I can't agree with you Thiago. The old saying is "if you say it enough times then people will believe it is true". If you are just going to stand by and let "trolls" post bad things about Tapestry unchallenged then they have won the argument - regardless of how bad their argument may be and how incorrect their views may be. After all, someone pitching up and wanting a framework will read what they've written and believe it. Who is to say these anti-Tapestry people are wrong? Not you - because you won't counter their arguments! :-) Sure - don't feed the trolls. But all that is necessary is to say something positive; not engage them in an argument. Merry Xmas everyone. -Original Message- From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] Sent: 22 December 2009 15:26 To: Tapestry users Subject: Re: Discussion Em Tue, 22 Dec 2009 12:45:20 -0200, Banchi Liko escreveu: > Hi guys, Hi! > There is a discussion going on here > http://www.theserverside.com/news/thread.tss?thread_id=58858 and seems > like Tapestry ihas already been ruled out as a viable and serious web > framework. TheServerSide comments has too many trolls to have a good, reasonable discussion there. > Wicket seems to be the favorite. Some people who bother to post there like Wicket. Most people who like Tapestry, maybe all of them, don't bother to post there. > I'm sad Tapestry has lost the battle and afraid it might die soon. Please source or explain your statements or you'll be treated like a troll here. > Please go and contribute and let your voice be > heard before Tapestry dies a horrible death. No, thank you. Posting there will not change Tapestry's fate. Using it, exchanging ideas in the mailing lists and contributing code will (and already is). -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Discussion
Em Tue, 22 Dec 2009 19:53:46 -0200, Gerald Bauer escreveu: Robert, You need to be a Tapestry evangelist as well. Remember, Howard wants to make money- he wants to strike it rich. Please co-operate to make his dream come true. Don't be a free loader, man! Gerald, I hope you're being sarcastic. Otherwise, as we say here in Brazil, you've just missed a good opportunity to remain silent. :) -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Discussion
Robert, You need to be a Tapestry evangelist as well. Remember, Howard wants to make money- he wants to strike it rich. Please co-operate to make his dream come true. Don't be a free loader, man! On Tue, Dec 22, 2009 at 10:28 PM, Robert Zeigler wrote: > I like to think that's because the Tapestry users are using Tapestry to be > productive, instead of just talking about it making them productive. ;) > But we could all certainly step our publicity up a bit. > > Cheers, > > Robert > > > On Dec 22, 2009, at 12/221:21 PM , Howard Lewis Ship wrote: > > Exactly ... I have yet to figure out why the Tapestry community as a >> whole is somewhat passive whereas other communities (such as Wicket >> and Rails) are extremely vocal. Out in the larger world, the best >> impression of Tapestry comes not from its creators, but from its >> users, and the users do not talk enough about Tapestry outside of >> these mailing lists. More blogging, please! >> >> On Tue, Dec 22, 2009 at 10:06 AM, Vangel V. Ajanovski >> wrote: >> >>> On 22.12.2009 17:41, Alfonso Quiroga wrote: >>> I agree with Thiago, but I've never used Wicket. I've used tapestry5 and I really like it. Both frameworks are component-based, maybe some day I'll try wicket. But if tap5 works for me... why do I have to discuss in server-side? I prefer to share my solutions and workarounds in this list, where there are people really interested in T5. I agree on the discussions. >>> >>> I think that (if needed) best promotion of Tapestry would be if everyone >>> that is actually using it (and liking it) created a post somewhere or >>> blogged about the reasons for choosing Tapestry and preferable to link >>> such pages from the central documentation. >>> >>> The thing is that people who are new to all this, have to look somewhere >>> and decide which technology to choose. There are not many comparisons >>> where Tapestry is mentioned and most of them are not really favourable >>> and mainly point out that Tapestry is too hard to learn. >>> ... It is not. >>> >>> I was in this position two years ago, I had experience with Oracle Web >>> PL/SQL and APEX, JSP, JSF, ASP and PHP and I am creating web sites from >>> 1996 and I had the responsibility to choose something better. Even with >>> such experience and even I was ready to learn from scratch it was hard >>> to choose the technology for the next task. I decided to start with >>> Tapestry bacause it was supposedly the hardest :)... >>> It was not and it solved many problems I had with the others. >>> >>> >>> >> >> >> -- >> Howard M. Lewis Ship >> >> Creator of Apache Tapestry >> >> The source for Tapestry training, mentoring and support. Contact me to >> learn how I can get you up and productive in Tapestry fast! >> >> (971) 678-5210 >> http://howardlewisship.com >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> > > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: Discussion
I like to think that's because the Tapestry users are using Tapestry to be productive, instead of just talking about it making them productive. ;) But we could all certainly step our publicity up a bit. Cheers, Robert On Dec 22, 2009, at 12/221:21 PM , Howard Lewis Ship wrote: Exactly ... I have yet to figure out why the Tapestry community as a whole is somewhat passive whereas other communities (such as Wicket and Rails) are extremely vocal. Out in the larger world, the best impression of Tapestry comes not from its creators, but from its users, and the users do not talk enough about Tapestry outside of these mailing lists. More blogging, please! On Tue, Dec 22, 2009 at 10:06 AM, Vangel V. Ajanovski wrote: On 22.12.2009 17:41, Alfonso Quiroga wrote: I agree with Thiago, but I've never used Wicket. I've used tapestry5 and I really like it. Both frameworks are component-based, maybe some day I'll try wicket. But if tap5 works for me... why do I have to discuss in server-side? I prefer to share my solutions and workarounds in this list, where there are people really interested in T5. I agree on the discussions. I think that (if needed) best promotion of Tapestry would be if everyone that is actually using it (and liking it) created a post somewhere or blogged about the reasons for choosing Tapestry and preferable to link such pages from the central documentation. The thing is that people who are new to all this, have to look somewhere and decide which technology to choose. There are not many comparisons where Tapestry is mentioned and most of them are not really favourable and mainly point out that Tapestry is too hard to learn. ... It is not. I was in this position two years ago, I had experience with Oracle Web PL/SQL and APEX, JSP, JSF, ASP and PHP and I am creating web sites from 1996 and I had the responsibility to choose something better. Even with such experience and even I was ready to learn from scratch it was hard to choose the technology for the next task. I decided to start with Tapestry bacause it was supposedly the hardest :)... It was not and it solved many problems I had with the others. -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: JSON in Tapestry
anywhere has code example for that? On Wed, Dec 23, 2009 at 1:23 AM, Howard Lewis Ship wrote: > ... and all of this is easier in Tapestry 5, by design. > > On Tue, Dec 22, 2009 at 5:06 AM, Andreas Andreou wrote: >> I'm not sure if IJSONRender will work with pages, but i know it works with >> components. >> >> The trick is then to generate a url that will rerender that component... >> similar >> to a directlink url that defines the updateComponents parameter accordingly >> >> On Tue, Dec 22, 2009 at 10:35, EveningSun wrote: >>> >>> I'm using Tapestry 4.1.6 by the way. >>> -- >>> View this message in context: >>> http://old.nabble.com/JSON-in-Tapestry-tp26885074p26885256.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 >>> >>> >> >> >> >> -- >> Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr >> Tapestry / Tacos developer >> Open Source / JEE Consulting >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > > > -- > 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 > > -- cleverpig(Dan) Location: Beijing Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China Zipcode: 100031 MSN: great_liu...@hotmail.com QQ: 149291732 Skype: cleverpigatmatrix Facebook ID:cleverpig Blog: www.cleverpig.name Tags: del.icio.us/cleverpig Twitter: twitter.com/cleverpig 新浪微博: t.sina.com.cn/cleverpig Organization: www.beijing-open-party.org or...@facebook: http://www.facebook.com/group.php?gid=8159558294 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Hibernate session should be cleared/flushed between lifecycle methods?
Rather than flushing and or clearing the full session, you can evict that particular instance. https://www.hibernate.org/hib_docs/v3/api/org/hibernate/Session.html#evict%28java.lang.Object%29 On Fri, Dec 18, 2009 at 2:40 PM, Everton Agner wrote: > Hi, > > I had a weird situation here and I want to know if it's really a "bug" of > tapestry hibernate integration or not. > > I have a Edit Page. In my onValidate() method, I have already > instantiated a "current" object (que object I'm editing), and I call a > BO method for validation. That method load a List of objects (the same > Type of current, and including itself), and does the validation. > > So, In my onSuccess() method, I update my "current" object on Session. But, > I get a: > > "a different object with the same identifier value was already associated > with the session:..." > > That's because on onValidate() method, I called a BO method that loaded > a List of objects (including the "current" object), and it was lost in > memory. So, hibernate can't update it's session data. > > My way out of this was calling session.clear() and session.flush() after > the BO validation method. > > So, Tapestry should do that between lifecycle methods to avoid these > kind of Runtime issues? I don't think it's necessarily a Developer > matter (as a framework user). > > Thanks, > > Everton > > > > > > > Veja quais são os assuntos do momento no Yahoo! +Buscados > http://br.maisbuscados.yahoo.com >
Re: Discussion
Exactly ... I have yet to figure out why the Tapestry community as a whole is somewhat passive whereas other communities (such as Wicket and Rails) are extremely vocal. Out in the larger world, the best impression of Tapestry comes not from its creators, but from its users, and the users do not talk enough about Tapestry outside of these mailing lists. More blogging, please! On Tue, Dec 22, 2009 at 10:06 AM, Vangel V. Ajanovski wrote: > On 22.12.2009 17:41, Alfonso Quiroga wrote: >> I agree with Thiago, but I've never used Wicket. I've used tapestry5 >> and I really like it. Both frameworks are component-based, maybe some >> day I'll try wicket. But if tap5 works for me... why do I have to >> discuss in server-side? I prefer to share my solutions and workarounds >> in this list, where there are people really interested in T5. >> > I agree on the discussions. > > I think that (if needed) best promotion of Tapestry would be if everyone > that is actually using it (and liking it) created a post somewhere or > blogged about the reasons for choosing Tapestry and preferable to link > such pages from the central documentation. > > The thing is that people who are new to all this, have to look somewhere > and decide which technology to choose. There are not many comparisons > where Tapestry is mentioned and most of them are not really favourable > and mainly point out that Tapestry is too hard to learn. > ... It is not. > > I was in this position two years ago, I had experience with Oracle Web > PL/SQL and APEX, JSP, JSF, ASP and PHP and I am creating web sites from > 1996 and I had the responsibility to choose something better. Even with > such experience and even I was ready to learn from scratch it was hard > to choose the technology for the next task. I decided to start with > Tapestry bacause it was supposedly the hardest :)... > It was not and it solved many problems I had with the others. > > -- 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: Discussion
On 22.12.2009 17:41, Alfonso Quiroga wrote: > I agree with Thiago, but I've never used Wicket. I've used tapestry5 > and I really like it. Both frameworks are component-based, maybe some > day I'll try wicket. But if tap5 works for me... why do I have to > discuss in server-side? I prefer to share my solutions and workarounds > in this list, where there are people really interested in T5. > I agree on the discussions. I think that (if needed) best promotion of Tapestry would be if everyone that is actually using it (and liking it) created a post somewhere or blogged about the reasons for choosing Tapestry and preferable to link such pages from the central documentation. The thing is that people who are new to all this, have to look somewhere and decide which technology to choose. There are not many comparisons where Tapestry is mentioned and most of them are not really favourable and mainly point out that Tapestry is too hard to learn. ... It is not. I was in this position two years ago, I had experience with Oracle Web PL/SQL and APEX, JSP, JSF, ASP and PHP and I am creating web sites from 1996 and I had the responsibility to choose something better. Even with such experience and even I was ready to learn from scratch it was hard to choose the technology for the next task. I decided to start with Tapestry bacause it was supposedly the hardest :)... It was not and it solved many problems I had with the others. smime.p7s Description: S/MIME Cryptographic Signature
Re: JSON in Tapestry
... and all of this is easier in Tapestry 5, by design. On Tue, Dec 22, 2009 at 5:06 AM, Andreas Andreou wrote: > I'm not sure if IJSONRender will work with pages, but i know it works with > components. > > The trick is then to generate a url that will rerender that component... > similar > to a directlink url that defines the updateComponents parameter accordingly > > On Tue, Dec 22, 2009 at 10:35, EveningSun wrote: >> >> I'm using Tapestry 4.1.6 by the way. >> -- >> View this message in context: >> http://old.nabble.com/JSON-in-Tapestry-tp26885074p26885256.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 >> >> > > > > -- > Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr > Tapestry / Tacos developer > Open Source / JEE Consulting > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- 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: Discussion
I agree with Thiago, but I've never used Wicket. I've used tapestry5 and I really like it. Both frameworks are component-based, maybe some day I'll try wicket. But if tap5 works for me... why do I have to discuss in server-side? I prefer to share my solutions and workarounds in this list, where there are people really interested in T5. Ah! greeting to Thiago from Messi's country, :) :) On Tue, Dec 22, 2009 at 12:25 PM, Thiago H. de Paula Figueiredo wrote: > Em Tue, 22 Dec 2009 12:45:20 -0200, Banchi Liko > escreveu: > >> Hi guys, > > Hi! > >> There is a discussion going on here >> http://www.theserverside.com/news/thread.tss?thread_id=58858 and seems >> like Tapestry ihas already been ruled out as a viable and serious web >> framework. > > TheServerSide comments has too many trolls to have a good, reasonable > discussion there. > >> Wicket seems to be the favorite. > > Some people who bother to post there like Wicket. Most people who like > Tapestry, maybe all of them, don't bother to post there. > >> I'm sad Tapestry has lost the battle and afraid it might die soon. > > Please source or explain your statements or you'll be treated like a troll > here. > >> Please go and contribute and let your voice be >> heard before Tapestry dies a horrible death. > > No, thank you. Posting there will not change Tapestry's fate. Using it, > exchanging ideas in the mailing lists and contributing code will (and > already is). > > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and > instructor > Owner, software architect and developer, Ars Machina Tecnologia da > Informação Ltda. > http://www.arsmachina.com.br > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Discussion
Em Tue, 22 Dec 2009 12:45:20 -0200, Banchi Liko escreveu: Hi guys, Hi! There is a discussion going on here http://www.theserverside.com/news/thread.tss?thread_id=58858 and seems like Tapestry ihas already been ruled out as a viable and serious web framework. TheServerSide comments has too many trolls to have a good, reasonable discussion there. Wicket seems to be the favorite. Some people who bother to post there like Wicket. Most people who like Tapestry, maybe all of them, don't bother to post there. I'm sad Tapestry has lost the battle and afraid it might die soon. Please source or explain your statements or you'll be treated like a troll here. Please go and contribute and let your voice be heard before Tapestry dies a horrible death. No, thank you. Posting there will not change Tapestry's fate. Using it, exchanging ideas in the mailing lists and contributing code will (and already is). -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Discussion
Hi guys, There is a discussion going on here http://www.theserverside.com/news/thread.tss?thread_id=58858 and seems like Tapestry ihas already been ruled out as a viable and serious web framework. Wicket seems to be the favorite. I'm sad Tapestry has lost the battle and afraid it might die soon. Please go and contribute and let your voice be heard before Tapestry dies a horrible death. Banchi
Re: Help with using DWR with Tapestry
No probs. To verify that the TapestryFilter is doing it's job, try to @Inject RequestGlobals into your bean. Cheers, Lance. 2009/12/22 Ashwanth Kumar > Sure, > > Thanks a lot! I'll post my code, once i get it working! > > - Ashwanth Kumar > > On Tue, Dec 22, 2009 at 5:32 PM, Lance Java >wrote: > > > The tapestry creator will look something like... > > > > public class TapestryCreator extends AbstractCreator { > >private String beanName; > > > >public String getBeanName() { > >return beanName; > >} > > > >// set by config in dwr.xml (see my prev email) > >public void setBeanName(String beanName) { > >this.beanName = beanName; > >} > > > > public Object getInstance() { > > // Use this instead of WebContextFactory (suggested in my prev > email) > > ServletContext servletContext = > > org.directwebremoting.ServerContextFactory.get().getServletContext(); > > Object bean = getTapestryBean(servletContext, getbeanName); > > } > > > > protected Object getTapestryBean(ServletContext servletContext, String > > beanName) { > > // look up the bean from the tapestry registry > > } > > > > public Class getType() { > > return getInstance().getClass(); > > } > > } > > > > You will then use a dwr config similar to my previous email to define the > > TapestryCreator and map it to a named service in the tapestry registry. > As > > I > > said, please download the DWR source and take a look at the SpringCreator > > for inspiration. > > > > 2009/12/22 Ashwanth Kumar > > > > > Can u provide an example! I dont find any good example on the site! > > > > > > - Ashwanth Kumar > > > > > > On Tue, Dec 22, 2009 at 5:10 PM, Lance Java > > >wrote: > > > > > > > Ah... great. > > > > > > > > The TapestryCreator can access the servlet context using: > > > > org.directwebremoting.WebContextFactory.get().getServletContext(); > > > > > > > > http://directwebremoting.org/dwr/server/javaapi.html > > > > > > > > 2009/12/22 Thiago H. de Paula Figueiredo > > > > > > > > > Em Tue, 22 Dec 2009 09:27:26 -0200, Lance Java < > > > > lance.j...@googlemail.com> > > > > > escreveu: > > > > > > > > > > > > > > > One more thing to note is that DWR supports ajax filters which are > > > > >> basically interceptors on DWR services. You may want to duplicate > > some > > > > of > > > > >> the > > > > >> TapestryFilter's functionality in an AjaxFilter. > > > > >> > > > > > > > > > > There's no need to do that. TapestryFilter puts the Registry in the > > > > servlet > > > > > context under the org.apache.tapestry5.application-registry > > attribute. > > > > Then > > > > > you can get the HibernateSessionManager and get a Session through > its > > > > > getSession() method. I haven't tested it, but that's what I would > > try. > > > > > > > > > > -- > > > > > Thiago H. de Paula Figueiredo > > > > > Independent Java, Apache Tapestry 5 and Hibernate consultant, > > > developer, > > > > > and instructor > > > > > Owner, software architect and developer, Ars Machina Tecnologia da > > > > > Informação Ltda. > > > > > http://www.arsmachina.com.br > > > > > > > > > > > > > > > > - > > > > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > > > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > > > > > > > > > > > > > > > > >
Re: JSON in Tapestry
I'm not sure if IJSONRender will work with pages, but i know it works with components. The trick is then to generate a url that will rerender that component... similar to a directlink url that defines the updateComponents parameter accordingly On Tue, Dec 22, 2009 at 10:35, EveningSun wrote: > > I'm using Tapestry 4.1.6 by the way. > -- > View this message in context: > http://old.nabble.com/JSON-in-Tapestry-tp26885074p26885256.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 > > -- Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [newbie] Intercepting client-side form validation/submission
On Tue, Dec 22, 2009 at 6:14 PM, Kenneth CH, LEE wrote: > Hi there, > Hello, > > Is there any existing facilities to trigger some custom Javascript > code _after_ validating the form? > > I'm now doing it with some Javascript tricks: > === > > ... > > Event.observe(window, "load", function() { >var f = $("myform").onsubmit; >$("myform").onsubmit = function(e) { >return f(e) && customFunction(); >}; > }); > > > ... > > function customFunction() { > //return true to submit > } > > === > When exactly do u submit ur form?? > Notice that the custom function is only called _after_ validation > _and_ only if it was successful. > Well, if you want to do a custom JS, u can do a Zone Update of the Form, then observe Tapestry.ZONE_UPDATED_EVENT, for doing some some custom JS! But, that happens only after form submission and not before that! HTH - Ashwanth Kumar
[newbie] Intercepting client-side form validation/submission
Hi there, Is there any existing facilities to trigger some custom Javascript code _after_ validating the form? I'm now doing it with some Javascript tricks: === ... Event.observe(window, "load", function() { var f = $("myform").onsubmit; $("myform").onsubmit = function(e) { return f(e) && customFunction(); }; }); ... function customFunction() { //return true to submit } === Notice that the custom function is only called _after_ validation _and_ only if it was successful. Since this is all boiler-plate I'm going to make it a component that can be nested within , but before that I want to make sure I'm not reinventing something that already exist. Or just tell me if I'm going the wrong way and the _proper_ way to do it. Your input is much appreciated. Kenneth - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Help with using DWR with Tapestry
Sure, Thanks a lot! I'll post my code, once i get it working! - Ashwanth Kumar On Tue, Dec 22, 2009 at 5:32 PM, Lance Java wrote: > The tapestry creator will look something like... > > public class TapestryCreator extends AbstractCreator { >private String beanName; > >public String getBeanName() { >return beanName; >} > >// set by config in dwr.xml (see my prev email) >public void setBeanName(String beanName) { >this.beanName = beanName; >} > > public Object getInstance() { > // Use this instead of WebContextFactory (suggested in my prev email) > ServletContext servletContext = > org.directwebremoting.ServerContextFactory.get().getServletContext(); > Object bean = getTapestryBean(servletContext, getbeanName); > } > > protected Object getTapestryBean(ServletContext servletContext, String > beanName) { > // look up the bean from the tapestry registry > } > > public Class getType() { > return getInstance().getClass(); > } > } > > You will then use a dwr config similar to my previous email to define the > TapestryCreator and map it to a named service in the tapestry registry. As > I > said, please download the DWR source and take a look at the SpringCreator > for inspiration. > > 2009/12/22 Ashwanth Kumar > > > Can u provide an example! I dont find any good example on the site! > > > > - Ashwanth Kumar > > > > On Tue, Dec 22, 2009 at 5:10 PM, Lance Java > >wrote: > > > > > Ah... great. > > > > > > The TapestryCreator can access the servlet context using: > > > org.directwebremoting.WebContextFactory.get().getServletContext(); > > > > > > http://directwebremoting.org/dwr/server/javaapi.html > > > > > > 2009/12/22 Thiago H. de Paula Figueiredo > > > > > > > Em Tue, 22 Dec 2009 09:27:26 -0200, Lance Java < > > > lance.j...@googlemail.com> > > > > escreveu: > > > > > > > > > > > > One more thing to note is that DWR supports ajax filters which are > > > >> basically interceptors on DWR services. You may want to duplicate > some > > > of > > > >> the > > > >> TapestryFilter's functionality in an AjaxFilter. > > > >> > > > > > > > > There's no need to do that. TapestryFilter puts the Registry in the > > > servlet > > > > context under the org.apache.tapestry5.application-registry > attribute. > > > Then > > > > you can get the HibernateSessionManager and get a Session through its > > > > getSession() method. I haven't tested it, but that's what I would > try. > > > > > > > > -- > > > > Thiago H. de Paula Figueiredo > > > > Independent Java, Apache Tapestry 5 and Hibernate consultant, > > developer, > > > > and instructor > > > > Owner, software architect and developer, Ars Machina Tecnologia da > > > > Informação Ltda. > > > > http://www.arsmachina.com.br > > > > > > > > > > > > - > > > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > > > > > > > > > > >
Re: Help with using DWR with Tapestry
The tapestry creator will look something like... public class TapestryCreator extends AbstractCreator { private String beanName; public String getBeanName() { return beanName; } // set by config in dwr.xml (see my prev email) public void setBeanName(String beanName) { this.beanName = beanName; } public Object getInstance() { // Use this instead of WebContextFactory (suggested in my prev email) ServletContext servletContext = org.directwebremoting.ServerContextFactory.get().getServletContext(); Object bean = getTapestryBean(servletContext, getbeanName); } protected Object getTapestryBean(ServletContext servletContext, String beanName) { // look up the bean from the tapestry registry } public Class getType() { return getInstance().getClass(); } } You will then use a dwr config similar to my previous email to define the TapestryCreator and map it to a named service in the tapestry registry. As I said, please download the DWR source and take a look at the SpringCreator for inspiration. 2009/12/22 Ashwanth Kumar > Can u provide an example! I dont find any good example on the site! > > - Ashwanth Kumar > > On Tue, Dec 22, 2009 at 5:10 PM, Lance Java >wrote: > > > Ah... great. > > > > The TapestryCreator can access the servlet context using: > > org.directwebremoting.WebContextFactory.get().getServletContext(); > > > > http://directwebremoting.org/dwr/server/javaapi.html > > > > 2009/12/22 Thiago H. de Paula Figueiredo > > > > > Em Tue, 22 Dec 2009 09:27:26 -0200, Lance Java < > > lance.j...@googlemail.com> > > > escreveu: > > > > > > > > > One more thing to note is that DWR supports ajax filters which are > > >> basically interceptors on DWR services. You may want to duplicate some > > of > > >> the > > >> TapestryFilter's functionality in an AjaxFilter. > > >> > > > > > > There's no need to do that. TapestryFilter puts the Registry in the > > servlet > > > context under the org.apache.tapestry5.application-registry attribute. > > Then > > > you can get the HibernateSessionManager and get a Session through its > > > getSession() method. I haven't tested it, but that's what I would try. > > > > > > -- > > > Thiago H. de Paula Figueiredo > > > Independent Java, Apache Tapestry 5 and Hibernate consultant, > developer, > > > and instructor > > > Owner, software architect and developer, Ars Machina Tecnologia da > > > Informação Ltda. > > > http://www.arsmachina.com.br > > > > > > > > > - > > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > > > > > >
Re: Help with using DWR with Tapestry
Can u provide an example! I dont find any good example on the site! - Ashwanth Kumar On Tue, Dec 22, 2009 at 5:10 PM, Lance Java wrote: > Ah... great. > > The TapestryCreator can access the servlet context using: > org.directwebremoting.WebContextFactory.get().getServletContext(); > > http://directwebremoting.org/dwr/server/javaapi.html > > 2009/12/22 Thiago H. de Paula Figueiredo > > > Em Tue, 22 Dec 2009 09:27:26 -0200, Lance Java < > lance.j...@googlemail.com> > > escreveu: > > > > > > One more thing to note is that DWR supports ajax filters which are > >> basically interceptors on DWR services. You may want to duplicate some > of > >> the > >> TapestryFilter's functionality in an AjaxFilter. > >> > > > > There's no need to do that. TapestryFilter puts the Registry in the > servlet > > context under the org.apache.tapestry5.application-registry attribute. > Then > > you can get the HibernateSessionManager and get a Session through its > > getSession() method. I haven't tested it, but that's what I would try. > > > > -- > > Thiago H. de Paula Figueiredo > > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, > > and instructor > > Owner, software architect and developer, Ars Machina Tecnologia da > > Informação Ltda. > > http://www.arsmachina.com.br > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > >
Re: Help with using DWR with Tapestry
Ah... great. The TapestryCreator can access the servlet context using: org.directwebremoting.WebContextFactory.get().getServletContext(); http://directwebremoting.org/dwr/server/javaapi.html 2009/12/22 Thiago H. de Paula Figueiredo > Em Tue, 22 Dec 2009 09:27:26 -0200, Lance Java > escreveu: > > > One more thing to note is that DWR supports ajax filters which are >> basically interceptors on DWR services. You may want to duplicate some of >> the >> TapestryFilter's functionality in an AjaxFilter. >> > > There's no need to do that. TapestryFilter puts the Registry in the servlet > context under the org.apache.tapestry5.application-registry attribute. Then > you can get the HibernateSessionManager and get a Session through its > getSession() method. I haven't tested it, but that's what I would try. > > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, > and instructor > Owner, software architect and developer, Ars Machina Tecnologia da > Informação Ltda. > http://www.arsmachina.com.br > > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: Help with using DWR with Tapestry
Em Tue, 22 Dec 2009 09:27:26 -0200, Lance Java escreveu: One more thing to note is that DWR supports ajax filters which are basically interceptors on DWR services. You may want to duplicate some of the TapestryFilter's functionality in an AjaxFilter. There's no need to do that. TapestryFilter puts the Registry in the servlet context under the org.apache.tapestry5.application-registry attribute. Then you can get the HibernateSessionManager and get a Session through its getSession() method. I haven't tested it, but that's what I would try. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Help with using DWR with Tapestry
One more thing to note is that DWR supports ajax filters which are basically interceptors on DWR services. You may want to duplicate some of the TapestryFilter's functionality in an AjaxFilter. http://directwebremoting.org/dwr/server/dwrxml/filters.html 2009/12/22 Lance Java > For a bit more info your dwr.xml might look like this: > > > > > > > > > > > > > Perhaps some of the tapestry gurus can help out a bit more here. For > normal DWR usage in tapestry, you disable the tapestry filter for /dwr/*. It > seems that you might want a bit of the tapestry filter's functionality but > not all. For example injecting the request / response / session and creating > a hibernate session. > > If you come up with a working solution, please post it back to the DWR > user's list and we'll include it in the project. > > Cheers, > Lance. > > 2009/12/22 Lance Java > > You might like to take this discussion onto the dwr user's list. I think >> it might involve writing a TapestryCreator which is able to look up services >> from the tapestry registry. Please download the dwr source and have a look >> at the SpringCreator for inspiration. >> >> Cheers, >> Lance. >> >> 2009/12/21 Ashwanth Kumar >> >> Hello, >>> >>> In my project, i would like to use DWR along with Tapestry! But i've a >>> probelm. Its like i need to access the DB, i use Hibernate with Tapestry. >>> In >>> my class i've: >>> >>> @Inject >>> private Session _session; >>> >>> when i access this class from DWR, Tapestry doesn't interfere at all. >>> But, >>> i'm getting a null pointer exception where i first start using the >>> Session. >>> How and what should be done for this? >>> >>> - Ashwanth Kumar >>> >> >> >
Re: Help with using DWR with Tapestry
For a bit more info your dwr.xml might look like this: Perhaps some of the tapestry gurus can help out a bit more here. For normal DWR usage in tapestry, you disable the tapestry filter for /dwr/*. It seems that you might want a bit of the tapestry filter's functionality but not all. For example injecting the request / response / session and creating a hibernate session. If you come up with a working solution, please post it back to the DWR user's list and we'll include it in the project. Cheers, Lance. 2009/12/22 Lance Java > You might like to take this discussion onto the dwr user's list. I think it > might involve writing a TapestryCreator which is able to look up services > from the tapestry registry. Please download the dwr source and have a look > at the SpringCreator for inspiration. > > Cheers, > Lance. > > 2009/12/21 Ashwanth Kumar > > Hello, >> >> In my project, i would like to use DWR along with Tapestry! But i've a >> probelm. Its like i need to access the DB, i use Hibernate with Tapestry. >> In >> my class i've: >> >> @Inject >> private Session _session; >> >> when i access this class from DWR, Tapestry doesn't interfere at all. But, >> i'm getting a null pointer exception where i first start using the >> Session. >> How and what should be done for this? >> >> - Ashwanth Kumar >> > >
Re: Help with using DWR with Tapestry
You might like to take this discussion onto the dwr user's list. I think it might involve writing a TapestryCreator which is able to look up services from the tapestry registry. Please download the dwr source and have a look at the SpringCreator for inspiration. Cheers, Lance. 2009/12/21 Ashwanth Kumar > Hello, > > In my project, i would like to use DWR along with Tapestry! But i've a > probelm. Its like i need to access the DB, i use Hibernate with Tapestry. > In > my class i've: > > @Inject > private Session _session; > > when i access this class from DWR, Tapestry doesn't interfere at all. But, > i'm getting a null pointer exception where i first start using the Session. > How and what should be done for this? > > - Ashwanth Kumar >
Re: Help with using DWR with Tapestry
I've a doubt, how will the Tapestry's @SessionState work with DWR ah?? And here by Session i mean Hibernate's Session instance we use in Tapestry for accessing it! - Ashwanth On Tue, Dec 22, 2009 at 1:14 PM, Peter Stavrinides < p.stavrini...@albourne.com> wrote: > What is Session? surely you should be using an SSO, and not a singleton > service? i.e.: > > @SessionState > private Session _session; > > -- > If you are not an intended recipient of this e-mail, please notify the > sender, delete it and do not read, act upon, print, disclose, copy, retain > or redistribute it. Please visit http://www.albourne.com/email.html for > important additional terms relating to this e-mail. > > - Original Message - > From: "Ashwanth Kumar" > To: "Tapestry users" > Sent: Monday, 21 December, 2009 19:35:09 GMT +02:00 Athens, Beirut, > Bucharest, Istanbul > Subject: Help with using DWR with Tapestry > > Hello, > > In my project, i would like to use DWR along with Tapestry! But i've a > probelm. Its like i need to access the DB, i use Hibernate with Tapestry. > In > my class i've: > > @Inject > private Session _session; > > when i access this class from DWR, Tapestry doesn't interfere at all. But, > i'm getting a null pointer exception where i first start using the Session. > How and what should be done for this? > > - Ashwanth Kumar > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: Hibernate session should be cleared/flushed between lifecycle methods?
Il 18/12/2009 20:57, Thiago H. de Paula Figueiredo ha scritto: > Em Fri, 18 Dec 2009 17:40:10 -0200, Everton Agner > escreveu: >> So, In my onSuccess() method, I update my "current" object on Session. >> But, I get a: >> >> "a different object with the same identifier value was already >> associated with the session:..." > > Are you using Session.update()? Use Session.merge() instead. It should > solve your problem. > Googling around I discovered this HowTo that seems to be talking of this same problem: http://wiki.apache.org/tapestry/Tapestry5AvoidingDifferentObjectWithSameIDExceptions HTH -- Alessandro Bottoni Website: http://www.alessandrobottoni.it/ "Which is more dangerous? TV guided missiles or TV guided families?" -- unknown - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: JSON in Tapestry
I'm using Tapestry 4.1.6 by the way. -- View this message in context: http://old.nabble.com/JSON-in-Tapestry-tp26885074p26885256.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
JSON in Tapestry
Hi, I'm new to tapestry, now I want to create a page which could handle ajax request and return JSON response. But I can't get it work. Here is what I did: First I have a page which extends BasePage and implement IJSONRender: public abstract class JsonPage extends BasePage implements IJSONRender { public void renderComponent(IJSONWriter writer, IRequestCycle cycle) { System.out.println("RenderJSON!!"); writer.array().put("some data"); } } Then I have Home.page: Then I have Home.html: dojo.require("tapestry.event"); dojo.event.connect(tapestry, "loadJson", function(type, data, http, kwArgs){ alert("load json!"); alert("data:" + data); for (var e in data) { alert(e + ":" + data[e]); } }); tapestry.bind("http://127.0.0.1:8080/war/app";, {}, true); The client side will show a message box said "load json!", but the json data that client retrieved is always an empty object. Also, the server console does not print "RenderJSON!!", which means that the renderComponent of my TestPage was never called. I don't know what to do. Could somebody help me out? Thank you very much!! -- View this message in context: http://old.nabble.com/JSON-in-Tapestry-tp26885074p26885074.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