]
Thiers Euller commented on RF-12273:
------------------------------------
I'm using version 4.3.2.FINAL and still giving this error. (Just replace the jars to
the latest version). I'm forgetting something?
rich:fileUpload does not work in portlets because it does not utilize
javax.faces.encodedURL for the XmlHttpRequest URL
-----------------------------------------------------------------------------------------------------------------------
Key: RF-12273
URL:
https://issues.jboss.org/browse/RF-12273
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component, portal
Affects Versions: 4.2.0.Final
Reporter: Neil Griffin
Assignee: Ken Finnigan
Fix For: 4.2.3.CR1, 4.3.0.M2
The fileupload.js JavaScript resource has a bug such that it uses the form's
"action" attribute as the XmlHttpRequest URL, rather than the
"javax.faces.encodedURL" hidden field value.
I think this is where the problem exists:
{code} __submit: function() {
var originalAction = this.form.attr("action");
var originalEncoding = this.form.attr("encoding");
var originalEnctype = this.form.attr("enctype");
try {
var delimiter = originalAction.indexOf("?") == -1 ?
"?" : "&";
this.form.attr("action", originalAction + delimiter + UID +
"=" + this.loadableItem.uid);
this.form.attr("encoding",
"multipart/form-data");
this.form.attr("enctype",
"multipart/form-data");
richfaces.submitForm(this.form,
{"org.richfaces.ajax.component": this.id}, this.id);
richfaces.Event.fire(this.element, "onfilesubmit",
this.loadableItem.model);
} finally {
this.form.attr("action", originalAction);
this.form.attr("encoding", originalEncoding);
this.form.attr("enctype", originalEnctype);
this.loadableItem.input.removeAttr("name");
}
},{code}
Until this is fixed, the component will not function in a portlet environment.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: