Service_serviceName_JSDO is undefined. - Forum - Mobile - Progress Community

Service_serviceName_JSDO is undefined.

 Forum

Service_serviceName_JSDO is undefined.

  • This is not a bug.  If you review the debugging tips document you will see:

    Getting Service Not Defined on Subsequent Pages

    If you have defined a service on the start page but receive an error on the second or subsequent pages that the service variable is undefined you should check to see if the “Render all pages in one HTML page” in the App Settings is unchecked.  If the pages are separate HTML pages then the JavaScript variables are not available from one page to another.

    In order to have seperate pages you will need to define the services on each page.

  • Thank you.

    - Where is this "debugging tips" document please?   [EDIT: found it, it is in this forum]

    - What do you mean by "define the services" on each page, and how and where to do it? I invoke the JSDO and the service on the page where I need it, and I still get the undefined variable error.

    - If I uncheck the “Render all pages in one HTML page” , then the result if I do "test" in Tiggzi is indeed that the pages are seperate. BUT now the PDSOE doesn't update his source files anymore. So if I run now from within PDSOE I get the old application with 1 page containing all other pages, it doesn't update. Can you replicate this?

  • The document is at this URL:  https://community.progress.com/community_groups/mobile/f/17/t/5975 

    It is under the discussion tab.  But I have attached it to this reply

    Donna

  • Thank you. Do you also have an answer to the other 2 questions please?

    1) What do you mean by "define the services" on each page, and how and where to do it? I invoke the JSDO and the service on the page where I need it, and I still get the undefined variable error.

    2) If I uncheck the “Render all pages in one HTML page” , then the result if I do "test" in Tiggzi is indeed that the pages are seperate. BUT now the PDSOE doesn't update his source files anymore. So if I run now from within PDSOE I get the old application with 1 page containing all other pages, it doesn't update. Can you replicate this?

  • What I mean by defining the service is what you did for the start page.  That was done under the data tab.   For #2 there has already been a bug put in for this problem.

    Donna

  • Yes, but the problem is:  if you have included 10 services on the homepage, and you want to use 1 service on another page, you have to define all 10 services on the other page, not just the one that you use. Otherwise you will have the service_...JSDO undefined on the other services, even if you don't use the service on the page itself.

    Also, having to redefine all services (which includes redefining all mappings, javascript, etc. associated with the redefined services) if you chose to uncheck the "render all pages in 1 html file", looks like something really user unfriendly to say the least.