cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Kuhnle <cocoon-...@kuhnle.net>
Subject Re: Getting the ServiceManager from Request?
Date Thu, 22 Jul 2004 16:13:33 GMT
I am working on a "ExtendedFormManager" which groups a form, several 
bindings and data models together. The use case is to specify e.g. a form 
which initializes from a "database model" with binding A and upon submit 
stores itself into the "database model" with binding B and additionally 
into a "mailto model" with binding C, thus storing and sending an email. 
The "ExtendedFormManager" should manage the whole thing together as 
painlessly as possible, it should be a Service, and should be created from 
a configuration file automatically when a form is needed.

One Situation is in the form template, where you get the form through a 
JXPath expression. Something like the following would be nice there:

<ft:form-template location="ExtendedFormManagerHelper.getForm($request, 
'MyExtendedForm')"> 

where ExtendedFormManagerHelper.getForm is a static method that does the 
Service lookup and initialization.

For this to work, I need to get the ServiceManager in order to get to my 
ExtendedFormManager Service. According to the code 
(FormsPipelineConfig.createConfig), the JXPath context only has variables 
for continuation, request, session and parameters.





Leszek Gawron <lgawron@mobilebox.pl> 
22.07.2004 15:13
Please respond to
dev@cocoon.apache.org


To
dev@cocoon.apache.org
cc

Subject
Re: Getting the ServiceManager from Request?






Jochen Kuhnle wrote:
> I need it in a JXPath expression, where the JX context ist created by 
> cocoon (cform's binding manager), and this context does not contain the 
> service manager.

are you talking about custom binding? if so you can implement it in 
javascript and you do not need a service manager because you could do 
cocoon.getComponent

but I may be wrong


-- 
Leszek Gawron                                      lgawron@mobilebox.pl
Project Manager                                    MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65




Mime
View raw message