Community
Participate
Working Groups
Environment: Chrome 5.0.375.70 and Firefox 3.6.3 on Ubuntu Linux 10.04 In certain circumstances upload widget fails with the following javascript error: Could not evaluate javascript response: Error: Error in property lastFileUploaded of class org.eclipse.rwt.widgets.Upload in method setLastFileUploaded with incoming value 'null': Null value is not allowed! It seems to happen when the reset() method is called after the widget is created but before the javascript code creating it is returned to the client (i.e. within the same life cycle). I managed to reproduce it by slightly modifying EntryPoint class inside the org.eclipse.rwt.widgets.upload.demo bundle: ... this.upload = new Upload(this.uploadContainer, getStyle(), getUploadFlags()); this.upload.reset(); // <-- ADDED LINE this.upload.setBrowseButtonText(this.browseBtnText); ... I believe the solution is to change the reset() method so that it sets lastFileUploaded to "" and not to null. This solved the problem for me but at the same time led to another javascript error which I wasn't able to debug. The error is different under Chrome and Firefox. Under Chrome: Could not evaluate javascript response: TypeError: Cannot set property 'value' of undefined Under Firefox: Could not evaluate javascript response: TypeError: this._input is undefined
Fixed in CVS HEAD.
Thanks!
Can we have it backported to v13_Maintenance?
Upload widget from sandbox in not part of the build. Thus, I have no idea which state of the upload widget corresponds (work with) to 1.3. But the fix is to replace the line 279 in Upload.js: --- if (this._uploadField) { --- with: --- if (this._uploadField.isCreated()) { You could port it yourself in your Upload widget.
Ok, thanks.