So I'd rather change the samples that use the BaseService to include this 
information rather than the BaseService itself. The BaseService 
constructor can take a arg which is an Object that get's mixed in, so 
let's change those samples to pass in the defaultContextRootMap they need 
to use rather than having these hard-coded in BaseService.


Regards,

Mark Wallace
Architect, ICS Social Application Development
IBM Master Inventor

Phone: 353-1-815-4091 | Mobile: 353-86-2418605
E-mail: mark_wallace@ie.ibm.com
Find me on:   


Technology Campus
Mulhuddart, Dublin 15
Ireland


IBM Ireland Limited. Registered in Ireland with no.: 16226. Registered 
Office: Oldbrook House, 24-32 Pembroke Road, Ballsbridge, Dublin 4 



From:
fmoloney <notifications@github.com>
To:
OpenNTF/SocialSDK <SocialSDK@noreply.github.com>
Cc:
Mark E Wallace/Ireland/IBM@IBMIE
Date:
04/09/2013 14:59
Subject:
Re: [SocialSDK] Properties tab + mutable context roots (#455)



In src/j2ee/com.ibm.sbt.web/WebContent/js/sdk/sbt/base/BaseService.js:
> @@ -86,7 +98,18 @@ define(["../config", "../declare", "../lang", 
"../log", "../stringUtil", "../Cac
>              if (!url) {
>                  throw new Error("BaseService.constructUrl: Invalid 
argument, url is undefined or null.");
>              }
> -            if (urlParams) {
> + 
> +            var serviceMappings = this.endpoint.serviceMappings;
> +            if(!urlParams){
> +                urlParams = {};
> +            }
> + 
> +            lang.mixin(urlParams, this.defaultContextRootMap);
> +            if(!util.isEmptyObject(serviceMappings)){
> +                lang.mixin(urlParams, serviceMappings);
> +            }
> + 
> +            if (urlParams && !util.isEmptyObject(urlParams)) {
>                  url = stringUtil.replace(url, urlParams);

I had it like that originally, each service defined its own strings. But 
then I found that some samples use the BaseService directly so I had to 
add this. 
?
Reply to this email directly or view it on GitHub.