2 Replies Latest reply on Jan 26, 2007 4:35 PM by Andrew

    Undefined member variables with seam remoting

    Andrew Apprentice

      I am trying to send a hierarchy of java objects back to the JS client using Seam remoting. The call is working, I am getting the top level class back fine, but the data in that class is undefined. I have turned on debugging and the result looks fine to me. I am not sure what is wrong.

      Return value:

      public class WebRemotingReturnValue
       implements Serializable
      {
       private Object value;
       ...
       public Object getValue() { return this.value; }
      }


      The "value" is an List of:
      public class DashboardKpi
      {
       public String application;
       public String name;
       public long id;
       public String account;
       public String type;
       public boolean base;
      
       public DashboardKpi(UserKPI kpi, boolean isAccountBaseMember)
       {
       this.application = kpi.getApp();
       this.name = kpi.getName();
       this.id = kpi.getId();
       this.account = kpi.getAccount();
       this.type = kpi.getType().name();
       this.base = isAccountBaseMember;
       }
       ...
      }


      When I get the result on the client "result.getValue()" returns an array of undefined references.

      I'll post the debug in a second, the forum is having issues with it

      Do you know why the array isn't being populated by my objects that are returned?

        • 1. Re: Undefined member variables with seam remoting
          Andrew Apprentice

           

          Fri Jan 26 2007 14:20:22 GMT-0700 (MST): Request packet:
          <envelope><header><context><conversationId>2</conversationId></context></header><body><call component="insightDashboard" method="getKpis" id="0">
          <params></params><refs></refs></call></body></envelope>
          
          Fri Jan 26 2007 14:20:22 GMT-0700 (MST): Response packet:
          <envelope><header><context><conversationId>2</conversationId></context></header><body><result id="0"><value><ref id="0"/></value><refs><ref id="0"><bean type="com.outlooksoft.cpm.seam.WebRemotingReturnValue"><member name="exceptionMessages"><null/></member><member name="value"><bag><element><ref id="1"/></element><element><ref id="2"/></element><element><ref id="3"/></element><element><ref id="4"/></element><element><ref id="5"/></element><element><ref id="6"/></element><element><ref id="7"/></element><element><ref id="8"/></element><element><ref id="9"/></element><element><ref id="10"/></element></bag></member><member name="errorAddedToFaces"><bool>false</bool></member><member name="severity"><null/></member><member name="errorMessage"><null/></member><member name="exceptionTypes"><null/></member></bean></ref><ref id="1"><bean type="com.outlooksoft.cpm.insight.dashboard.DashboardKpi"><member name="base"><bool>false</bool></member><member name="type"><str>USER</str></member><member name="account"><str>ACCOUNT%3A%3AACCOUNT_HIERARCHY%3A%3ABALANCESHEET</str></member><member name="name"><str>TestKPI%20BALANCESHEET</str></member><member name="id"><number>50</number></member><member name="application"><str>FINANCE</str></member></bean></ref><ref id="2"><bean type="com.outlooksoft.cpm.insight.dashboard.DashboardKpi"><member name="base"><bool>false</bool></member><member name="type"><str>USER</str></member><member name="account"><str>ACCOUNT%3A%3AACCOUNT_HIERARCHY%3A%3ATOTREV</str></member><member name="name"><str>TestKPI%20TOTREV</str></member><member name="id"><number>51</number></member><member name="application"><str>FINANCE</str></member></bean></ref><ref id="3"><bean type="com.outlooksoft.cpm.insight.dashboard.DashboardKpi"><member name="base"><bool>true</bool></member><member name="type"><str>USER</str></member><member name="account"><str>ACCOUNT%3A%3AACCOUNT_HIERARCHY%3A%3ATRAVELENT</str></member><member name="name"><str>TestKPI%20TRAVELENT</str></member><member name="id"><number>52</number></member><member name="application"><str>FINANCE</str></member></bean></ref><ref id="4"><bean type="com.outlooksoft.cpm.insight.dashboard.DashboardKpi"><member name="base"><bool>false</bool></member><member name="type"><str>USER</str></member><member name="account"><str>ACCOUNT%3A%3AACCOUNT_HIERARCHY%3A%3ASTOCKHOLDERSEQUITY</str></member><member name="name"><str>TestKPI%20STOCKHOLDERSEQUITY</str></member><member name="id"><number>53</number></member><member name="application"><str>FINANCE</str></member></bean></ref><ref id="5"><bean type="com.outlooksoft.cpm.insight.dashboard.DashboardKpi"><member name="base"><bool>true</bool></member><member name="type"><str>USER</str></member><member name="account"><str>ACCOUNT%3A%3AACCOUNT_HIERARCHY%3A%3ASMEXP</str></member><member name="name"><str>TestKPI%20SMEXP</str></member><member name="id"><number>54</number></member><member name="application"><str>FINANCE</str></member></bean></ref><ref id="6"><bean type="com.outlooksoft.cpm.insight.dashboard.DashboardKpi"><member name="base"><bool>false</bool></member><member name="type"><str>USER</str></member><member name="account"><str>ACCOUNT%3A%3AACCOUNT_HIERARCHY%3A%3ATOTALCURRENTLIAB</str></member><member name="name"><str>TestKPI%20TOTALCURRENTLIAB</str></member><member name="id"><number>55</number></member><member name="application"><str>FINANCE</str></member></bean></ref><ref id="7"><bean type="com.outlooksoft.cpm.insight.dashboard.DashboardKpi"><member name="base"><bool>false</bool></member><member name="type"><str>USER</str></member><member name="account"><str>ACCOUNT%3A%3AACCOUNT_HIERARCHY%3A%3ANONDEPTEXP</str></member><member name="name"><str>TestKPI%20NONDEPTEXP</str></member><member name="id"><number>56</number></member><member name="application"><str>FINANCE</str></member></bean></ref><ref id="8"><bean type="com.outlooksoft.cpm.insight.dashboard.DashboardKpi"><member name="base"><bool>true</bool></member><member name="type"><str>USER</str></member><member name="account"><str>ACCOUNT%3A%3AACCOUNT_HIERARCHY%3A%3APPE</str></member><member name="name"><str>TestKPI%20PPE</str></member><member name="id"><number>57</number></member><member name="application"><str>FINANCE</str></member></bean></ref><ref id="9"><bean type="com.outlooksoft.cpm.insight.dashboard.DashboardKpi"><member name="base"><bool>false</bool></member><member name="type"><str>USER</str></member><member name="account"><str>ACCOUNT%3A%3AACCOUNT_HIERARCHY%3A%3ATOTALLIABEQUITY</str></member><member name="name"><str>TestKPI%20TOTALLIABEQUITY</str></member><member name="id"><number>58</number></member><member name="application"><str>FINANCE</str></member></bean></ref><ref id="10"><bean type="com.outlooksoft.cpm.insight.dashboard.DashboardKpi"><member name="base"><bool>true</bool></member><member name="type"><str>USER</str></member><member name="account"><str>ACCOUNT%3A%3AACCOUNT_HIERARCHY%3A%3AACCPAY</str></member><member name="name"><str>TestKPI%20ACCPAY</str></member><member name="id"><number>59</number></member><member name="application"><str>FINANCE</str></member></bean></ref></refs></result></body></envelope>
          


          • 2. Re: Undefined member variables with seam remoting
            Andrew Apprentice

            Never mind found the solution. I needed to tell the proxy script:

            /seam/remoting/facesInterface.js?insightDashboard&amp;com.outlooksoft.cpm.insight.dashboard.DashboardKpi