Christian Haul wrote: > Christian Haul wrote: > >> Anyway, given that we are going to be able to use input modules in >> the sitemap through "{modulename:parameter}" it would be great if it >> would be the same for the flow. >> >> Just another thought (I'm not yet up to speed with the flow so ignore >> if I'm talking rubbish): Is it possible (and would it make sense) to >> call an action like >> >> result = actions('database', { 'parameter' :'value', 'parameter2' : >> 'value'}); >> >> With the script engine adding the 'usual' parameters >> for the act call and result being an associative array containing the >> returned map. This way we could continue using all the nice actions. :-) >> >> > Ovidiu, Sylvain, > > I spend some time to look into both treeprocessor and flow. In order > to achieve the above and input modules in sitemap I would need two > things: > > a) reference to the sitemap's component manager in flow. I have found > two possibilities, either extending some routines' signatures (many > modifications) or placing it into the Environment. But I seem not to > find the place where it is created. It seems related to > CocoonComponentManager.getCurrentEnvironment() but I didn't quite > understand the mechanics.
Look at o.a.c.components.flow.JavaScript.JSCocoon, which makes some Cocoon objects available to the flow : it already has a ComponentManager attribute, but doesn't publish it to the script. This should be a simple matter of adding a jsGet_manager method (Ovidiu, am I right ?). > Another issue would be components / classes that use a > ComponentManager without implementing Composable.... but that should > be OK(?) > What do you think? Pointers? There are cases where this is needed, but care should be taken to explicitely release these objects so that they can properly release the components they obtain from the ComponentManager. > b) to get input modules support into the sitemap, a reference to the > ComponentManager is needed in several places to pass it to > MapStackResolver.getResolver. Again, I'm unsure what the best strategy > would be here. Suggestions? Input modules in the sitemap is on the way on my PC... Little time = slow speed, but it should be ready this week. Just as you suggest it, there's an additional "manager" parameter to getResolver(), and resolvers have a release() method as described above. Sylvain -- Sylvain Wallez Anyware Technologies Apache Cocoon http://www.anyware-tech.com mailto:[EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]