• RPC within $$OpenDominoDocument.xsp

    By Karsten Kropp 1 decade ago

    Use of jsonRpcService within $$OpenDominoDocument.xsp page doesn't work. The following error occures:

    Unable to get document page name for null
    

     

    • What are you trying to achieve?

      By Philippe Riand 1 decade ago

      Can you please elaborate? Also, $$OpenDominoDocument is designed to open a new page based on the form field in the document, and not to call ajax services.

      • More details

        By Karsten Kropp 1 decade ago

        In this database there are documents with different forms. When a document is opened (web) the URL is always:
        https://server/database.nsf/$$OpenDominoDocument.xsp?documentId=4DFBCA...&action=openDocument

        The Domino server opens the document in the XPage which is assigned to the corresponding form for the document with this unid.

        It works fine. But the problem is that when you use a RPC to get some information from CSJS this doesn't work. You get the error which I noticed.

        Have you further questions?

        • Yes,I need a sample to reproduce the problem

          By Philippe Riand 1 decade ago

           

          • Sample Application

            By Karsten Kropp 1 decade ago

            See attached file.

            Open index.xsp and open a test document once in test.xsp page and once with $$OpenDominoDocument.xsp.

            You should get CS-JS alert box with "Hello World". But this works only within test.xsp.

            • Thanks - this is a bug

              By Philippe Riand 1 decade ago

              .. or a limitation in XPages core. It does not properly restore the view, and thus fails executing the ajax request. The workaround would involve a client side redirect. There is no easy workaround, without a fix in core.

              • Workaround

                By Karsten Kropp 1 decade ago

                Is there a workaround regarding this issue? Will there be a solution within the next release of the Extension Library?

                • This is actually a core issue

                  By Philippe Riand 1 decade ago

                  So it can't be fixed in the extlib per say. One thing you can try is, on the beforeload event of your work, check that the URL contains $$OpenDominoDocument. If so, then you force a client side redirect to real page. Then the URL will be correct and the service will work.

                  • Next steps?

                    By Karsten Kropp 1 decade ago

                    What should I do next? Should I raise a PMR?

                    • Yes,this would be the right to do

                      By Philippe Riand 1 decade ago
                      • More information?

                        By Karsten Kropp 1 decade ago

                        Please, can you give me more information for raising PMR? Is there already a SPR?