Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    dataPath issue

    I have used dataPath in form below

    isc.DynamicForm.create({
    dataSource:"PaymentDataSource",
    ID:"PaymentCreateForm",
    autoDraw:false,
    numCols:"6",
    fields:[
    {name:"paymentAmount",type:"float",title:"paymentAmount",keyPressFilter:"[0-9.]"},
    {name:"customer",type:"select",title:"customer",required:true,
    dataPath:"/customer/customerId",optionDataSource:"CustomerDataSource",displayField:"firstName",valueField:"customerId"},
    {name:"lastUpdate",type:"date",title:"lastUpdate",required:true,dateFormatter:"toUSShortDate"},
    {name:"paymentDate",type:"date",title:"paymentDate",required:true,dateFormatter:"toUSShortDate"}
    ]
    });

    When I submit this form following xml is posted to server, please see that customer element is empty.

    <Payment>
    <lastUpdate>2011-07-26T18:30:00</lastUpdate>
    <paymentDate>2011-07-26T18:30:00</paymentDate>
    <paymentAmount>10</paymentAmount>
    <customer> </customer>
    </Payment>


    But if I change type of paymentAmount (first field in form) to text then following xml is posted to server as desired

    <Payment>
    <lastUpdate>2011-07-26T18:30:00</lastUpdate>
    <paymentDate>2011-07-26T18:30:00</paymentDate>
    <paymentAmount>33</paymentAmount>
    <customer>
    <customerId>1</customerId>
    </customer>
    </Payment>

    I am using SmartClient 8.0 Evaluation version.
Working...
X