on 07-24-2015 12:27 PM
Hi,
I have a UI5 (javascript) application where i have an icontabbar which has multiple icontabfilters. Each IconTabFilter has a sap.ui.layout.form.Form for content.
Each IconTabFilter is basically a view and has a back button. What is the best way to clear all the forms of all the icontabfilters? Basically i need to set the whole icontabbar to the way it was when first opened/loaded.
Going through all the fields of a form clearing the values and setting their valuestates, changing all the icons etc is tedious and doesn't feel reasonable to me.
Is there a better, cleaner more efficient way of doing this?
create 1 json model and bind that model to your corresponding view and form elements like below,
commonModel = {
form1Visible: false,
form1ValueState: false,
};
var oModel = new sap.ui.model.json.JSONModel(this.commonModel);
this.getView().setModel(oModel, "CommonModel");
In view,
visible="{CommonModel>/form1Visible}"
so if you want those as visible then,set that corresponding property value as true or false based on your requirement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think what need to be done is the reset the value like this
JS Bin - Collaborative JavaScript Debugging
Thanks
-D
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.