Flex/LCDS 服务器到数据源分页
我正在尝试设置数据源分页服务的服务器。 我已经完成了所有设置,以便调用我的汇编器并返回值,但我没有收到“分页”调用。
具体来说:
public Collection fill(List fillArgs, int begin, int rows)
始终使用 begin == -1
和 rows == -1
调用,而不是获取实际值进行分页。 另外:
public boolean useFillPage(List fillParameters)
永远不会被调用(我的实现总是为所有参数返回 true)。 看起来它从未被调用,因为 JavaAdapter 没有从 Flex 客户端接收 pageSize 标头。
这是我的目标配置:
<destination id="invoiceListDataService">
<adapter ref="java-dao" />
<properties>
<scope>session</scope>
<source>com.williams.finance.invoice.dao.InvoiceReviewListAssembler</source>
<network>
<paging enabled="true" pageSize="100" />
</network>
<metadata>
<identity property="invoiceNumber"/>
</metadata>
</properties>
</destination>
以及用于调用数据服务的 Flex 代码:
myDataService = new DataService("invoiceListDataService");
myDataService.autoSyncEnabled=false;
myDataService.fill(invoiceReviewListModel.invoiceList, params);
我在这里遗漏了什么吗? 有什么想法从哪里开始寻找吗?
I’m trying to set up a server to data-source paged service. I’ve got everything set up so that I’m getting my assembler called and am returning values, but I’m not getting “paged” calls.
Specifically:
public Collection fill(List fillArgs, int begin, int rows)
is always called with begin == -1
and rows == -1
, instead of getting real values to page through. In addition:
public boolean useFillPage(List fillParameters)
is never called (my implementation always returns true for all parameters). It looks like it is never called because the JavaAdapter is not receiving the pageSize header from the Flex client.
This is my destination configuration:
<destination id="invoiceListDataService">
<adapter ref="java-dao" />
<properties>
<scope>session</scope>
<source>com.williams.finance.invoice.dao.InvoiceReviewListAssembler</source>
<network>
<paging enabled="true" pageSize="100" />
</network>
<metadata>
<identity property="invoiceNumber"/>
</metadata>
</properties>
</destination>
And my Flex code for calling the data service:
myDataService = new DataService("invoiceListDataService");
myDataService.autoSyncEnabled=false;
myDataService.fill(invoiceReviewListModel.invoiceList, params);
Am I missing something in here? Any ideas where to start looking?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先,您的适配器定义是什么?
试试这个:
其次,将 custom="true" 属性添加到您的 paging 属性中。
第三,可能将您的范围更改为应用程序
第四,在您的目标定义中,添加adapter =“java-dao”而不是对其进行引用。
第五,确保您覆盖了必要的方法(useFillPage、Collection fill 等)。
请参阅此线程以获取对类似问题的一些有用的响应:
http://www.mail-archive.com/[电子邮件受保护]/msg111746.html
First, What is your adapter definition?
Try this:
Second, add custom="true" attribute to your paging property.
Third, possibly change your scope to application
Fourth, in your destination definition, add adapter="java-dao" instead of having a reference to it.
Fifth, make sure you're Overridding the necessary methods (useFillPage, Collection fill, etc.)
See this thread for some helpful responses to a similar problem:
http://www.mail-archive.com/[email protected]/msg111746.html
您的目标配置看起来已完成。
仔细检查您的汇编器是否扩展了 AbstractAssembler:
并且至少覆盖了以下内容:
Your destination configuration looks complete.
Double check that you assembler extends AbstractAssembler:
and that you override the following at minimum: