简体   繁体   English

Progress 4GL - 如何创建无限滚动浏览

[英]Progress 4GL - How to create infinite scroll browse

We are using an older character based version of QAD's MFG/PRO running on Progress version 10.1.我们使用的是在 Progress 10.1 版上运行的基于角色的旧版 QAD MFG/PRO。 On one of the shipping tables, I've to create a browse that will display all records in a scrollable browse (sort of infinite scroll browse).在其中一个运输表上,我必须创建一个浏览,该浏览将在可滚动浏览(一种无限滚动浏览)中显示所有记录。 It will display first 10 records initially, but user will be able to scroll up or down in the browse, which should load previous or next record (up or down arrow key).它最初会显示前 10 条记录,但用户将能够在浏览中向上或向下滚动,这应该加载上一条或下一条记录(向上或向下箭头键)。

I was wondering how something like this can be achieved.我想知道如何实现这样的事情。 Preloading a temp-table with millions of records doesn't seem like a good idea, querying the database for every up or down arrow key press sounds equally bad.预加载包含数百万条记录的临时表似乎不是一个好主意,每次按下向上或向下箭头键都查询数据库听起来同样糟糕。 Does DEFINE BROWSE provides a way to achieve this? DEFINE BROWSE 是否提供了实现此目的的方法? Is there a way to code lazy loading type scenario?有没有办法编写延迟加载类型的场景?

Also, how the scenario would change if instead of a browse showing data from a single table, will combine data from multiple tables?此外,如果不是浏览显示单个表中的数据,而是合并多个表中的数据,场景会如何变化?

Any help/pointers in this regard will be helpful.这方面的任何帮助/指示都会有所帮助。 Also, if some best practices can be shared.另外,如果可以共享一些最佳实践。

You can look at the END and OFF-END events in the browse widget.您可以在浏览小部件中查看ENDOFF-END事件。 This will alert you when the user wants to scroll forward/backward.当用户想要向前/向后滚动时,这将提醒您。 The query associated with the browse also has an OFF-END event that you could look into using for this.与浏览相关的查询也有一个OFF-END事件,您可以考虑为此使用它。

Doc at https://docs.progress.com/bundle/abl-reference/page/High-level-widget-events.html#High-level-widget-events文档在https://docs.progress.com/bundle/abl-reference/page/High-level-widget-events.html#High-level-widget-events

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM