I am sending Javascript array with ajax using post method like this:
$.post(assignmentsubmitAddress, submittedUnitsArray,
In returning I am getting status OK
.
But when I wonna retrieve that data on server with PlayFramework2 Dynamic form object like this:
DynamicForm requestData = form().bindFromRequest();
System.out.println(requestData.toString());
I am getting in console:
Form(of=class play.data.DynamicForm$Dynamic, data={data[undefined]=}, value=Some(Form.Dynamic({undefined=})), errors={})
Why I'm getting this:
data={data[undefined]=}
How can I prepare java script data to be readed with play dynamic form?
How to read java script array in playframework?
The java script array list variable
submittedUnitsArray
is correct.BUT It should be passed to ajax posting function this way:
Now it works.