Multiple data sources in XPages

夙愿已清 提交于 2019-12-13 06:00:22

问题


I have 2 xpages that interact together. The first acts as a homepage and allows the user to create a new document and fill out some basic header information. The button to create the new document, sets a sessionScope var with the NoteID. It then saves document1 and opens the same document using another xpage.

The second xpages is bound to document1, and uses the sessionScope to edit the document. This xpages contains and editPanel bound to document2. I want to create a child document to document2. This works but what happens is document1 is also saved as conflict. It is also saved as a second main document.

I DO NOT want to save document1 at all, but can't seem to prevent it. The button that creates document2 uses the simple action save document, and specfies document2.

HELP, I have tried everything, and have been stuck on this for 2 days.

Thanks! Steve


回答1:


To bind to multiple datasources, on your XPage, under Properties expand Data and set "Ignore Request Params" to TRUE




回答2:


If you change the type of your buttons, to a simple button instead of a submit button, and handle the doc.save() yourself should solve your problem.




回答3:


The Save Document simple action accepts the name of the data source to save as a String argument. If supplied, it will only save that specific data source.



来源:https://stackoverflow.com/questions/13220390/multiple-data-sources-in-xpages

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!