In my custom SAUI5 application, I have implemented two Segmented button items - Delivery and Collection. To differentiate between the two buttons and determine which one is clicked, I aim to pass "D" as a flag for Delivery and "C" as a flag for Collection from the front end. Each button contains a set of fields for data entry. However, being new to Custom SAUI5 applications, I am unsure how to achieve this separation. I would greatly appreciate expert assistance. Below is a snippet of my code:
<SegmentedButton selectedKey="small" id="idSegment">
<items>
<SegmentedButtonItem id="idSegDel" text="Delivery" key="delKey" press="handleDelivery" />
<SegmentedButtonItem id="idSegColl" text="Collection" key="colKey" press="handleCollection" enabled="true" />
</items>
</SegmentedButton>
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";
var oEntry = {Flag: oflagSeg,}
}