Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9108953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:55:36+00:00 2026-06-17T02:55:36+00:00

I have an iNotes List view object which lists the documents I want, and

  • 0

I have an iNotes List view object which lists the documents I want, and the related REST components. In the “OnSelectEntry” method I have the following code.

var unid =  items[0]["@unid"];
var myUrl = "test.nsf/main.xsp/docPathInfo/unid/" + unid;

var h;

if (window.XMLHttpRequest){
    h = new XMLHttpRequest();
} else {
    h = new ActiveXObject("Microsoft.XMLHTTP");
}

h.onreadystatechange=function() {
  if (h.readyState == 4 && h.status == 200) {
      var myObject = eval('(' + h.responseText + ')');

      var result = dojo.byId("#{id:inputText1}");
      result.value = myObject.field1 + " " + myObject.field2;

  }
}

h.open("GET",myUrl,false);
h.send();

This code works perfectly if the NSF is hosted on a server, but if I have it local it fails with the following:

uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nslXMLHttpRequest.send]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://127.0.0.1:50113/xsp/.ibmxspres/.mini/dojo/.en/@Wc&@Eab&@Eya&@lu.js :: anonymous :: 

I need this to work on the client. Is this the correct way to make the call back on the client?

I have tried changing the ACL access as well but it doesn’t appear to help. I’ve also tried a absolute URL instead of a relative one.

[Update]

I tried changing to a Dojo call instead as follows.

var x;
var myCallback = function(data, ioArgs)
{
 var myObject = eval('(' + data + ')');

  var result = dojo.byId("#{id:inputText1}");
  result.value = myObject.field1 + " " + myObject.field2;
}
dojo.xhr("Get", {
url: myUrl,
handleAs: "text",
timeout: 10000,
load: myCallback
});

When I run this code, it works fine on the server but when I run it on the client it doesn’t work. I get the following message in the XPages.log file.

1/10/13 10:45 AM: Internal warning: Check access being called outside of a request
1/10/13 10:45 AM: Internal warning: Check access being called without a valid session/database
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T02:55:37+00:00Added an answer on June 17, 2026 at 2:55 am

    OK I am not sure about how you would do it using REST on the client, but you can make a XSP.partialRefreshGet() call and that should work.

    So for your code you would do the following:

    var partialRefreshOptions = { 
        "unid" : items[0]["@unid"]
    };
    
    // If you want to do any processing client side.
    function partialRefreshOnComplete() {}
    function partialRefreshOnStart() {};
    function partialRefreshOnError() {};
    
    // Make the call. 
    XSP.partialRefreshGet("#{id:someDummyField}", {
        params : partialRefreshOptions,
        onStart : partialRefreshOnStart, 
        onError : partialRefreshOnError, 
        onComplete : partialRefreshOnComplete}
    );
    

    Then in your “someDummyField” set that to computed for display and have the code like this:

    if(!param.isEmpty()){
        // Do something with the param.unid. Alternatively... 
        return param.unid;
    
    } 
    

    For recommended reading on this there is the “XPages Portable Command Guide“, Page 176.

    Just to expand a little bit on this, you should use the XSP.partialRefreshGet() instead of XHR, as AJAX calls can corrupt the backend document if not done correctly. This is also documented in the same book.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

have written this little class, which generates a UUID every time an object of
Have deployed numerous report parts which reference the same view however one of them
Have got a method which returns IEnumerable<User> which I have been using Linq /
As the title says. I created an iNotes List view component in my XPage
How do I edit a document displayed in a iNotes Calendar View. I have
Have a procedure which looks like Procedure TestProc(TVar1, TVar2 : variant); Begin TVar1 :=
Have 2 tables in Access 2007, both lists of certain tasks to be accomplished.
have defined a Java Interface with the annotation @WebService Compiled the code which went
Have a photography site that I want to prevent image copying from. How can
Have created a ATL COM project through which I am inserting Menu Items to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.