2
votes

Is it possible to hide the URL of the action of opening or editing a document in a XPage?

I am trying to avoid this:
http(example)://notesdev1.my_company.com/po/po.nsf/%24%24OpenDominoDocument.xsp?databaseName=CN=My_Company_NotesDev1/O=HCI!!PO%5CPO-data.nsf&documentId=E879C68A9A88F6DD87257BC6005A0748&action=editDocument"

I don't think you can use site documents for URL's that open specific documents. I started out customizing the 'Default Action' and 'Document id' of the Document data source. I then switched and tried rebuilding the URL in the beforePageLoad event, and using context.redirectToPage but it still shows the long URL.

I would like to know if I can have control over the entire URL, and still direct pages as I see fit. I know that I can't stop a user from Bookmarking, but if I can control the URL, I can prevent the user from bookmarking intermediate steps in a wizard, and also avoid ugly URLs.

1

1 Answers

4
votes

You can use a website document to mask those long urls. Your short url needs to have the DocId visible and then you can map it by a substitution rule.

The other option is to compute your data source. You set it to ignore request parameters and use your own:

http://yourserver/some.nsf/thexpage.xsp?doc=unid 

Then use the context to retrieve the Unid and compute