Thread: [Xsltforms-support] Problem with the file uplaod work around in beta3
Brought to you by:
alain-couthures
From: Raja <m.r...@ni...> - 2011-04-20 11:36:03
|
Hi Philip !!!! The same situation and problem we too faced but, with the help of alain's XSLTForms_with_eXistdb document we solved there is no issue . working fine .. By Rajamani marimuthu XRX Team OTC On 04/20/11, Philip Fennell <Phi...@ma...> wrote: > > > > > > > > > > > > > > > Two of my XForms rely upon the file upload work around detailed in XRX/XSLTForms and eXist Wikibook: > > > > http://en.wikibooks.org/wiki/XRX/XSLTForms_and_eXist#Upload_file_with_XSLTForms > > > > Since moving to XSLTForms Beta 3 I have noticed that submitting the form, without selecting a document to upload, causes the two following error messages (see end of e-mail) to appear. I’m using Firefox 3.6.10 on Windows 7. > > > > The sending of the instance data works OK but something, elsewhere, is causing a problem. Please also note that I am sending a 204 (No Content) response from the server because I don’t want the page to reload as a result of the upload. If I send 200 (Success) > then I get no error messages I guess because the form is no longer there to complain about something. > > > > Currently I do two sequential submits, if the first succeeds the then upload is sent. Ideally I’d like to be able to set a flag in an instance in the data model so that the upload will be sent if I have selected a resource to upload and not otherwise. > I’ve tried a quick test using: > > > > document.getInstanceDocument('instance').hasChildChildNodes() > > > > to see if I can get some java_script working , but I got nothing back. I guess I’m not calling that method correctly. > > > > Anyone have any hints as to either the error message and/or using the getInstanceDocument method. > > > > > > Regards > > > > Philip Fennell > > > Consultant > > > MarkLogic Corporation > > > > > > One Kingdom Street > > Paddington Central > > London W2 6BD > > United Kingdom > > > > Mobile: +44 (0) 7824 830 866 > > Tel: +44 (0) 203 402 3619 > > > > > email Phi...@ma... > > > web www.marklogic.com > > > > > > > > > > > > > > XSLTForms Exception > > > -------------------------- > > > > > > Error initializing : > > > > > > ()@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:2894 > > > ([object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7387 > > > ([object HTMLSpanElement],"xforms-submit")@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7285 > > > ([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3280 > > > ([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3141 > > > ([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3126 > > > forEach([object Array],"execute",[object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1183 > > > ([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3174 > > > ([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3141 > > > ([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3126 > > > run([object Object],"update-instance",[object Event],false,true)@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1328 > > > ([object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/admin/peer_reviews:161 > > > ([object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7172 > > > ([object HTMLSpanElement],"xforms-submit-done",null,true,false,(function () {}),[object Object])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7282 > > > ()@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:2755 > > > ()@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:2891 > > > ([object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7387 > > > ([object HTMLSpanElement],"xforms-submit")@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7285 > > > ([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3280 > > > ([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3141 > > > ([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3126 > > > forEach([object Array],"execute",[object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1183 > > > ([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3174 > > > ([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3136 > > > ([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3126 > > > run([object Object],"xf-trigger-4",[object Event],false,true)@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1328 > > > ([object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/admin/peer_reviews:258 > > > ([object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7172 > > > ([object HTMLSpanElement],"DOMActivate")@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7282 > > > ([object HTMLButtonElement])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:5495 > > > ([object MouseEvent])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1583 > > > > > > > > > ReferenceError > > > > > > DebugConsole is not defined > > > > > > > > > > > > > > > > > > > > > > > > > > > XSLTForms Exception > > > -------------------------- > > > > > > Error initializing : > > > > > > ()@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:2894 > > > ([object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7387 > > > ([object HTMLSpanElement],"xforms-submit")@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7285 > > > ([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3280 > > > ([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3141 > > > ([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3126 > > > forEach([object Array],"execute",[object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1183 > > > ([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3174 > > > ([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3136 > > > ([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3126 > > > run([object Object],"xf-trigger-4",[object Event],false,true)@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1328 > > > ([object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/admin/peer_reviews:258 > > > ([object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7172 > > > ([object HTMLSpanElement],"DOMActivate")@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7282 > > > ([object HTMLButtonElement])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:5495 > > > ([object MouseEvent])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1583 > > > > > > > > > ReferenceError > > > > > > DebugConsole is not defined > > > > > > > > > > > > > > > -- Rajamani Marimuthu Junior Research Fellow-JRF NIC -Open Technology Centre Rajaji Bhavan Besant Nagar, Chennai - 90 Cell : 9677192096 |
From: Alain C. <ala...@ag...> - 2011-04-21 19:30:13
|
Philip, The exception seems funny because it is saying that the DebugConsole object doesn't exist but it was surely used before... With XSLTForms Beta 3, 200 OK is not the only response code to be considered as successful. But 204 No Content is a special one, don't you think? Did you try with @replace="none" instead? Thank you for your feedbacks! -Alain Le 20/04/2011 12:17, Philip Fennell a écrit : > Two of my XForms rely upon the file upload work around detailed in > XRX/XSLTForms and eXist Wikibook: > _http://en.wikibooks.org/wiki/XRX/XSLTForms_and_eXist#Upload_file_with_XSLTForms_ > Since moving to XSLTForms Beta 3 I have noticed that submitting the > form, without selecting a document to upload, causes the two following > error messages (see end of e-mail) to appear. I'm using Firefox 3.6.10 > on Windows 7. > The sending of the instance data works OK but something, elsewhere, is > causing a problem. Please also note that I am sending a 204 (No > Content) response from the server because I don't want the page to > reload as a result of the upload. If I send 200 (Success) then I get > no error messages I guess because the form is no longer there to > complain about something. > Currently I do two sequential submits, if the first succeeds the then > upload is sent. Ideally I'd like to be able to set a flag in an > instance in the data model so that the upload will be sent if I have > selected a resource to upload and not otherwise. I've tried a quick > test using: > document.getInstanceDocument('instance').hasChildChildNodes() > to see if I can get some JavaScript working , but I got nothing back. > I guess I'm not calling that method correctly. > Anyone have any hints as to either the error message and/or using the > getInstanceDocument method. > Regards > Philip Fennell > Consultant > MarkLogic Corporation > > One Kingdom Street > Paddington Central > London W2 6BD > United Kingdom > Mobile: +44 (0) 7824 830 866 > Tel: +44 (0) 203 402 3619 > > ema...@ma... > <mailto:Fir...@ma...> > webwww.marklogic.com <http://www.marklogic.com/> > XSLTForms Exception > -------------------------- > > Error initializing : > > ()@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:2894 > ([object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7387 > ([object > HTMLSpanElement],"xforms-submit")@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7285 > ([object HTMLSpanElement],[object Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3280 > ([object HTMLSpanElement],[object Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3141 > ([object HTMLSpanElement],[object Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3126 > forEach([object Array],"execute",[object HTMLSpanElement],[object > Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1183 > ([object HTMLSpanElement],[object Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3174 > ([object HTMLSpanElement],[object Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3141 > ([object HTMLSpanElement],[object Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3126 > run([object Object],"update-instance",[object > Event],false,true)@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1328 > ([object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/admin/peer_reviews:161 > ([object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7172 > ([object > HTMLSpanElement],"xforms-submit-done",null,true,false,(function () > {}),[object > Object])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7282 > ()@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:2755 > ()@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:2891 > ([object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7387 > ([object > HTMLSpanElement],"xforms-submit")@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7285 > ([object HTMLSpanElement],[object Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3280 > ([object HTMLSpanElement],[object Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3141 > ([object HTMLSpanElement],[object Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3126 > forEach([object Array],"execute",[object HTMLSpanElement],[object > Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1183 > ([object HTMLSpanElement],[object Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3174 > ([object HTMLSpanElement],[object Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3136 > ([object HTMLSpanElement],[object Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3126 > run([object Object],"xf-trigger-4",[object > Event],false,true)@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1328 > ([object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/admin/peer_reviews:258 > ([object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7172 > ([object > HTMLSpanElement],"DOMActivate")@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7282 > ([object > HTMLButtonElement])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:5495 > ([object > MouseEvent])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1583 > > > ReferenceError > > DebugConsole is not defined > > > > > > > > > XSLTForms Exception > -------------------------- > > Error initializing : > > ()@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:2894 > ([object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7387 > ([object > HTMLSpanElement],"xforms-submit")@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7285 > ([object HTMLSpanElement],[object Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3280 > ([object HTMLSpanElement],[object Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3141 > ([object HTMLSpanElement],[object Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3126 > forEach([object Array],"execute",[object HTMLSpanElement],[object > Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1183 > ([object HTMLSpanElement],[object Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3174 > ([object HTMLSpanElement],[object Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3136 > ([object HTMLSpanElement],[object Element],[object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3126 > run([object Object],"xf-trigger-4",[object > Event],false,true)@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1328 > ([object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/admin/peer_reviews:258 > ([object > Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7172 > ([object > HTMLSpanElement],"DOMActivate")@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7282 > ([object > HTMLButtonElement])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:5495 > ([object > MouseEvent])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1583 > > > ReferenceError > > DebugConsole is not defined > > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |