-
14 Mar 2010 8:21 AM #1
Problem with form params and ExtDirect
Problem with form params and ExtDirect
Hi,
i have the following problem:
FormLoad
works fine as long i don't use formHandler: true in api.
without formHandler setting:
sent: {"action":"ExtDirect","method":"loadUploadExtToTer","data":null,"type":"rpc","tid":4}
receive: {"type":"rpc","tid":4,"action":"ExtDirect","method":"loadUploadExtToTer","result":{"success":true,"data":{"fe_u":"user","fe_p":"password"}}}
with formHandler setting:
error: form.getAttribute is not a function
Form submit
with formHandler setting:
server side exception, sent is a POST array like
without formHandler setting:Code:extAction ExtDirect extKey context_help extMethod uploadExtToTer extTID 5 extType rpc extUpload false fe_p password fe_u user
sent: {"action":"ExtDirect","method":"uploadExtToTer","data":[{}],"type":"rpc","tid":5}
So basically i get what i need without formHandler setting, but with submit, no form data is in the "data" object.
I also played with paramsAsHash, but this seems only something for load, it has to be false in this situation to work.
i use:
What do i miss, why doesn't formHandler work, how to get formValues in data-object?Code:api: { load: TYPO3.EM.ExtDirect.loadUploadExtToTer, submit: TYPO3.EM.ExtDirect.uploadExtToTer }, paramsAsHash: false, baseParams: {extKey: record.data.extkey},
Thanks for taking the time.vg Steffen
--------------------------------------
Release Manager of TYPO3 4.5
energlobe.de - german online magazine
-
14 Mar 2010 5:03 PM #2
The problem was the scope with form submit.
i now rewrote the FormPanel so scope is the form in handler where i do the submit.
now i get this error which doesn't help me a lot:
Code:uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: http://em.local.com/typo3/contrib/extjs/adapter/ext/ext-base-debug.js :: asyncRequest :: line 2590" data: no]
vg Steffen
--------------------------------------
Release Manager of TYPO3 4.5
energlobe.de - german online magazine
-
14 Mar 2010 5:38 PM #3
ok, solved above problem by applying the settings in onRender
but problem with missing formVals in post json data remain.Code:onRender: function() { TYPO3.EM.TerUpload.superclass.onRender.apply(this, arguments); Ext.apply(this.getForm(),{ api: { load: TYPO3.EM.ExtDirect.loadUploadExtToTer, submit: TYPO3.EM.ExtDirect.uploadExtToTer }, paramsAsHash: false }); this.form.load(); }vg Steffen
--------------------------------------
Release Manager of TYPO3 4.5
energlobe.de - german online magazine
-
15 Mar 2010 9:39 AM #4
Finally we changed the API Implementation in TYPO3 to work with formHandler setting and all works fine now, so problem is solved.
Maybe, if someone knows why the hash is empty, feel free to answer.vg Steffen
--------------------------------------
Release Manager of TYPO3 4.5
energlobe.de - german online magazine


Reply With Quote