Availability of state object across the applicatio

Topics: CAB & Smart Client Software Factory
Dec 31, 2005 at 10:33 AM
originally posted by: SUBATBLOOMINGTON

we have a requirement in which common set of values like user role, preferences should be stored in state be accessible from any where the use case / shell container.

whether the usage of state is appropriate ?? any guidance is helpful
Dec 31, 2005 at 1:34 PM
originally posted by: NandanNaik

since all use-cases/workitems in your application exist in the context of your root-workitem, you should be able to store all your global values in the root-workitem's state and have access to it from child work-items (you can access it via the RootWorkItem property from a work item).

alternatively, here is something the cab doc suggests:
"Another workaround for propagating state to child WorkItems is to use a service. The parent WorkItem can pass the state that the child WorkItem depends on to the service and the child WorkItems can then retrieve it and use it."