/[Apache-SVN]
ViewVC logotype

Revision 1867437


Jump to revision: Previous Next
Author: nmalin
Date: Tue Sep 24 08:54:51 2019 UTC (4 years, 6 months ago)
Changed paths: 1
Log Message:
Fixed: Send upload form with even-update-area doesn't work
(OFBIZ-11207)
When you create a xml form with upload as type, you can't use on-event-update-area element to submit it by ajax.
Otherwise, OFBiz return an error message on 'uploadFile is empty.
To solve it, we analyze the enctype's form before submit it to move on FormData instead a direct serialize [1]

example form where the problem has been present
****
    <form name='AddNicelyFile' type='upload' target='CreateNicelyFile'>
        <field name='uploadedFile' title='File'><file/></field>
        <field name='addButton'><submit/></field>
        <on-event-update-area event-type='submit' area-id='window' area-target='FileDisplaying'/>
    </form>
****

Thanks to Samuel Tregouet for this fix

[1] https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects

Changed paths

Path Details
Directoryofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/webapp/common/js/util/OfbizUtil.js modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26