Re: T5 ASO & Service

2008-05-09 Thread maxthesecond
Well I just wandered about serialization issues, but better for me if it's not a problem, at the end I added my Service as a parametrer in the ASO: MyASO.addproducttoChart(idProduct,MyServices) { Map _chartMap; Product p=MyServices.getProductById(idProduct); _chartMap.put(idProduc

Re: T5 ASO & Service

2008-05-09 Thread Filip S. Adamsen
What? It's not uncommon to have methods on an ASO. You can also inject services into it when creating it if you use an ApplicationStateCreator. The relevant docs on Application State has an example at the bottom. -Filip maxthesecond skrev: oopss! I think I missed the point the ASO aplication

Re: T5 ASO & Service

2008-05-08 Thread maxthesecond
oopss! I think I missed the point the ASO aplication state object is merely a container for sharing information across pages and time it shall not have metods, so I'll do as you say. thanks again -- View this message in context: http://www.nabble.com/T5-ASO---Services-tp17134860p17141903.html Se

Re: T5 ASO & Service

2008-05-08 Thread maxthesecond
Sounds good, if it's simply imposible to use services within ASO I'll do that, but I found more natural the other way arround: In the Page _MyAso.addproductttoChart(id); In the ASO MyASO.addproducttoChart(idProduct) { Map _chartMap; @Inject private MyServices _MyServices; Product

Re: T5 ASO & Service

2008-05-08 Thread Bill Holloway
Of course, you'll have the went-to-null trouble even passing the bits of data into your service as method args :) On Thu, May 8, 2008 at 2:38 PM, maxthesecond <[EMAIL PROTECTED]> wrote: > > How I'm suposed to get services inside an ASO? > > I placed my DAO objects in services I didn't need any ses

Re: T5 ASO & Service

2008-05-08 Thread Bill Holloway
Max, What I do in my app is pass the relevant bits of ASO data into my service methods as arguments. You could pass the entire ASO, but you might risk having it go null on you if the ASO gets set to null somewhere. Bill On Thu, May 8, 2008 at 2:38 PM, maxthesecond <[EMAIL PROTECTED]> wrote: > >