Hi,
I call the same bean twice in the same request. For example I do 2 different
calls to the MenuServie object:
<cfcomponent [...]
beans="ApplicationConfiguration,DomainService,i18nService,MenuBean,MenuGateway,MenuService,SessionService,UserService">
<cffunction name="get">
<cfargument name="event" type="any" required="true">
[...]
<cfset
arguments.event.setValue("languages",beans.ApplicationConfiguration.getConfigSetting("languages"))>
<cfset
arguments.event.setValue("allMenus",beans.MenuService.list(local.domainId))>
<cfset
arguments.event.setValue("allSameLevelMenus",beans.MenuService.getMenusWithSameParent(domainId=local.domainId,parentMenu=local.menuBean.getParentMenu()))>
[...]
</cffunction>
[...] = code omitted
This does not work: the 2nd call to beans.MenuService:
beans.MenuService.getMenusWithSameParent(domainId=local.domainId,parentMenu=local.menuBean.getParentMenu())
overwrites the first call to beans.MenuService:
beans.MenuService.list(local.domainId)
so that in the end both the "languages" eventkey and the 'allSameLevelMenus"
eventkey contain the same value.
I use Coldspring (1.2) to manage my beans. I figured I set the "singleton"
attribute for the MenuService bean to "false" but then that only results in
a new bean for every request, not for a new bean _within_ the same request,
right?
Then I realised do not use CS for my controllers so I guess Coldspring has
nothing to do with it.
Does anyone know how to solve this?
Marc
--
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en