Re: New community site based on t5
And is that all T5 can do? This is very embarrassing indeed. On Dec 14, 2007 7:01 PM, Jonathan Glanz <[EMAIL PROTECTED]> wrote: > If you'd like to see a new.site based on t5 goto www.wingmanfinder.com its > 100 percent free, so its just an example of what t5 can do > Sent via BlackBerry by AT&T > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
T5: Quartz and the IoC Registry?
All, I'd like to use Quartz with tapestry. As such, I'd like to get a reference to the Registry and pass it into a Tapestry service (so that I can use it in my Quartz jobs to instantiate all of my DAOs and Hibernate Sessions). I saw some discussion here on the list a few days ago about the Registry...it sounds like it's not exposed to services at all. Is this true? Does anyone have any ideas how I can get a reference to it? I have also thought about building a completely new registry inside this service for all of the quartz jobs to use, but my guess is that there would be quite an impact on the machine's resources. Does anyone have a good feel for how much memory I can expect to give up if I instantiate a second instance of the Registry? Thanks, Andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4.1.3 - Upgrade Dojo
Andreas Andreou wrote: > > I just uploaded the docs, so you can now see what is possible with > 4.1.4-SNAPSHOT at: > http://tapestry.apache.org/tapestry4.1/ajax/beyonddojo.html > > The adapter javascript file mentioned is: > https://svn.apache.org/repos/asf/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/skeleton/core.js > > I'm aware we need more docs + an example implementation, but lack of > time hasn't made this possible yet. > I just wanted to say on behalf on Tap~4 users everywhere: thank you for your efforts! -- View this message in context: http://www.nabble.com/T4.1.3---Upgrade-Dojo-tp13621341p14341740.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: JumpStart 3.0.0 Preview ready for comments
Hi all, I've reworked JumpStart to address Tapestry 5, and I need feedback on how to make it as good as it can be... If you don't know JumpStart, its purpose is to get newcomers up-to- speed with Tapestry as fast as possible. It's aim is to dispel the myth of Tapestry's steep learning curve by helping people get productive quickly. The better that JumpStart is, the better I hope it will be for all the Tapestry community. So, I'm looking for heaps of feedback on its strengths, weaknesses, choice of examples, quality of code, correctness, etc., anything that will make it more helpful to more people! To get it, go to http://files.doublenegative.com.au/jumpstart/ , click on Downloads, and look for jumpstart-min-3.0.0.preview.1.zip. Cheers, Geoff Callender http://files.doublenegative.com.au/jumpstart/ You can mail me directly or reply to this thread. Either is fine. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Zone Component & update Grid
Hi, I just tried the new Zone component which is just about great! But when I tried to return a Block from my ActionListener that contains a Grid, I get the following Exception org.apache.tapestry.runtime.ComponentEventException: No object of type org.apache.tapestry.services.Heartbeat is available from the Environment. Available types are . (...no types are listed here) On the documentation about Zone I can read "Inside a component, you should use Environmental, to highlight the fact that PageRenderSupport (like most environmental objects) is only available during rendering, not during action requests." So is this expected behaviour, that a Grid cannot be returned by an ActionListener that is supposed to update a Zone component? This would be an absolutely great feature to be able to update Grid's content in an AJAX fashion. Thanks for clues. Moritz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4.1.3 - Upgrade Dojo
That's great Andreas! Is there a plan to also provide a "standard" adapter to dojo 1.0? the fact that this is called "beyonddojo" is confusing :-) On Dec 14, 2007 7:08 PM, Andreas Andreou <[EMAIL PROTECTED]> wrote: > I just uploaded the docs, so you can now see what is possible with > 4.1.4-SNAPSHOT at: > http://tapestry.apache.org/tapestry4.1/ajax/beyonddojo.html > > The adapter javascript file mentioned is: > https://svn.apache.org/repos/asf/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/skeleton/core.js > > I'm aware we need more docs + an example implementation, but lack of > time hasn't made this possible yet. > I'll let you know when related work resumes (hoping for middle of next week) > > > On Dec 14, 2007 2:57 PM, Martino Piccinato <[EMAIL PROTECTED]> wrote: > > I think it was my mail and in fact there was no clear date/plan to > > upgrade to 1.0 (but maybe I misunderstood...). > > > > In fact it would be a great thing upgrading to 1.0 we tapestry4ers are > > quite scared by the t5 only list traffic lately ;-) > > > > > > On Dec 14, 2007 1:46 PM, Matt Brock <[EMAIL PROTECTED]> wrote: > > > > > > Yes, it's http://issues.apache.org/jira/browse/TAPESTRY-1902 issue #1902 > > > in > > > JIRA. Andreas Andreou implied he was working on it in > > > http://www.nabble.com/Moving-on-from-4.0.*-to13635906.html#a13636810 this > > > post in response to a similar question a month ago, but I haven't heard > > > anything else since then. > > > > > > > > > Joshua Jackson-3 wrote: > > > > > > > > On 12/14/07, Matt Brock <[EMAIL PROTECTED]> wrote: > > > > That's great. Has it been written on JIRA yet? > > > > > > > > > > -- > > > View this message in context: > > > http://www.nabble.com/T4.1.3---Upgrade-Dojo-tp13621341p14335044.html > > > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr > Tapestry / Tacos developer > Open Source / JEE Consulting > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4.1.3 - Upgrade Dojo
I just uploaded the docs, so you can now see what is possible with 4.1.4-SNAPSHOT at: http://tapestry.apache.org/tapestry4.1/ajax/beyonddojo.html The adapter javascript file mentioned is: https://svn.apache.org/repos/asf/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/skeleton/core.js I'm aware we need more docs + an example implementation, but lack of time hasn't made this possible yet. I'll let you know when related work resumes (hoping for middle of next week) On Dec 14, 2007 2:57 PM, Martino Piccinato <[EMAIL PROTECTED]> wrote: > I think it was my mail and in fact there was no clear date/plan to > upgrade to 1.0 (but maybe I misunderstood...). > > In fact it would be a great thing upgrading to 1.0 we tapestry4ers are > quite scared by the t5 only list traffic lately ;-) > > > On Dec 14, 2007 1:46 PM, Matt Brock <[EMAIL PROTECTED]> wrote: > > > > Yes, it's http://issues.apache.org/jira/browse/TAPESTRY-1902 issue #1902 > > in > > JIRA. Andreas Andreou implied he was working on it in > > http://www.nabble.com/Moving-on-from-4.0.*-to13635906.html#a13636810 this > > post in response to a similar question a month ago, but I haven't heard > > anything else since then. > > > > > > Joshua Jackson-3 wrote: > > > > > > On 12/14/07, Matt Brock <[EMAIL PROTECTED]> wrote: > > > That's great. Has it been written on JIRA yet? > > > > > > > -- > > View this message in context: > > http://www.nabble.com/T4.1.3---Upgrade-Dojo-tp13621341p14335044.html > > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
New community site based on t5
If you'd like to see a new.site based on t5 goto www.wingmanfinder.com its 100 percent free, so its just an example of what t5 can do Sent via BlackBerry by AT&T - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding extra rows to a BeanEditForm / extra columns to a Grid (T5!)
On Fri, 14 Dec 2007 14:44:11 -0200, Tobias Wehrum <[EMAIL PROTECTED]> wrote: Hello Thiago, great, works fine! Thank you very much - seems I overlooked the "this may be null for a synthetic or placeholder property" in the JavaDoc completly. You're welcome! :) Is there any way to get the grid to not display any name in the header of my synthetic column? I know how to change it, but giving null, an empty string or a whitespace results in a tapestry exception stating "Parameter label was null or contained only whitespace". Well, in Tapestry 5.0.6, if you just add a column using BeanModel.add, it doesn't show any label, unless you have a -label entry in your app.properties. On the other hand, you can do: beanModel.add("action", null).label("any label you want, including an empty string."); I've posted a related JIRA, https://issues.apache.org/jira/browse/TAPESTRY-1983, asking for a new parameter in Grid to add new columns without the need to create a BeanModel explicitly as we have to do now. -- Thiago H. de Paula Figueiredo Desenvolvedor, Instrutor e Consultor de Tecnologia Eteg Tecnologia da Informação Ltda. http://www.eteg.com.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding extra rows to a BeanEditForm / extra columns to a Grid (T5!)
Hello Thiago, great, works fine! Thank you very much - seems I overlooked the "this may be null for a synthetic or placeholder property" in the JavaDoc completly. Is there any way to get the grid to not display any name in the header of my synthetic column? I know how to change it, but giving null, an empty string or a whitespace results in a tapestry exception stating "Parameter label was null or contained only whitespace". Regards, Tobias Thiago H de Paula Figueiredo schrieb: On Fri, 14 Dec 2007 13:57:54 -0200, Tobias Wehrum <[EMAIL PROTECTED]> wrote: Tobias Wehrum schrieb: Hello everyone! Is there a way to add extra rows to a BeanEditForm and extra columns to a Grid - rows / columns which doesn't represent a property of the given model? I need it to edit or show values which are relevant for the model, but like I said not included in it, as well as present links in an own column like "edit", "delete", "move" etc.. Now, you need to create a BeanModel in your page class and pass it to the Grid: @Inject private BeanModelSource beanModelSource; @Inject private ComponentResources componentResources; public BeanModel getBeanModel() { BeanModel beanModel = beanModelSource.create(YourClassnameHere.class, false, componentResources); beanModel.add("action", null); // action is just a name I chose. return beanModel; } Then, inside your Grid, provide the template for your column: Your links here! :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding extra rows to a BeanEditForm / extra columns to a Grid (T5!)
On Fri, 14 Dec 2007 13:57:54 -0200, Tobias Wehrum <[EMAIL PROTECTED]> wrote: Tobias Wehrum schrieb: Hello everyone! Is there a way to add extra rows to a BeanEditForm and extra columns to a Grid - rows / columns which doesn't represent a property of the given model? I need it to edit or show values which are relevant for the model, but like I said not included in it, as well as present links in an own column like "edit", "delete", "move" etc.. Now, you need to create a BeanModel in your page class and pass it to the Grid: @Inject private BeanModelSource beanModelSource; @Inject private ComponentResources componentResources; public BeanModel getBeanModel() { BeanModel beanModel = beanModelSource.create(YourClassnameHere.class, false, componentResources); beanModel.add("action", null); // action is just a name I chose. return beanModel; } Then, inside your Grid, provide the template for your column: Your links here! :) -- Thiago H. de Paula Figueiredo Desenvolvedor, Instrutor e Consultor de Tecnologia Eteg Tecnologia da Informação Ltda. http://www.eteg.com.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding extra rows to a BeanEditForm / extra columns to a Grid
I did this for my application, which needed rows with some totals. I didn't want the totals row to get sorted with the other data, and I also wanted it to look different. You can't put this in an outside table, because it won't line up! So can extend Grid and in the html part simply allow a body component before the loop that renders your column headers and data. In your main page you can insert your custom row with controls, etc. The bad part is you can't have something above and below the data rows with this approach. So if you need more, consider merging your custom row component into your enhanced grid class, so you can have more control. This would also work if you wanted to have an extra column for check boxes, etc. I think I posted my EnhancedGrid class on the list a while back, it's T5.0.5 . On Dec 14, 2007 10:56 AM, Tobias Wehrum <[EMAIL PROTECTED]> wrote: > Hello everyone! > > Is there a way to add extra rows to a BeanEditForm and extra columns to > a Grid - rows / columns which doesn't represent a property of the given > model? I need it to edit or show values which are relevant for the > model, but like I said not included in it, as well as present links in > an own column like "edit", "delete", "move" etc.. > > Regards, > Tobias > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Adding extra rows to a BeanEditForm / extra columns to a Grid
Hello everyone! Is there a way to add extra rows to a BeanEditForm and extra columns to a Grid - rows / columns which doesn't represent a property of the given model? I need it to edit or show values which are relevant for the model, but like I said not included in it, as well as present links in an own column like "edit", "delete", "move" etc.. Regards, Tobias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding extra rows to a BeanEditForm / extra columns to a Grid (T5!)
Tobias Wehrum schrieb: Hello everyone! Is there a way to add extra rows to a BeanEditForm and extra columns to a Grid - rows / columns which doesn't represent a property of the given model? I need it to edit or show values which are relevant for the model, but like I said not included in it, as well as present links in an own column like "edit", "delete", "move" etc.. Regards, Tobias Ah, sorry - didn't give the version! I am using Tapestry 5! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4.1.3 - Upgrade Dojo
I think it was my mail and in fact there was no clear date/plan to upgrade to 1.0 (but maybe I misunderstood...). In fact it would be a great thing upgrading to 1.0 we tapestry4ers are quite scared by the t5 only list traffic lately ;-) On Dec 14, 2007 1:46 PM, Matt Brock <[EMAIL PROTECTED]> wrote: > > Yes, it's http://issues.apache.org/jira/browse/TAPESTRY-1902 issue #1902 in > JIRA. Andreas Andreou implied he was working on it in > http://www.nabble.com/Moving-on-from-4.0.*-to13635906.html#a13636810 this > post in response to a similar question a month ago, but I haven't heard > anything else since then. > > > Joshua Jackson-3 wrote: > > > > On 12/14/07, Matt Brock <[EMAIL PROTECTED]> wrote: > > That's great. Has it been written on JIRA yet? > > > > -- > View this message in context: > http://www.nabble.com/T4.1.3---Upgrade-Dojo-tp13621341p14335044.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4.1.3 - Upgrade Dojo
Yes, it's http://issues.apache.org/jira/browse/TAPESTRY-1902 issue #1902 in JIRA. Andreas Andreou implied he was working on it in http://www.nabble.com/Moving-on-from-4.0.*-to13635906.html#a13636810 this post in response to a similar question a month ago, but I haven't heard anything else since then. Joshua Jackson-3 wrote: > > On 12/14/07, Matt Brock <[EMAIL PROTECTED]> wrote: > That's great. Has it been written on JIRA yet? > -- View this message in context: http://www.nabble.com/T4.1.3---Upgrade-Dojo-tp13621341p14335044.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Antwort: Re: IoC global question
On Fri, 14 Dec 2007 08:45:56 -0200, Kristian Marinkovic <[EMAIL PROTECTED]> wrote: i think choosing spring or tapestry-ioc is just a matter of taste. I do use tapestry-ioc a lot because i develop tapestry 5 applications and sometimes i do not need spring. I beg to differ. Howard haven't used Spring or Guice for Tapestry 5's IoC need for a reason (or two). Read the "Why not Spring" section of http://tapestry.apache.org/tapestry5/tapestry-ioc/. Summary: -> Tapestry-IoC has distributed configuration -> Tapestry-IoC is more modular than Spring (drop-in modules is not possible in Spring AFAIK). -> Tapestry-IoC has a better way to wire beans (waay better than XML and way better than Spring's JavaConfig). Besides this, Tapestry-IoC has a wonderful bean scope: perthread, but I'm too lazy and busy to explain why is it so good here. :) In other words: Tapestry-IoC has more features than spring-core, and these features are needed and/or wanted fo tapestry-core (the Web framework). i use tapestry-ioc are contributions (helps seperate your appilcation in useful drop-in modules) and the xml free configuration. I think you answered your own question. :) -- Thiago H. de Paula Figueiredo Desenvolvedor, Instrutor e Consultor de Tecnologia Eteg Tecnologia da Informação Ltda. http://www.eteg.com.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
UNSUBSCRIBE
UNSUBSCRIBE - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IoC global question
m, i think there's something missing here If i'm understanding correctly you want tapestry-ioc to manage all your services (either presentation stuf, db stuff, etc) and you don't want it to be intrusive. You don't want to reference any tapestry-ioc API inside you service classes. Does that describe the problem ? If so, tapestry-ioc can solve your problem really easily. Michael Bernagou wrote: So I have to call the current Registry (or to manage it myself) and call the myRegistry.getService(MyService.class); Hum, I think it's not ioc anymore if I have to setup my containers (Axis2, Hibernate) to call the tapestry-ioc or I have to create a sort of "middle layer" between the layer and the tapestry-ioc, and then my classes have to call this middleLayer... hum... How do you do yourself? Webapp have usually more than just a MVC layer. Are you using the tapestry-ioc only for the MVC layer? Its seems to me strange for one class having to use @Inject Logger log; and for another class Logger log = Logger.getLogger( ApplicationDaoImpl.class.getName()); 2 ways to get the logger in the same application for the same target log file... Maybe tapestry-ioc should be extended to take care also to the other layers. Maybe I'm totally wrong ;o) so, how should it be coded to respect ioc pattern between tapestr-ioc and other layers such as Axis2 and Hibernate3 (for T5 we know ;o) ) Thanks 2007/12/14, Michael Bernagou <[EMAIL PROTECTED]>: Ok I'm going to investigate about that Registry. So, what's the interrest to use tapestry-ioc instead of Spring ioc? If I need my ioc to provide all the services I need, I cannot use tapestry-ioc unless I need my other layers to call explicitely the ioc which is not recommended when you want independant layers working together. @Hugo, ok I'm going to reread again this part. 2007/12/14, Kristian Marinkovic <[EMAIL PROTECTED] >: hi michael, @Inject only works in Tapestry pages and components (and mixins). By default Tapestry will use the field type as an id and lookup the corresponding ioc service. I assume your Web Service Container was not started by the ioc container so it runs outside its control. Therefore you have to first obtain an ioc Registry first and then ask it explicitly for the service you want to call. The builder methods are not meant to be called except by the container :) g, kris "Michael Bernagou" < [EMAIL PROTECTED]> 14.12.2007 10:51 Bitte antworten an "Tapestry users" An "Tapestry users" Kopie Thema IoC global question Hi, I have a sort of general question about tapestry-ioc. In fact, I would like it to manage all the services of my webapp. In theory it should be the case, shouldn't be? So to provides services to my MVC, no problem the syntax @Inject MyService _myService; work perfectly. But, to provide services the same way for my Dao it's different. The same syntax doesn't provide any instance. I used the tapestry-hibernate and declare my dao as services : import org.hibernate.Session; public static UserDao buildUserDao(@InjectService("Session") Session session) { return new UserDaoImpl(session); } public static UserService buildUserService(@InjectService("UserDao") UserDao dao) { return new UserServiceImpl(dao); } So my implementation can work. But to use the service, all the callers have to know a session object! Ok, if my caller is a web service, and this web service want to call the UserService, @Inject UserService _userService; DOES NOT work and _userService is null! So I have to call explicitely the builder of my service FROM the web service... If I do that, I bypass the IoC purpose because I link it directly : UserService us = AppModule.buildUserService ( ... and then I have a problem! buildUserService need a UserDao, but my web service doesn't care about knowing any kind of dao! So, I should be able to use @Inject MyService _myService; anywhere in my project and the tapestry-ioc should be able to give instance to all the class... Did I (probably) missed something? -- Michael Bernagou Java Developper -- Michael Bernagou Java Developper
Antwort: Re: IoC global question
generally there are no differences in the basic concepts between spring ioc and tapestry-ioc. the only difference in this case is that spring already offers a ready to use integration layer for Web Services and spring ioc tapestry-ioc does not yet :) i think choosing spring or tapestry-ioc is just a matter of taste. I do use tapestry-ioc a lot because i develop tapestry 5 applications and sometimes i do not need spring. If i do i can use the tapestry-spring integration to inject spring beans into my tapestry-ioc services... especially useful when using email, web services, ... :)... but again in this case spring has control over this services by providing own servlets, filters, ... and they are initialized via spring. Another reason i use tapestry-ioc are contributions (helps seperate your appilcation in useful drop-in modules) and the xml free configuration. i hope this helps maybe it helps looking closer at springs integration with web services. g, kris "Michael Bernagou" <[EMAIL PROTECTED]> 14.12.2007 11:35 Bitte antworten an "Tapestry users" An "Tapestry users" Kopie Thema Re: IoC global question So I have to call the current Registry (or to manage it myself) and call the myRegistry.getService(MyService.class); Hum, I think it's not ioc anymore if I have to setup my containers (Axis2, Hibernate) to call the tapestry-ioc or I have to create a sort of "middle layer" between the layer and the tapestry-ioc, and then my classes have to call this middleLayer... hum... How do you do yourself? Webapp have usually more than just a MVC layer. Are you using the tapestry-ioc only for the MVC layer? Its seems to me strange for one class having to use @Inject Logger log; and for another class Logger log = Logger.getLogger( ApplicationDaoImpl.class.getName()); 2 ways to get the logger in the same application for the same target log file... Maybe tapestry-ioc should be extended to take care also to the other layers. Maybe I'm totally wrong ;o) so, how should it be coded to respect ioc pattern between tapestr-ioc and other layers such as Axis2 and Hibernate3 (for T5 we know ;o) ) Thanks 2007/12/14, Michael Bernagou <[EMAIL PROTECTED]>: > > Ok I'm going to investigate about that Registry. > So, what's the interrest to use tapestry-ioc instead of Spring ioc? If I > need my ioc to provide all the services I need, I cannot use tapestry-ioc > unless I need my other layers to call explicitely the ioc which is not > recommended when you want independant layers working together. > > @Hugo, ok I'm going to reread again this part. > > 2007/12/14, Kristian Marinkovic <[EMAIL PROTECTED] >: > > > > hi michael, > > > > @Inject only works in Tapestry pages and components (and mixins). > > By default Tapestry will use the field type as an id and lookup the > > corresponding ioc service. > > > > I assume your Web Service Container was not started by the ioc > > container so it runs outside its control. Therefore you have to first > > obtain an ioc Registry first and then ask it explicitly for the service > > you want to call. The builder methods are not meant to be called > > except by the container :) > > > > g, > > kris > > > > > > > > > > "Michael Bernagou" < [EMAIL PROTECTED]> > > 14.12.2007 10:51 > > Bitte antworten an > > "Tapestry users" > > > > > > An > > "Tapestry users" > > Kopie > > > > Thema > > IoC global question > > > > > > > > > > > > > > Hi, > > > > I have a sort of general question about tapestry-ioc. In fact, I would > > like > > it to manage all the services of my webapp. In theory it should be the > > case, > > shouldn't be? > > > > So to provides services to my MVC, no problem the syntax @Inject > > MyService > > _myService; work perfectly. But, to provide services the same way for my > > > > Dao > > it's different. The same syntax doesn't provide any instance. > > I used the tapestry-hibernate and declare my dao as services : > > > > import org.hibernate.Session; > > > > public static UserDao buildUserDao(@InjectService("Session") Session > > session) { > > return new UserDaoImpl(session); > > } > > > > public static UserService buildUserService(@InjectService("UserDao") > > UserDao dao) { > > return new UserServiceImpl(dao); > > } > > > > So my implementation can work. But to use the service, all the callers > > have > > to know a session object! > > Ok, if my caller is a web service, and this web service want to call the > > UserService, @Inject UserService _userService; DOES NOT work and > > _userService is null! So I have to call explicitely the builder of my > > service FROM the web service... If I do that, I bypass the IoC purpose > > because I link it directly : > > > > UserService us = AppModule.buildUserService ( ... and then I have a > > problem! > > buildUserService need a UserDao, but my web service doesn't care about > > knowing any kind of dao! > > > > So, I should be able to use @Inject MyService _myService; anywhere in my > >
Re: IoC global question
So I have to call the current Registry (or to manage it myself) and call the myRegistry.getService(MyService.class); Hum, I think it's not ioc anymore if I have to setup my containers (Axis2, Hibernate) to call the tapestry-ioc or I have to create a sort of "middle layer" between the layer and the tapestry-ioc, and then my classes have to call this middleLayer... hum... How do you do yourself? Webapp have usually more than just a MVC layer. Are you using the tapestry-ioc only for the MVC layer? Its seems to me strange for one class having to use @Inject Logger log; and for another class Logger log = Logger.getLogger( ApplicationDaoImpl.class.getName()); 2 ways to get the logger in the same application for the same target log file... Maybe tapestry-ioc should be extended to take care also to the other layers. Maybe I'm totally wrong ;o) so, how should it be coded to respect ioc pattern between tapestr-ioc and other layers such as Axis2 and Hibernate3 (for T5 we know ;o) ) Thanks 2007/12/14, Michael Bernagou <[EMAIL PROTECTED]>: > > Ok I'm going to investigate about that Registry. > So, what's the interrest to use tapestry-ioc instead of Spring ioc? If I > need my ioc to provide all the services I need, I cannot use tapestry-ioc > unless I need my other layers to call explicitely the ioc which is not > recommended when you want independant layers working together. > > @Hugo, ok I'm going to reread again this part. > > 2007/12/14, Kristian Marinkovic <[EMAIL PROTECTED] >: > > > > hi michael, > > > > @Inject only works in Tapestry pages and components (and mixins). > > By default Tapestry will use the field type as an id and lookup the > > corresponding ioc service. > > > > I assume your Web Service Container was not started by the ioc > > container so it runs outside its control. Therefore you have to first > > obtain an ioc Registry first and then ask it explicitly for the service > > you want to call. The builder methods are not meant to be called > > except by the container :) > > > > g, > > kris > > > > > > > > > > "Michael Bernagou" < [EMAIL PROTECTED]> > > 14.12.2007 10:51 > > Bitte antworten an > > "Tapestry users" > > > > > > An > > "Tapestry users" > > Kopie > > > > Thema > > IoC global question > > > > > > > > > > > > > > Hi, > > > > I have a sort of general question about tapestry-ioc. In fact, I would > > like > > it to manage all the services of my webapp. In theory it should be the > > case, > > shouldn't be? > > > > So to provides services to my MVC, no problem the syntax @Inject > > MyService > > _myService; work perfectly. But, to provide services the same way for my > > > > Dao > > it's different. The same syntax doesn't provide any instance. > > I used the tapestry-hibernate and declare my dao as services : > > > > import org.hibernate.Session; > > > > public static UserDao buildUserDao(@InjectService("Session") Session > > session) { > > return new UserDaoImpl(session); > > } > > > > public static UserService buildUserService(@InjectService("UserDao") > > UserDao dao) { > > return new UserServiceImpl(dao); > > } > > > > So my implementation can work. But to use the service, all the callers > > have > > to know a session object! > > Ok, if my caller is a web service, and this web service want to call the > > UserService, @Inject UserService _userService; DOES NOT work and > > _userService is null! So I have to call explicitely the builder of my > > service FROM the web service... If I do that, I bypass the IoC purpose > > because I link it directly : > > > > UserService us = AppModule.buildUserService ( ... and then I have a > > problem! > > buildUserService need a UserDao, but my web service doesn't care about > > knowing any kind of dao! > > > > So, I should be able to use @Inject MyService _myService; anywhere in my > > > > project and the tapestry-ioc should be able to give instance to all the > > class... > > > > Did I (probably) missed something? > > > > -- > > Michael Bernagou > > Java Developper > > > > > > > -- > Michael Bernagou > Java Developper -- Michael Bernagou Java Developper
Re: IoC global question
Ok I'm going to investigate about that Registry. So, what's the interrest to use tapestry-ioc instead of Spring ioc? If I need my ioc to provide all the services I need, I cannot use tapestry-ioc unless I need my other layers to call explicitely the ioc which is not recommended when you want independant layers working together. @Hugo, ok I'm going to reread again this part. 2007/12/14, Kristian Marinkovic <[EMAIL PROTECTED]>: > > hi michael, > > @Inject only works in Tapestry pages and components (and mixins). > By default Tapestry will use the field type as an id and lookup the > corresponding ioc service. > > I assume your Web Service Container was not started by the ioc > container so it runs outside its control. Therefore you have to first > obtain an ioc Registry first and then ask it explicitly for the service > you want to call. The builder methods are not meant to be called > except by the container :) > > g, > kris > > > > > "Michael Bernagou" <[EMAIL PROTECTED]> > 14.12.2007 10:51 > Bitte antworten an > "Tapestry users" > > > An > "Tapestry users" > Kopie > > Thema > IoC global question > > > > > > > Hi, > > I have a sort of general question about tapestry-ioc. In fact, I would > like > it to manage all the services of my webapp. In theory it should be the > case, > shouldn't be? > > So to provides services to my MVC, no problem the syntax @Inject MyService > _myService; work perfectly. But, to provide services the same way for my > Dao > it's different. The same syntax doesn't provide any instance. > I used the tapestry-hibernate and declare my dao as services : > > import org.hibernate.Session; > > public static UserDao buildUserDao(@InjectService("Session") Session > session) { > return new UserDaoImpl(session); > } > > public static UserService buildUserService(@InjectService("UserDao") > UserDao dao) { > return new UserServiceImpl(dao); > } > > So my implementation can work. But to use the service, all the callers > have > to know a session object! > Ok, if my caller is a web service, and this web service want to call the > UserService, @Inject UserService _userService; DOES NOT work and > _userService is null! So I have to call explicitely the builder of my > service FROM the web service... If I do that, I bypass the IoC purpose > because I link it directly : > > UserService us = AppModule.buildUserService( ... and then I have a > problem! > buildUserService need a UserDao, but my web service doesn't care about > knowing any kind of dao! > > So, I should be able to use @Inject MyService _myService; anywhere in my > project and the tapestry-ioc should be able to give instance to all the > class... > > Did I (probably) missed something? > > -- > Michael Bernagou > Java Developper > > -- Michael Bernagou Java Developper
Re: IoC global question
I think the easiest way to implement that is to use auto-building and to just declare each service dependencies in it's implementation class. See the "Binding and Autobuilding" and "Injecting Dependencies for Autobuilt Services" section here http://tapestry.apache.org/tapestry5/tapestry-ioc/service.html Michael Bernagou wrote: Hi, I have a sort of general question about tapestry-ioc. In fact, I would like it to manage all the services of my webapp. In theory it should be the case, shouldn't be? So to provides services to my MVC, no problem the syntax @Inject MyService _myService; work perfectly. But, to provide services the same way for my Dao it's different. The same syntax doesn't provide any instance. I used the tapestry-hibernate and declare my dao as services : import org.hibernate.Session; public static UserDao buildUserDao(@InjectService("Session") Session session) { return new UserDaoImpl(session); } public static UserService buildUserService(@InjectService("UserDao") UserDao dao) { return new UserServiceImpl(dao); } So my implementation can work. But to use the service, all the callers have to know a session object! Ok, if my caller is a web service, and this web service want to call the UserService, @Inject UserService _userService; DOES NOT work and _userService is null! So I have to call explicitely the builder of my service FROM the web service... If I do that, I bypass the IoC purpose because I link it directly : UserService us = AppModule.buildUserService( ... and then I have a problem! buildUserService need a UserDao, but my web service doesn't care about knowing any kind of dao! So, I should be able to use @Inject MyService _myService; anywhere in my project and the tapestry-ioc should be able to give instance to all the class... Did I (probably) missed something? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: IoC global question
hi michael, @Inject only works in Tapestry pages and components (and mixins). By default Tapestry will use the field type as an id and lookup the corresponding ioc service. I assume your Web Service Container was not started by the ioc container so it runs outside its control. Therefore you have to first obtain an ioc Registry first and then ask it explicitly for the service you want to call. The builder methods are not meant to be called except by the container :) g, kris "Michael Bernagou" <[EMAIL PROTECTED]> 14.12.2007 10:51 Bitte antworten an "Tapestry users" An "Tapestry users" Kopie Thema IoC global question Hi, I have a sort of general question about tapestry-ioc. In fact, I would like it to manage all the services of my webapp. In theory it should be the case, shouldn't be? So to provides services to my MVC, no problem the syntax @Inject MyService _myService; work perfectly. But, to provide services the same way for my Dao it's different. The same syntax doesn't provide any instance. I used the tapestry-hibernate and declare my dao as services : import org.hibernate.Session; public static UserDao buildUserDao(@InjectService("Session") Session session) { return new UserDaoImpl(session); } public static UserService buildUserService(@InjectService("UserDao") UserDao dao) { return new UserServiceImpl(dao); } So my implementation can work. But to use the service, all the callers have to know a session object! Ok, if my caller is a web service, and this web service want to call the UserService, @Inject UserService _userService; DOES NOT work and _userService is null! So I have to call explicitely the builder of my service FROM the web service... If I do that, I bypass the IoC purpose because I link it directly : UserService us = AppModule.buildUserService( ... and then I have a problem! buildUserService need a UserDao, but my web service doesn't care about knowing any kind of dao! So, I should be able to use @Inject MyService _myService; anywhere in my project and the tapestry-ioc should be able to give instance to all the class... Did I (probably) missed something? -- Michael Bernagou Java Developper
IoC global question
Hi, I have a sort of general question about tapestry-ioc. In fact, I would like it to manage all the services of my webapp. In theory it should be the case, shouldn't be? So to provides services to my MVC, no problem the syntax @Inject MyService _myService; work perfectly. But, to provide services the same way for my Dao it's different. The same syntax doesn't provide any instance. I used the tapestry-hibernate and declare my dao as services : import org.hibernate.Session; public static UserDao buildUserDao(@InjectService("Session") Session session) { return new UserDaoImpl(session); } public static UserService buildUserService(@InjectService("UserDao") UserDao dao) { return new UserServiceImpl(dao); } So my implementation can work. But to use the service, all the callers have to know a session object! Ok, if my caller is a web service, and this web service want to call the UserService, @Inject UserService _userService; DOES NOT work and _userService is null! So I have to call explicitely the builder of my service FROM the web service... If I do that, I bypass the IoC purpose because I link it directly : UserService us = AppModule.buildUserService( ... and then I have a problem! buildUserService need a UserDao, but my web service doesn't care about knowing any kind of dao! So, I should be able to use @Inject MyService _myService; anywhere in my project and the tapestry-ioc should be able to give instance to all the class... Did I (probably) missed something? -- Michael Bernagou Java Developper