0 Replies Latest reply on Mar 13, 2006 6:55 AM by Magnus Sandberg

    EVENT components and @Factory

    Magnus Sandberg Novice

      I have a slight problem with @Factory (again) ... maybe factory is not meant to be used this way but anyhow;

      I have a 'data' component in the EVENT scope that have a @Factory method. I want the factory to be called when no other component has outjected the 'data' component. This works great as long as 'data' is null.

      The problem is that if a call an action in any component that is outjecting 'data' and 'data' was outjected in the previous action (by the factory or in another way) the factory method gets called in the APPLY_REQUEST_VALUES phase. If I call an action in a component that is not going to outject 'data' everything works as I want and the factory gets called in the RENDER_RESPONSE phase.

      Setting the 'data' component to CONVERSATION (or PAGE) removed the call to the factory during the APPLY_REQUEST_VALUES phase but since the data '"dead" after the EVENT I really would like to keep 'data' as an EVENT component.

      Is there any way to prevent the call in APPLY_REQUEST_VALUES or do I have to use CONVERSATION here?