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

segmentedButton query

$
0
0

Hi All,

 

I am working on a requirement in which i have to show 'left' 'center' and 'right' aligned buttons.

 

For this I am using segementedButton.

 

if(this.alignmentButtonInstance===undefined){

        this.alignmentButtonInstance = new sap.m.SegmentedButton( {

            id: this.getId() + "-alignmentButton",

            buttons: [this.leftButton, this.centerButton, this.rightButton],

            selectedButton:this.getId() + '-leftAligned',

            select:  $.proxy(this._handleAlignButtonClick, this),

          

        });

        this.setAggregation("alignmentButton", this.alignmentButtonInstance);

    }

 

 

    return this.alignmentButtonInstance;

 

 

Now the problem is, user can set the model and define which button he wants to select by default. But i see that selectedButton is not a property and hence its not bindable.

 

there is another property selectedKey(1.28) version. How can I use this property?

//this is how I am passing the value through outside.

 

var data = {"fontVO" : { "selectedSegmentedButton":"leftButton"}};

var oModel = new sap.ui.model.json.JSONModel();

     oModel.setData(data);

 

any pointers will be useful?

 

 

thanks in advance for all help.

 

regards

Fehmina.


Viewing all articles
Browse latest Browse all 3441

Trending Articles



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