0
votes

I'm using Notes/Domino 8.5.3. I've added a button control to an xpage. The button uses a Confirm Action to display a client-side prompt to the user before continuing with the next action defined for the button. When I use static text for the Confirmation Text for the Confirm Action, the confirmation prompt is displayed. However, when I change the Confirmation Text to be computed, and retrieve the text from a profile document, the confirmation prompt it not displayed at all in XPiNC. The confirmation prompt with the computed confirmation text is displayed just fine in a browser. Is there a work-around for this issue with XPiNC?

Following is the code I'm using in the Confirm Action to get the text for the prompt:

var server = database.getServer();

var dbProfile:NotesDocument = database.getProfileDocument("DBProfile", "");

var msg = dbProfile.getItemValueString("ContactsInitUpdatePrompt");

return msg;
1
I try to avoid using profile documents in xPages because the http task needs to be restarted for any changes. What is the code you are using to pull the profiledoc? If you happen to have Notes9 available have you tried using the run xpinc on server option? I find its a good troubleshooting step.Patrick Sawyer
@PatrickSawyer Unfortunately, I don't have Notes 9 available. I've added my code above. Its working OK in the web, but not in XPiNC.Michael Sobczak
I would try to make sure that all your variables are being returned how you expect them. Put some of those variables into computed fields to see the values they return in text. My experience with xpinc is limited but I don't take anything for granted with xPinc. Remember when you are running xpinc the server is your local machine so perhaps the getServer variable is returning a wrong value for xPinc but right value for the browser.Patrick Sawyer

1 Answers

0
votes

To further my comments, this is a work around I use the below code for an app that uses the bootstrap extension library on the web but uses basic functionality with xpinc.

If the values for xPinc are different you could make the confirm action different in the browser and in the client.

if (@ClientType()== "Notes")
{
<action>;
}
else{
<action>;
}

I think that profile documents are a bad idea in xPages though. Having to restart HTTP to get a new value ruins the point I think. Almost better to hard code values at that point. I think you can set application scope to handle the work of profile documents. But then application scope in xpinc is just on the current machine as the server is the client.