Chris Richards
Chris Richards

Reputation: 705

Open document from another database

I'm displaying a view and associated documents on an xpage, however the view and documents are coming from another database. The view displays fine, but when I try to open a document in the view I get Error 404 HTTP Web Server: Item Not Found Exception. I'm pretty certain I know the issue, but looking for idea's around it.

The view is dynamic, and I tell it which view to open by passing in a custom property - The view has the setting to open document using xpage associated with he documents form. This works perfectly, as all forms in my database have the option set to display xpage on web access.

I think my issue, is that I although I have an xpage in my database to display the form, the form is located in another database, which is legacy, no xpage design at all, so when I try to set the display xpage on web access, I cannot choose the xpage from my database as it doesn't exist in this database.

I can't just put the xpage from database A into database B as it errors due to all the dependencies required that are not part of database B, so just wondered if anyone has worked around this before?

Thanks

I haven't added any code as I don't think its required, but if you need any, let me know

Upvotes: 0

Views: 292

Answers (1)

Paul Stephen Withers
Paul Stephen Withers

Reputation: 15739

Probably the best option is rather than using the in-built link option on your view component to point to the document and use the Form to determine the XPage, to add a Link control and build up the relevant URL to point to the XPages and set the relevant documentId, e.g. "myXPage?documentId=A45e". action can be set to "openDocument" if needed. I'm not sure if you'll need to pass the databaseName or if it can be set on the datasource alone.

With a Data View, it's easy to just use the summary facet instead of pointing to a column. With a View Panel, you'll need to set the var property on the View Panel itself and paste the Link control into the relevant column.

Upvotes: 1

Related Questions