0

I have an xPages form editing a document, which can be edited automatically (as a datasource) coming frme a view. But you can also input directly (in an input field) the key of the document; then (if it exists) it will be searched in the database (converting the key in an UNID). The matter is that in this case it is not the currentDocument and custom controls tests (for example for displaying buttons) do not work.

So my question is how to "convert" a programmatically searched document in the database (by UNID) to the normal datasource currentDocument, so normal controls can be apply to it too ?

Thanks if you know.

4

2 回答 2

1

Store the Unid in the session and compute the data source from there - or open the Form with the matching URL parameter

于 2013-04-29T11:21:34.537 回答
0

您的问题出在 URL 中:它不包含用于初始化默认数据源的参数。恕我直言,这是修复它的最简单方法:本机 Domino 链接和 XPages

我不确定它是否会有所帮助,这取决于context.getUrl(). 如果没有,您需要按照 Stephan 的建议重定向到您从 UNID 计算的 URL。

于 2013-05-02T09:09:00.167 回答