on 05-16-2022 2:43 PM
Hello Community,
I have found a behavior, which I would not expect in our Fiori Elements App (using OData V4, ui5template.fiorielements.v4.lrop, Flexible Column Layout)
On the object Page I have bound an entity.
Also there is a table with 0..n to_subentity.
When creating a new entry or editing an existing entry in this table the "endcolumn" is opening and I am able to edit it there. All fine so far.
But:
After pushing the "Apply" button the changes are not visible in the table. It seems like a refresh is missing after pushing "Apply", because, when I refresh the whole page or pushing "Save" on the middle column page the changes are there. Is there any solution for that or is that the expected behavior?
Thank you for any advice.
Kind regards,
Eike
Hi Eike,
For this what you can to do is call the API which gets called during refresh. You need to check in Network Tab while debugging which API causes refresh.
In your case you need to attach event for the apply button of the table in OnInit
oTableApplyBtn.attachEvent("press", jQuery.proxy(this.onPressApply, this));
In this method you need to call the API and refresh the table model.
onPressApply:function(){
sPath="give your api path";
this.getView().getModel().read(sPath,
{
success:function(odata){
this.getView().byId(
"oTableApplyBtn"
).getModel().refresh();
}.bind(this),
error:function(oerr){
}
}
).bind(this);
}
This will trigger the refresh functionality.
Hope this was useful.
Regards,
Ashwin Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashwin,
Thank you for your answer.
I see two problems in this solution.
1. How to attachEvent on a generic button in Fiori Elements?
2. The read request of the new function onPressApply will be asynchron to the generic logic of the Apply Button. So the read request will not get the asynchron submited changes.
If you find any other solution, feel free to answer again.
Kind regards,
Eike
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.