2 Replies Latest reply on Dec 7, 2007 10:26 AM by .robson.

    Flex DataService CreateItem method not called

      Hi, I am using Flex 3. I am trying to create an application using data service of Flex. I been able to develop the code which uses the fill (Collection c) method to get the records from DB. Now I want to create a row in DB and for that I am using createItem(Object o ) method. Some how the method in java is not called and application doesn't give me any script error or exception. Can any one help me on this.

      Here is the code
      public class ProjectVO
      public var id:int;

      public class ProjectBean implements java.io.Serializable{

      private int id;

      Project Assembler
      package com.rap.view;

      import java.util.Collection;
      import java.util.List;
      import java.util.Map;

      import flex.data.assemblers.AbstractAssembler;

      public class ProjectAssembler extends AbstractAssembler{

      public Collection fill(List fillArgs) {
      ProjectDAO projectDAO = new ProjectDAO();
      System.out.println("----- 33 ");
      Collection c = projectDAO.returnProjects();
      return c;

      public Object getItem(Map identity) {
      ProjectDAO projectDAO = new ProjectDAO();
      ProjectBean prj = new ProjectBean();
      return prj;

      public void createItem (Object obj) {
      ProjectDAO projectDAO = new ProjectDAO();
      System.out.println("----- 33 ");
      ProjectBean prj = (ProjectBean)obj;
      projectDAO.insertProject(prj.getProjectName(), prj.getProjectDescription());
      Data Management Service.xml
      <destination id="project">

      <adapter ref="java-dao" />


      <identity property="id"/>

      <paging enabled="false" pageSize="10" />
      <throttle-inbound policy="ERROR" max-frequency="500"/>
      <throttle-outbound policy="REPLACE" max-frequency="500"/>

      Please help me in this.