ADF 查询 - 在初始页面加载时显示所有数据
我有一个包含 ADF 查询和 Trinidad 表的页面。使用 af:query 进行搜索效果很好,并用数据填充表。
在初始页面加载时(当我第一次进入页面时),当未进行搜索时,tr:table 为空。我想更改此默认行为,并使表格显示所有数据,直到进行搜索。当我按下带有空查询的“搜索”按钮时,所有数据都会被获取。因此,正如我所见,我需要在页面加载时执行空查询搜索并使用所有数据填充表。问题是,如何?或者是否有另一种方法可以在进行搜索之前获取表中的所有数据?
如果有任何帮助,我使用的组件的代码:
<af:query id="qryId1" headerText="Search"
disclosed="true"
value="#{bindings.WcSpaceHeaderViewSearchCryteriaQuery1.queryDescriptor}"
model="#{bindings.WcSpaceHeaderViewSearchCryteriaQuery1.queryModel}"
queryListener="#{bindings.WcSpaceHeaderViewSearchCryteriaQuery1.processQuery}"
queryOperationListener="#{bindings.WcSpaceHeaderViewSearchCryteriaQuery1.processQueryOperation}"
resultComponentId="::t3" saveQueryMode="hidden"
displayMode="compact"/>
....
</af:query>
<tr:table value="#{bindings.WcSpaceHeaderView14.collectionModel}"
var="row"
rows="#{iteratorBacking.rowsPerPage}"
emptyText="#{bindings.WcSpaceHeaderView14.viewable ? 'No data to display.' : 'Access Denied.'}"
id="t3"
width="960"
partialTriggers="qryId1 ctb1 ctb2 ctb3">
...
</tr:table>
谢谢。
I have a page with ADF Query and Trinidad table. Searching with af:query works well and populates the table with data.
On initial page load (when I enter the page for the first time), when no search was made, the tr:table is empty. I would like to change this default behaviour and make the table display all of the data until a search is being made. When I press the 'search' button with empty query, all data is being fetched. So, as I see it, I would need to execute a empty query search on page load and populate the table with all of data. The question is, how? Or is there another way to get all data in the table before search is made?
If it is any help, the code of components I've used:
<af:query id="qryId1" headerText="Search"
disclosed="true"
value="#{bindings.WcSpaceHeaderViewSearchCryteriaQuery1.queryDescriptor}"
model="#{bindings.WcSpaceHeaderViewSearchCryteriaQuery1.queryModel}"
queryListener="#{bindings.WcSpaceHeaderViewSearchCryteriaQuery1.processQuery}"
queryOperationListener="#{bindings.WcSpaceHeaderViewSearchCryteriaQuery1.processQueryOperation}"
resultComponentId="::t3" saveQueryMode="hidden"
displayMode="compact"/>
....
</af:query>
<tr:table value="#{bindings.WcSpaceHeaderView14.collectionModel}"
var="row"
rows="#{iteratorBacking.rowsPerPage}"
emptyText="#{bindings.WcSpaceHeaderView14.viewable ? 'No data to display.' : 'Access Denied.'}"
id="t3"
width="960"
partialTriggers="qryId1 ctb1 ctb2 ctb3">
...
</tr:table>
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,可以在“查看条件”设置中设置页面加载时的自动搜索。在“UI 提示”选项卡中选中“自动查询”即可。当我进入该页面时,我得到了我想要的所有结果。
It turns out, that the automatic search on page load can be set in the View Criteria settings. In the tab UI Hints check Query Automatically and that's all. When I enter the page I get all results I wanted.