cancel
Showing results for 
Search instead for 
Did you mean: 

Icon Tab Bar Related Issue

Former Member
0 Kudos

Hi All,

I am trying to display some basic info of a customer in the icon tab bar but data is not displayed.

below are my code.

Demo.JS: Here i defined icontabbar and added into the page. and in the content of the icon tab bar i called a new page basicinfo.

var iconTabBar = new sap.m.IconTabBar({

             expanded : "{device>/isNoPhone}",

           items : [ new sap.m.IconTabFilter({

             key : "Info",

              icon : "sap-icon://hint",

             

              text:"Basic Info" ,

              content:[

                        sap.ui.view({type:sap.ui.core.mvc.ViewType.JS, viewName:"salesorderv2.basicInfo"})

                      ]

  

           })

});

return new sap.m.Page({
title: "Customer Detail",

iconTabBar

]

});

basicInfo.js:


var simpleFormLayout112=new sap.ui.layout.form.SimpleForm("formIdBasic",{

  title:"Customer Detail",

  content:[

          new sap.ui.commons.Label({text:"Phone Number"}),

          new sap.ui.commons.TextField("phonenumberb",{width:'100%',editable:false,value:"343434"}),

         

          new sap.ui.commons.Label({text:"Email Address"}),

          new sap.ui.commons.TextField("emailAddressb",{width:'100%',editable:false,value:"san"}),

         

          new sap.ui.commons.Label({text:"Web Address"}),

          new sap.ui.commons.TextField("webAddressb",{width:'100%',editable:false,value:"sasa"}),

         

          new sap.ui.commons.Label({text:"Address Val Start Date"}),

          new sap.ui.commons.TextField("addressValStartDateb",{width:'100%',editable:false,value:"22/12/2012"}),

         

          new sap.ui.commons.Label({text:"Address Val End Date"}),

          new sap.ui.commons.TextField("addressValEndDateb",{width:'100%',editable:false,value:"rereer"}),

         

          new sap.ui.commons.Label({text:"CreatedAt Date"}),

          new sap.ui.commons.TextField("createdAtb",{width:'100%',editable:false,value:"12/12/2014"})

          ]

  });

  return new sap.m.Page({

  title: "Data Basic",

  content: [

         

                   simpleFormLayout112

  ]

  });

so this data in basicinfo should get displayed in the demojs icontabbar content.

what is getting displayed is only title.

Regards,

Santosh.

Accepted Solutions (0)

Answers (1)

Answers (1)

Private_Member_15166
Active Contributor
0 Kudos

Did you debugged your code in chrome that where you are getting the error?

Former Member
0 Kudos

Hi Dhananjay,

yeah, i debugged it is not erroring out it is displaying the output but only title it is not displaying the sap.ui.layout.form.SimpleForm.

i have verified in crome browser. since no error i was not able to proceed.

Former Member
0 Kudos

got the solution,

reason for the issue was the demoinfo page was returning a page rather than the content.

link helped : Embedding sap.m.page as content in sap.m.IconTabBar does not work - Cadaxo Know How Blog

sample code:

var simpleFormLayout112=new sap.ui.layout.form.SimpleForm("formIdBasic",{

  title:"Customer Detail",

  content:[

          new sap.ui.commons.Label({text:"Phone Number"}),

          new sap.ui.commons.TextField("phonenumberb",{width:'100%',editable:false,value:"343434"}),

         

          new sap.ui.commons.Label({text:"Email Address"}),

          new sap.ui.commons.TextField("emailAddressb",{width:'100%',editable:false,value:"san"}),

         

          new sap.ui.commons.Label({text:"Web Address"}),

          new sap.ui.commons.TextField("webAddressb",{width:'100%',editable:false,value:"sasa"}),

         

          new sap.ui.commons.Label({text:"Address Val Start Date"}),

          new sap.ui.commons.TextField("addressValStartDateb",{width:'100%',editable:false,value:"22/12/2012"}),

         

          new sap.ui.commons.Label({text:"Address Val End Date"}),

          new sap.ui.commons.TextField("addressValEndDateb",{width:'100%',editable:false,value:"rereer"}),

         

          new sap.ui.commons.Label({text:"CreatedAt Date"}),

          new sap.ui.commons.TextField("createdAtb",{width:'100%',editable:false,value:"12/12/2014"})

          ]

  });

  return simpleFormLayout112;

Private_Member_15166
Active Contributor
0 Kudos

Good. Mark it as an assumed answer so that it will help other members.

agentry_src
Active Contributor
0 Kudos

Please do not use Assumed Answered as it does not define whether there really is a solution, nor does it specify which response provided the solution.  If there is a solution, then mark it as Correct Answer.

Assumed Answered also has the drawback that the Jive platform (underlying the SCN system) apparently adds that status somewhat randomly even to Discussions with no responses.  Don't trust it.

Thanks, Mike (Moderator)

SAP Technology RIG

Private_Member_15166
Active Contributor
0 Kudos

Ohh.. Thanks..!!!