Hi,
I'm new to the Design Studio SDK and this is probably a pretty easy one...
I would like to change an object, that is exposed to Design Studio inside a function in component.js.
Snippet from contribution.xml
<property type="String" title="WebserviceURL" id="wsurl" group="Webservice"></property> |
Snippet from contribution.ztl:
/* Returns the current WebserviceURL for Webservice. */ | ||
String getWsurl() {* | ||
return this.wsurl; | ||
*} |
/* Sets the WebserviceURL for Webservice. */ | ||
void setWsurl(/* New Wsurl */ String newWsurl) {* | ||
this.wsurl = newWsurl; | ||
*} |
Snippet from Component.js
this.wsurl = function(value) { | |||
if (value === undefined) { | |||
} else { | |||
_wsurl= value; | |||
return this; | |||
} | |||
}; |
also in Component.js is a function, that i can run from Design Studio using michaels hack to execute functions from Design Studio.
function processSuccess(data, status, req) {
if (status == "success")
var xml = req.responseText;
this.wsurl = $(xml).find("Success").text(); // this doesn't work!
alert( $(xml).find("Success").text()); // this works!
}
In SAP Design Studio I would expect to see the content of var xml, when I use the getter (getwsurl). But that doesn't work.
So how can I access and change the wsurl from inside a function in component.js?
Thanks in advance.
Frederic