on 08-30-2016 2:04 PM
The setUploadUrl method does not work, when I used it I found that the url is still a default one i.e " ../../../upload", then I tried to build a model on the controller with a url and pass it to the uploadCollection in this way:
On the view I bound the uploadUrl property to the model:
uploadUrl="{/uploadURL/path}
On the controller I instatiated a model and set it to the uploadCollection, I have tried setting the model inside the onChange event of the uploadCollection and also outside it, even though the uploadCollection got the model the url still was the default one:
var oData = {
uploadURL: {
path: "my Server Url/my service/Applications('" +parameter1 + "','" + parameter2 + "')/App_Attachments"
}
};
var oModel1 = new JSONModel(oData);
var oUploadCollection = this.getView().byId("UploadCollection");
oUploadCollection.setModel(oModel1);
I found the solution to this problem. I used setProperty in the ff way:
var url = "my Server Url/my service/Applications('" +parameter1 + "','" + parameter2 + "')/App_Attachments";
oUploadCollection.setProperty("uploadUrl", url);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.