1 Reply Latest reply on Aug 29, 2008 3:06 PM by bravocharlie.seam.signup.benny.me.uk

    Calling nested action from parent

    bravocharlie.seam.signup.benny.me.uk

      Hi guys,


      I have a parent conversation (aka 'manager') component with a number of nested conversation components which allow the user to update an entity (1 nested per entity). 


      The manager maintains a map of entity id to conversation, which serves 2 purposes:


      1) To redirect the user to the correct conversation to 'continue' editing an entity.


      2) When the user is happy with changes performed in all nested conversations, the manager then needs to call a 'pre-save' action on each nested conversation, which is where I'm having trouble.


      It feels like what I'm trying to do is fundamentally at odds with how Seam works - i.e. switch conversation mid-request, and then switch back again.


      In terms of accessing the nested components, I can can call


      Manager.instance.switchConversation(new id)



      But the ManagedEntityIdentityInterceptor (and ServerConversationContext) seems to be causing problems with the entity fields in the nested components.


      The MEII correctly restores the entities of the first component that is called, but because it saves the entities back to the conversation context in the additions map, the call to the next nested component retrieves that wrapped entity from the additions map, rather than doing a search via name-hash-conversation id).


      Does anybody have any idea how I can achieve this?


      I'm using Seam 2.0.0.GA


      Best regards,


      Ben