0
votes

I am XPagifying an existing Notes Client Application. All the design elements for the XPages part are in a separate database and I am referencing the old database in my data source settings like this:

"servername!!database path and name".

I have one XPage that is being used to create new documents, which are going to be stored in the old database.

However, when I am saving the document, it is not being created and saved in the old database, but in the new database, even though the data source is pointing to the old database.

What does make it work though, is, when I add a databaseName parameter to the URL that opens the XPage, which looks then something like this:

https:// servername/database.nsf/xCreatDocument.xsp?databaseName=targetservername!!targetdatabase.nsf

Do I have to add this to the URL or is there another way to force my XPage to create the document in the other database?

Any help is highly appreciated.

Update 1: 04/06

It seems that the URL has to either contain the parameter "databaseName" as mentioned before or it needs to look like this:

https:// servername/database.nsf/xCreatDocument.xsp?action=newDocument

Then the document will be stored in the target database. I am not sure that there is another way to do it. It seems your URL has to have either one of the URL parameters.

2

2 Answers

0
votes

Check your datasource. It should be set something like this.

<xp:this.data>
    <xp:dominoDocument var="document1" formName="myform"
        databaseName="myserver/mydomain!!mydb.nsf">
    </xp:dominoDocument>
</xp:this.data>
0
votes

If you set the dataSource property ignoreRequestParameters to true then the code you create will override the default behaviors. But then the action=NewDocument will also be meaningless, unless you test for it in the dataSource.action ssjs code.