开发者

I cannot show returned java class data in AdvanedDataGridColumn of Flex AdvanedDataGrid

all guys I am developing with Flex + java + hibernate in one project. I am trying to add one more advanceddatagridcolumn in flex AdavanedDataGrid control. Actually it work very well but only except I added column’s data. I have no idea what should I do to make it out I am telling work flow. At first call select method in DeliveryService.class through the RemoteObject and then call DeliveryMgr.class for call business work. After get return list type return value it pass to presentation class to setting all of the selected return value. I can print trace log what I added column’s data in DeliveryPt.class but it cannot return to flex area. Strange thing is I can check out value of what I want to show data in DeliveryPt.class but it does not show up in AdvanedDataGridColumn of Flex.

Thank you for reading in Advance.

DeliverService.java

    public DeliveryService() {
    }public List<DeliveryPt> selectMaterialForReReceiptDelivery(String referenceNo,String team,String buyerCode,Integer kind,String sessionId){
        List<DeliveryPt> rtnList = new ArrayList<DeliveryPt>();
        List<Delivery> tmpList = new ArrayList<Delivery>();

        ApplicationContext ac = CommonResource.getAppcontext();
        DeliveryMgr dmgr = (DeliveryMgr)ac.getBean("DeliveryMgr");

        tmpList = dmgr.selectMaterialForReReceiptDelivery(referenceNo,team,buyerCode,kind,sessionId);

        for (int i=0; i<tmpList.size(); i++){
            DeliveryPt dp = new DeliveryPt(tmpList.get(i));
            rtnList.add(dp);
        }

        return rtnList;
    }
}

DeliveryPt.java

public class DeliveryPt {

//2011.02.23 New Added DeliverySlipNo to show in flex 
    public String DeliverySlipSlipNo;

    public DeliveryPt(Delivery delivery) {
        this.setDeliveryNo(delivery.getDeliveryNo());
        this.ReIncomeFlag = delivery.getReIncomeFlag();
        ApplicationContext ac = CommonResource.getAppcontext();
        StockMgr smgr = (StockMgr)ac.getBean("StockMgr");
        Stock stock = smgr.getStock(delivery.getStock_Id());

        if (delivery.getBooking() != null){

        this.setOrderType(delivery.getOrderType());
        this.setSalesOrderNo(delivery.getSalesOrderNo());
        this.setRemark(delivery.getRemark());
        this.setReferenceNo(stock.getReferenceNo());


        // 유저 참조값 시작.
        if(delivery.getDeliveryUser() != null){
            this.setDeliveryUserName(delivery.getDeliveryUser().getName());
        }
        if(delivery.getInsertUser() != null){
            this.setInsertUserName(delivery.getInsertUser().getName());
        }
        if(delivery.getUpdateUser() != null){
            this.setUpdateUserName(delivery.getUpdateUser().getName());
        }
        if(delivery.getExpiredUser() != null){
            this.setExpiredUserName(delivery.getExpiredUser().getName());
        }
        if (delivery.getBooking() != null){
            if(delivery.getBooking().getInsertUser() != null){
                this.setBookingUserName(delivery.getBooking().getInsertUser().getName());
            }
        }
        // 유저 참조값 끝.

        // 각종 날짜 입력.
        if (delivery.getDeliveryDate() != null){
            this.setDeliveryDate(delivery.getDeliveryDate());
        }
        if (delivery.getExpiredDate() != null){
            this.setExpiredDate(delivery.getExpiredDate());
        }
        if (delivery.getInsertDate() != null){
            this.setInsertDate(delivery.getInsertDate());
        }
        if (delivery.getUpdateDate() != null){
            this.setUpdateDate(delivery.getUpdateDate());
        }

        if (stock.getSizeLabel() != null){
            this.SizeLabelId = stock.getSizeLabel().getId();
        }


        this.Kind_id = stock.getKind_id();
        this.StockId = delivery.getStock_Id();
                  // assigned value to varilable
        this.DeliverySlipSlipNo = delivery.getDeliverySlip_SlipNo();


        if (stock.getColorMst() != null){
            this.ColorCode = stock.getColorMst().getColorCode();
            this.ColorName = stock.getColorMst().getColorName();
        }
        this.Color_Name = stock.getColor_Name();
        if (stock.getBuyer() != null){
            this.BuyerCode = stock.getBuyer().getCode();
            this.BuyerName = stock.getBuyer().getCode();
        }

        this.Team = stock.getTeam();
        this.CancelFlag = delivery.getCancelFlag();

    }

    public String getBookingUserId() {
        return BookingUserId;
    }

    public void setBookingUserId(String bookingUserId) {
        BookingUserId = bookingUserId;
    }

    public String getDeliveryUserId() {
        return DeliveryUserId;
    }

    public void setDeliveryUserId(String deliveryUserId) {
        DeliveryUserId = deliveryUserId;
    }

    public String getInsertUserId() {
        return InsertUserId;
    }

    public void setInsertUserId(String insertUserId) {
        InsertUserId = insertUserId;
    }

    public String getUpdateUserId() {
        return UpdateUserId;
    }

    public void setUpdateUserId(String updateUserId) {
        UpdateUserId = updateUserId;
    }

    public Integer getSizeLabelId() {
        return SizeLabelId;
    }

    public void setSizeLabelId(Integer sizeLabelId) {
        SizeLabelId = sizeLabelId;
    }

    public Integer getKind_id() {
        return Kind_id;
    }

    public voi开发者_运维百科d setKind_id(Integer kind_id) {
        Kind_id = kind_id;
    }

    public Integer getStockId() {
        return StockId;
    }

    public void setStockId(Integer stockId) {
        StockId = stockId;
    }


         //Getter and Setter
    public String getDeliverySlipSlipNo() {
        return DeliverySlipSlipNo;
    }

    public void setDeliverySlipSlipNo(String deliverySlipSlipNo) {
        DeliverySlipSlipNo = deliverySlipSlipNo;
    }
}

Delivery.java

@Entity

@Table(name="Delivery")

public class Delivery {

 public Delivery(){}        // Default Constructor

@Id @GeneratedValue(strategy=GenerationType.AUTO)

@Column(name="DeliveryNo")

private Integer DeliveryNo;//2011.02.25 Added

@Column(name="DeliverySlip_SlipNo",length=20)

private String DeliverySlip_SlipNo;

//Getters an Setters for DeliverySlip_SlipNo

public String getDeliverySlip_SlipNo() {
        return DeliverySlip_SlipNo;
}

public void setDeliverySlip_SlipNo(String deliverySlip_SlipNo) {
        DeliverySlip_SlipNo = deliverySlip_SlipNo;
}


Have you added the new column to the equivalent action script object mapped to the Java object?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜