cancel
Showing results for 
Search instead for 
Did you mean: 

view get scroll to top on model.refresh(true)

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

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

Qualiture
Active Contributor
0 Kudos

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?