UI5 table的三种工作模式:VisibleRowCountMode, Fixed, Auto和Interactive

Background

This issue is written for Li Ke’s issue on CBA customer report support.
When creating instance of sap.ui.Table instance, you can specify three different kinds of RowCountMode:

UI5 table的三种工作模式:VisibleRowCountMode, Fixed, Auto和Interactive

Fixed mode

In the runtime, the number of visible row in UI is ONLY determined by property VisibleRowCount.
For example I have 100 records but VisibleRowCount set as 2,

UI5 table的三种工作模式:VisibleRowCountMode, Fixed, Auto和Interactive

If you use this mode, best practice is to bind the property VisibleRowCountMode to the length property of your OData/JSON model.

Auto mode

In this mode, the height of the container which holds the table instance will be automatically set according to your actual data records volume. In this mode, do not bind VisibleRowCount property.
For example if I have 100 records:

UI5 table的三种工作模式:VisibleRowCountMode, Fixed, Auto和Interactive

If I have 1 record: ( compare the difference with Fixed mode )

UI5 table的三种工作模式:VisibleRowCountMode, Fixed, Auto和Interactive

Interactive mode

Almost the same as Fixed model, except the fact that customer can drag the grip to make more rows displayed, this is what “Interactive” means.
See this video for detail.
Why my Auto mode does not work? I only see 5 rows although I have far more records than that. I expect more table rows are displayed instead of 5 rows.
Logic: The number of visible rows is determined by table parent container’s height.

UI5 table的三种工作模式:VisibleRowCountMode, Fixed, Auto和Interactive

If no height of parent container is identified, the number of visible rows is property MiniAutoRowCount. If this property is not specified by developer either, default and hard coded 5 is used.

UI5 table的三种工作模式:VisibleRowCountMode, Fixed, Auto和Interactive

See this * question for more detail: http://*.com/questions/22510073/sap-ui-table-table-visiblerowcountmode-auto-mode-does-not-work
and this SCN question: https://scn.sap.com/thread/3395286
Tested on this UI5 version:

UI5 table的三种工作模式:VisibleRowCountMode, Fixed, Auto和Interactive 要获取更多Jerry的原创文章,请关注公众号"汪子熙": UI5 table的三种工作模式:VisibleRowCountMode, Fixed, Auto和Interactive
上一篇:磁盘IO过高时的处理办法 针对系统中磁盘IO负载过高的指导性操作


下一篇:utmp, wtmp - 登 录 记 录(login records)