on 12-22-2014 9:49 AM
Hi All,
I have view in which various textField are present which are also dependent on each other. So When I update one textField which modify other text boxes values. but I am doing these changes through model. view is bind to model. on change event of TextField I update model and then do
this.getView().getModel("myModelName").refresh(true);
Its work perfectly fine also update my view with updated values. But every time I do model_refresh it scroll view to top. There are few textField which are in bottom of view or page which causes view to scroll to top in on-change event, which is annoying. Any Idea on how to avoid view to scroll top on model_refresh.
I am using SplitApp control.
Any help is appreciated.
Thanks in advanced
Hi Sanket
The issue is passing the "true" parameter.
When true is passed, UI5 updates the control even if data has not been changed and tries to bring it in focus.
Please use refresh() instead of refresh(true)
Hope this was helpful.
Thanks and Regards
Shubhang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not sure if it will solve your issue, but the 'true' flag you use when refreshing the model updates all the bound controls (including the view)
BTW, under normal circumstances, if you have bound your controls properly you should not even need to refresh your model. (I have never ever used a model refresh)
Can't you just leave the model refresh line out?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.