Quantcast
Channel: SCN : Discussion List - SAP BusinessObjects Design Studio
Viewing all articles
Browse latest Browse all 4041

DesignStudio SDK component with AJAX call from BO server

$
0
0

Hi,

we are writing a DesignStudio SDK 1.6 component, which should run an AJAX call from the BO server to another Server within our infrastructure. The AJAX call explicitely must not run in the client's brwoser as the backend server is not reachable from an external user.

 

For details of the architecture have a look at the attachment 'Architecture.jpg'.

 

Within the SDK documentation (page 48) we have the following statements:

- The content of contribution.ztl is a mix of Java syntax (script method signatures) and JavaScript syntax (script method bodies).

- The JavaScript parts (script method bodies) are executed in the Design Studio script engine on the server and not in the browser. This means you are restricted to "sand-boxed" JavaScript, without access to the HTML DOM, for example

- Enclose script method bodies in {**} pairs.

 

We now tried the following:

ZTL file:

void doExport() {* this.exportcsv = 1; *}

 

The getter / setter function for exportcsv (within component.js) looks like this:

this.exportcsv = function(value) { if (value === undefined) { return saveexportcsv; } else { if (saveexportcsv == 0 & value == 1){ globalVariable = DoAjaxCall();        } saveexportcsv = value; return this; } };

 

Last but not least… The function DoAjaxCall (also within component.js):

function DoAjaxCall(){ var result = ''; $.ajax({  async: false,  url: _jsonurl,  }) .done(function(jsonText) {  result = jsonText;  });  return result; };

 

We did some debugging and saw that the ajax call is done by the client and not executed on the server.

Here is a screenshot from IE network traffic: see attachment 'Network traffic.jpg' .

 

The core question is now: Why doesn't the code run on the BO server but on the cilent. We already opened a OSS message but we got the answer that this is a Consulting question.

Regards Jörg


Viewing all articles
Browse latest Browse all 4041

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>