ViewPanel 按 StartKeys 过滤器...但寻呼机不更新 [英] ViewPanel filter by StartKeys...but pager don't Update

查看:14
本文介绍了ViewPanel 按 StartKeys 过滤器...但寻呼机不更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将属性 StartKeys 用于 ViewPanel 控件..但是寻呼机没有刷新以通过 SartKey 转到正确的页面.你有什么建议吗?

I use attribute StartKeys into ViewPanel control..but the pager are not refreshed for go to the correct Page by SartKey. Have you any suggest?

我的寻呼机在 ViewPanel 内

My pager is inside ViewPanel

<xp:viewPanel rows="30" id="viewPanel1" var="rowData" showUnreadMarks="true">
 ......column value....
<xp:pager partialRefresh="true" layout="Previous Group Next" id="pager1" 
styleClass="vhead3" for="viewPanel1" alwaysCalculateLast="true"
partialExecute="true"> 
</xp:pager>
</xp:viewPanel>

推荐答案

这里没有错误.如果你想改变寻呼机,startKeys 不是你想要的.

There is not a bug here. If you want to change the pager, startKeys is not what you want.

这里有三个对象.XPage 运行时使用 database.getView("") 检索的 View 对象,使用在 dominoView 数据源的 viewName 属性中指定的视图名称.这是底层数据库视图,它不能被 dominoView 数据源修改.对于具有相同列的每个人来说,这是相同的视图.内容将仅在读者字段方面有所不同.

There are three objects in play here. The View object retrieved by the XPages runtime using database.getView("") using the view name specified in the viewName property of the dominoView datasource. That is the underlying database view and it cannot be modified by the dominoView datasource. It's the same view for everyone with the same columns. The content will differ only in respect of Readers fields.

dominoView 数据源允许您针对此用途细化基础视图的内容 - 搜索选项、过滤器以及此处的 startKeys.这不会改变底层 View 对象中的内容.

The dominoView datasource allows you to refine the contents of the underlying view for this use - search options, filters and as here startKeys. That doesn't change what's in the underlying View object.

然后是视图面板或数据视图或您选择的任何内容.这是 dominoView 数据源的表示,寻呼机绑定到此.向前移动页面不会更改 dominoView 对象,它只会更改 ViewPanel 中显示的行.

Then the View Panel or Data View or whatever you choose. This is the representation of the dominoView datasource and the pager is bound to this. Moving forward a page will not change the dominoView object, it will just change the rows displayed in the ViewPanel.

因此在数据视图上设置第一个属性将告诉它从 dominoView 检索第 n 行,因此将更改分页器.但是,在 dominoView 上设置 startKeys 或 keys 或 search 属性将更改数据视图可用的视图条目,但不会更改应返回该 dominoView 的哪一行.如果您在 dominoView 中显示第 14 行,并且更改了应用于 dominoView 的过滤器,您仍将在数据视图中显示第 14 行.只是第 14 行现在是一个不同的 View Entry,因为 dominoView 的内容已经改变了.

So setting the first property on a Data View will tell it to retrieve the nth row from the dominoView, and so will change the pager. Setting the startKeys or keys or search property on the dominoView, however, will change the View Entries available to the Data View, but will not change which row from that dominoView should be returned. If you were showing row 14 from the dominoView and you change the filters applied to the dominoView, you'll still be showing row 14 in the Data View. It's just that row 14 will now be a different View Entry, because the contents of the dominoView will have changed.

基本上,它显示了 dominoView 数据源结果的正确页面.

Basically, it's showing the correct Page of the dominoView datasource results.

您期望 startKeys 属性应该应用于视图面板,而不是应用于 dominoView 以优化从 View 对象显示的结果.(我才刚刚意识到这就是我自己正在发生的事情,即使它在逻辑上是合理且正确的!)

You're expecting that the startKeys property should be applied to the View Panel, not applied to the dominoView to refine the results displayed from the View object. (And I've only just realised that's what is happening myself, even though it's logically sensible and correct!)

如果您想跳转到视图面板的特定页面或视图条目,您需要在视图面板上设置第一个属性或其他一些属性.如果您想细化可供用户使用的条目,您应该更改 dominoView 上的一个属性.

If you want to jump to a specific page or View Entry for the View Panel, you need to set the first property or some other property on the View Panel. If you want to refine the entries that are available for the user, you should change a property on the dominoView.

这篇关于ViewPanel 按 StartKeys 过滤器...但寻呼机不更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆