0
votes

Converting a legacy Notes application to XPages with Extension library.

Using application layout with navigator control for basic site navigation.

Stuck on how to have a navigator menu item open a profile document for editing by administrator type user...

Have an XPage created that binds to the profile form, but not finding way to have it opened on the onClick event of navigator menu item?

Any suggestions?

2
Just open a document as normal, then have the save option getProfileDocument and update it that way.Simon O'Doherty

2 Answers

1
votes

You can use ordinary data source. First, get UNID of profile document and initialize data source with it.

WARNING: profile documents are cached, you need to restart http or reset application if there is some background change to profile document (otherwise you see old values). Avoid using profile documents with frequent changes!

1
votes

With XPages, profiles are obsolete. A better approach is to move the contents of the profile to a regular document and then in the application_init () method read all that data into the application scope. If you have updating profiles then this is critical because of the issues updating profiles across multiple servers and JREs.

If you must use the profiles, on the navigator, set it to open the profile.xsp in Edit mode. The profile.xsp then Edits the profile with the Default Formulas of each bound field retrieving the value from the profile using SSJS. The Submit button runs SSJS which iterates through the items on the document and writes them to the profile, but does not save itself to disk.