Dec 8, 2013 8:20 PM
1 Posts

XPage Redirect URL with Commas

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.2
  • Role: Administrator,Developer,End User
  • Tags: XPage,Redirect,URL,Commas
  • Replies: 0

I've got XPage source in a database on the Domino server with the self-explanatory code:

var docId = context.getUrlParameter('id');
var acroConfig = context.getUrlParameter('ac');
var att = session.evaluate("@AttachmentNames", database.getDocumentByUNID(docId));
var url = context.getUrl().toString().split(view.getPageName())[0] + "/0/" + docId + "/$FILE/" + att[0];
if (acroConfig == "hhslots")
  {url = url + "#page=1&zoom=60&viewrect=30,55,630,235&scrollbar=0&toolbar=0&statusbar=0&navpanes=0"};
facesContext.getExternalContext().redirect(url)

But the viewrect parameter doesn't work, I'd guess because the commas have been turned into %2cs, which Adobe Reader cannot handle.

If anybody's got a way of protecting the commas/making it work, I'd be really grateful.

Thanks.