2 Replies Latest reply on Dec 5, 2007 6:07 AM by mark416

    cairngorm value object doesn't match cfc object?

    mark416 Level 1
      I have built a cfc vo class and flex vo class


      package com.abc.CESF.Bursary.vo
      import com.adobe.cairngorm.vo.IValueObject;


      public class PersonVO implements IValueObject
      public var firstname:String = "";
      public var lastname:String = "";
      public var sid:String= "";

      public function PersonVO(){

      this.firstname = "";
      this.lastname = "";
      this.sid = "";



      <cfcomponent displayname="PersonVO" hint="Login VO For CairngormTest" output="false">

      <cfproperty name="firstname" type="string" default="">
      <cfproperty name="lastname" type="string" default="">
      <cfproperty name="sid" type="string" default="">

      //Initialize the CFC with the default properties values.
      variables.firstname = "";
      variables.lastname = "";
      variables.sid = "";

      <cffunction name="init" output="false" returntype="PersonVO">
      <cfreturn this>
      <cffunction name="getFirstname" output="false" access="public" returntype="any">
      <cfreturn variables.Firstname>

      <cffunction name="setFirstname" output="false" access="public" returntype="void">
      <cfargument name="val" required="true">
      <cfset variables.Firstname = arguments.val>

      <cffunction name="getLastname" output="false" access="public" returntype="any">
      <cfreturn variables.Lastname>

      <cffunction name="setLastname" output="false" access="public" returntype="void">
      <cfargument name="val" required="true">
      <cfset variables.Lastname = arguments.val>

      <cffunction name="getSid" output="false" access="public" returntype="any">
      <cfreturn variables.Sid>

      <cffunction name="setSid" output="false" access="public" returntype="void">
      <cfargument name="val" required="true">
      <cfset variables.Sid = arguments.val>


      I have a function in cfc.it is here

      <cffunction name="addPerson" displayname="addPerson" access="remote" output="false" returntype="boolean">
      <cfargument name="personVO" type="PersonVO" required="true" />

      <cfquery name="insertPerson" datasource="bursary">
      INSERT INTO person_info (fname,

      <cfreturn true />


      but I get the error when I pass flex vo to the cfc function.I am not sure how to make flex vo and cfc vo match.the error message is here

      [RPC Fault faultString="Element FIRSTNAME is undefined in PERSONVO." faultCode="Server.Processing" faultDetail=""]

      Please help me.Thanks