Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
david_stocker
Advisor
Advisor
0 Kudos

This is part of a tutorial series on creating extension components for Design Studio.

In the last instalment, we made performed a major overhaul of the gauge and made it able to determine a normalized gauge angle, based on measure values.  Now we'll make them bindable!

To make the properties bindable, we simply open component.xml, go to the property entries for the properties that we want to make bindable and add a "bindable" attribute, after "type".  That's it!  Let's make our measure properties bindable.


<property


  id="endAngleDegMax"


  title="End Angle Max"


  type="float"


  bindable="true"


  group="SCNGaugeAngleSettings"/>


<property


  id="measureMax"


  title="Measure Max Value"


  type="int"


  bindable="true"


  group="SCNGaugeAngleSettings"/>


<property


  id="measureMin"


  title="Measure Min Value"


  type="int"


  bindable="true"


  group="SCNGaugeAngleSettings"/>


<property


  id="measureVal"


  title="Measure"


  type="int"


  bindable="true"


  group="SCNGaugeAngleSettings"/>



Testing

We can test the binding.  Presuming that we're using the csv data source in the Github repository and the test app that we built last time (also in the repository), we can do the following:

Set useMeasures to True

Make sure that we bind measureMax to a totals cell for a measure, as with the example from the csv data data source in the app on Github:

Make sure that we bind measureVal to a row cell for the same measure, as with the example from the csv data data source in the app on Github:

Viola!

The entire content from part 6 - the extension, the test app and the csv datasource - are in the Part 6 repository on Github.

Next time, we'll have a look at the complex property types, introduced in Design Studio 1.6.