DataWriter Example does not work with DirectProxy
In the Grid Writer example, if you replace the HttpProxy with a DirectProxy only the read API call works:
http://www.extjs.com/deploy/dev/exam...er/writer.html- The read works fine and the grid populates :D
- Request:
Code:
{"action":"WriterDirect","method":"readUserInfo","data":null,"type":"rpc","tid":2}
- Response:
Code:
{"tid":2,"action":"WriterDirect","method":"readUserInfo","result":{"total":
0,"success":true,"message":"Here is your example data...","data":[{"id":
1,"email":"user@example.com","first":"UserFirst","last":"UserLast"}]},
"type":"rpc"}
- the delete does not send an ID so that fails on the server
- Req:
Code:
{"action":"WriterDirect","method":"destroyUser","data":[],"type":"rpc","tid":3}
- Resp:
Code:
{"tid":3,"action":"WriterDirect","method":"destroyUser","message":
"ArrayIndexOutOfBoundsException: 0","where":
"java.lang.ArrayIndexOutOfBoundsException:...",
"type":"exception"}
- the create blows up in the Ext.direct.RemotingProvider doForm method ext-all-debug.js:39939 ... The error is "form is undefined"
- the update blows in the same place saying "form is undefined"
ext-all-debug.js:39939 (version 3.2.0)
Code:
var isUpload = String(form.getAttribute("enctype")).toLowerCase() == 'multipart/form-data',
I'm pulling the same ext libraries as the example.
wait, it must be my API instead of DirectProxy
Quote:
Originally Posted by
jcalfee
In the Grid Writer example, if you replace the HttpProxy with a DirectProxy only the read API call works
Hold up... I think I had an error in my API. I'm still working this out. Thanks...jc