Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 7856

Proper way to get Data Source Name (at least Alias) in Component SDK

$
0
0

Hi guys.

Suppose I have a custom component accepting data source binding.

My need is simple, I need to differenciate if a user has modified the initial view of the data source or when he just binded another data source to the component in the data source property getter/setter.

 

To do so, I can't rely on the value passed to the data source setter because it gives no information about data source name, and rely on dimension's names is too risky because they might be the same between data sources.

 

For the moment, I do it this way, in the data source property setter :

 

 

if (typeof this.owner.oControlProperties === "undefined") {     // Design Studio 1.4 SP00     dataSourceAlias = this.oControlProperties.DATA_SOURCE_ALIAS_REF ;
} else {     // Design Studio 1.3 SP02     dataSourceAlias = this.owner.oControlProperties.DATA_SOURCE_ALIAS_REF ;
}

 

As you can see, I rely on a property not exposed by SDK, and thus this property has changed its location between DS 1.3 and 1.4.

So it's not really safe as it might change its location again, or change its name, ot even disapear in DS 1.5 or further SP.

 

Is there any safe method for doing this ?

 

Thanks,

 

Br.

Vincent


Viewing all articles
Browse latest Browse all 7856

Trending Articles



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