Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8545

Re: Model Scope? Set Text Property for Button?

$
0
0
Hi Sagar,
Button code that works just looks like this.
var oButton = new sap.m.Button( { 

     text : "{RESIDENTIAL}",  // THIS DISPLAYS THE VALUE PROPERLY

     icon : "sap-icon://outgoing-call", 

     press:  [ oController.onResidentialFacetime, oController ]}).addStyleClass("newButton");

 

  var oActionSheet = new sap.m.ActionSheet({ 
           buttons: [
            new sap.m.Button( { 
                text : "{RESIDENTIAL}",  // THIS SHOW UP UNDEFINED
                icon : "sap-icon://outgoing-call", 
                press:  [ oController.onResidentialFacetime, oController ]}).addStyleClass("newButton"), 
            new sap.m.Button( { 
                text : "{EMERGENCY}", 
                icon : "sap-icon://iphone", 
                press:  [ oController.onEmergencyFacetime, oController ]}).addStyleClass("newButton"),                 
            new sap.m.Button( { 
                text : "{EMAIL}", 
                icon : "sap-icon://email", 
                press:  [ oController.onEmailFacetime, oController ]}).addStyleClass("newButton") 
           ],
           placement: sap.m.PlacementType.Bottom,
           cancelButtonPress: function(){ 
            jQuery.sap.log.info("sap.m.ActionSheet: cancelButton is pressed"); 
           }
  });
The context of the view is already the detail page. This view is generated based on a single record that was passed to it from a list. So I can see 1 record containing - COMPANY, RESIDENTIAL, EMERGENCY, etc. See comments on first button where the value properly appears. The button in the action sheet is undefined or empty.

Viewing all articles
Browse latest Browse all 8545

Trending Articles