0 Replies Latest reply on Jul 22, 2010 3:46 PM by Maynard Witten

    How to avoid new conversation on each Ajax request and what are Seam conditions on component sets?

    Maynard Witten Newbie

      Hi,


      I am trying to figure out what's really happening in my application and I put code



      instanceId = Calendar.getInstance().getTimeInMillis();





      in constructor of my conversation-scope bean and I am also having h:outputText for instanceId on my form. The strange thing is that when each Ajax request is processed, it is done by the method of the current conversation (I have log.debug(instanceId) in action methods as a proof of this statement) and the rerenderd h:outputText displays different instanceId value. I can also observe in logs, that different instance of my conversation-scope bean is created.


      I think that is should be possible to have always the same instanceId and have exactly one instance per conversation? How that can happen, that new instance is created if I am not specifying explicitly to begin new conversation (of - sub-conversation)?


      And other question about this matter. How Seam collaborates with component sets. I mean - usually JSF dataTable component requires binding to the method of type




      public ArrayList<RecordDTO> getAllRecords() {...}





      So - the question is - on which scope should I put the bean who have this method getAllRecords. I am trying to put this bean in conversation context, but then the Ajax update of table (e.g. - when column is added or removed, of client-side sorting is done) renders empty table. So - maybe components sets assume that thay can work only with standard JSF scopes and not e.g. with Seam conversation scope?