Hi Jorge, Thanks for your reply
I have fixed this server side. But now my code still has issues when creating a new record. The problem here is not server side, because i'm just using an empty array.
I have one main.mxml with a datagrid, when you click on the button 'new'
it then addschild my file OrderForm.mxml
inside main.mxml
<mx:Button label="New"
enabled="{currentState != 'detail'}"
click="newRecord()"/>
and inside <![CDATA[ of main.mxml
private function newRecord():void
{
OrderForm.currentOrder = {orderid:0};
currentState = "detail";
}
then inside my OrderForm.mxml is
<mx:DateField id = "orderdate" formatString="YYYY-MM-DD" width="170" showToday="true" text ="{currentOrder.date}"/>
The currentOder is an array like this
public var currentOrder:Object = new Object();
I think the problem is a lot more simple than I am explaining it. It just want to create a blank entry form, with todays date in that field auto filled in. But if i am editing a record, it will fill in the data respectively (as it does perfectly now)