title: SAPUI5 Segmented Button Selection
body: <p>I have two Segmented button Item as Delivery and Collection in my application, I want to differentiate two button by passing Delivery as "D" flag and Collection as "C" flag from the front end, to know which button is clicked(the two buttons contains a set of fields to enter data). As I'm new to Custom SAUI5 application I Didnt know how to pass this as seperate. Experts Please Help me in it.
  Below is my code,</p>
  
  <pre><code> &lt;SegmentedButton selectedKey="small" id="idSegment"&gt;
     &lt;items&gt;
       &lt;SegmentedButtonItem id="idSegDel" text="Delivery" key="delKey" press="handleDelivery" /&gt;
       &lt;SegmentedButtonItem id="idSegColl" text="Collection" key="colKey" press="handleCollection" enabled="true" /&gt;
     &lt;/items&gt;
   &lt;/SegmentedButton&gt;
  
  handleCollection: function() {
      this.byId("idPanelDimension").setVisible(true);
      this.byId("idPanelDimension1").setVisible(true);
  },
  
  handleDelivery: function() {
      this.byId("idPanelDimension").setVisible(false);
      this.byId("idPanelDimension1").setVisible(false);
      this.byId("idWeight").setValue("");
      this.byId("idLength").setValue("");
      this.byId("idBreadth").setValue("");
      this.byId("idHeight").setValue("");
  },
    OnCreate : function(){
     var oflagSeg = "D";  //this is only for D Flag but i need to set for both as if Delivery D is clicked or Collection C cliked.
     var oEntry = {Flag: oflagSeg,}   //Passing odata attribute
  }
  </code></pre>