3 Replies Latest reply on Dec 16, 2007 5:38 PM by Pete Muir

    [newbie] Problem passing parameters

    German Otero Newbie

      Hi, i'm new with Seam, and i have a problem passing object between pages.
      I have a grid, at the home of my app, and a view/edit action (row action.). Simple when a user click this link, i need to go to another page, this new page, must be fill with the object behind the row.
      ej: the row has an object 'AType', and i go to the ATypeEdit.xhtml. so when i click the action to edit the AType, the new page rendered must have the AType info.

      I found several ways to do this,
      1) with <param ..../> but, i pass the id of the AType, or something that i can use to find it in the DB. If the object is transient???..

      2) a session bean, call it, whatever you want (home, session bean o anything), that holds the object.... this is a little ugly. because, who will clean this reference??..and this SessionObject, have nothing to do here.

      3) there is no 3..

      I need a way to say, Hey, AType, Go there. ----> and the aType go.

      Tnks.

        • 2. Re: [newbie] Problem passing parameters
          German Otero Newbie

          Ok, In this example, we have a MessageManagerBean that is Session scopped. so it has the reference, is the same as the entityHome. or any Session Bean then holds the reference. this session bean, will have the reference to my selected object, until the end of my session.. or i need to say to him Hey destroy anything because i finish my work..
          On the other hand suppouse that when i click the view/edit button, open a popUp window, so a single user, with single session, can open 2 AType for edit.... 2 windows, 1 session bean... ERR.... it must be other way to pass object form one page to other.. thinking that i do not have a conversation...
          i'm starting a conversation, with an object.

          • 3. Re: [newbie] Problem passing parameters
            Pete Muir Master

             

            "german.otero" wrote:
            Ok, In this example, we have a MessageManagerBean that is Session scopped. so it has the reference, is the same as the entityHome. or any Session Bean then holds the reference. this session bean, will have the reference to my selected object, until the end of my session.. or i need to say to him Hey destroy anything because i finish my work..


            A conversation provides an implementation of this idea and allows you to scope your "session" to the natural length of the user's interaction

            On the other hand suppouse that when i click the view/edit button, open a popUp window, so a single user, with single session, can open 2 AType for edit.... 2 windows, 1 session bean... ERR.... it must be other way to pass object form one page to other.. thinking that i do not have a conversation...
            i'm starting a conversation, with an object.


            Use a conversation :)