1 Reply Latest reply on Jul 21, 2010 1:13 AM by Zhang Keven

    Conversation in portial submit

    Zhang Keven Newbie

      Hi, everyone ,

      I have an issue with conversation scoped-data that I want to access from two different Seam components. The use-case is quite simple: In one class a DTO object is outjected to the conversation context. In the other class this DTO object should be injected. However, the injected data always happens to be null.

      In my understanding that should not be a problem, the two classes both access the same (conversation) context. However, it looks like they don't. Now I am wondering how to form a conversation? How can the DTO object in the two different classes reference the object in the same Conversation context?

      Here's the relevant code:

      Class trying to inject the data:
      public class CpfFileTransferCheckAction implements {
          @In(required=true, scope = ScopeType.SESSION)
          @Out(required=false, scope = ScopeType.SESSION)
          private CpfFileTransferDTO fileTransDto;
          public void serverKindChange(final ValueChangeEvent event) {
              // here the fileTransDto will be used

      public class CpfFileTransferEditScenarioAction CpfScdlIF {
          @In(required = false, scope = ScopeType.SESSION)
          @Out(required = false, scope = ScopeType.SESSION)
          private CpfFileTransferDTO fileTransDto;
          public String  fileTransInit() {
              // here fileTransDto will be instantiate

      In the pages.xml,

      <?xml version="1.0" encoding="UTF-8"?>
      <pages xmlns="http://jboss.com/products/seam/pages"
      <page action="#{editScenarioAction.fileTransInit}" 

      In the fileTransfer.xhtml, fileTransferCheckAction is used as the actionListener. We used ICEFaces tag ice:selecOneMenu

      <ice:selectOneMenu id="fltr_srv1type_select"          
           <f:selectItems value="#{fileTransDto.serverLeft.serverKindList}"/>

      Is there any recommended way how to deal with the problem?
      Thanks in advance,