cancel
Showing results for 
Search instead for 
Did you mean: 

ObjectPageLayout control's tabSelect event not firing even with useIconTabBar="true".

former_member479304
Discoverer
0 Kudos

Hi,

ObjectPageLayout control's tabSelect event is not firing for below code even with useIconTabBar="true". Am I missing something or is there a known bug for it?

Thanks.

<uxap:ObjectPageLayout id="ObjectPageLayout" enableLazyLoading="true" useIconTabBar="true" showTitleInHeaderContent="true" tabSelect="tabChanged">

  <uxap:headerTitle>

  <uxap:ObjectPageHeader

  id="idObjectPageHeaderTitle"

  objectTitle="Page Title" 

  isObjectIconAlwaysVisible="false"

  isObjectTitleAlwaysVisible="true"

  objectImageURI="sap-icon://display">

  </uxap:ObjectPageHeader>

  </uxap:headerTitle>

  <uxap:sections>

  <uxap:ObjectPageSection title="TAB1" id="hightlightsTab">

  <uxap:subSections>

  <uxap:ObjectPageSubSection title="">

  <uxap:blocks>

  <l:VerticalLayout width="100%">

  <mvc:XMLView viewName="com.sap.it.spc.ci.catalogv2.home.ui.views.latestBlock" />

  <Label text="" />

  </l:VerticalLayout>

  </uxap:blocks>

  </uxap:ObjectPageSubSection>

  </uxap:subSections>

  </uxap:ObjectPageSection>

  <uxap:ObjectPageSection title="TAB2" id="allTab">

  <uxap:subSections>

  <uxap:ObjectPageSubSection title="">

  <uxap:blocks>

  <mvc:XMLView viewName="com.catalogDetails" />

  </uxap:blocks>

  </uxap:ObjectPageSubSection>

  </uxap:subSections> 

  </uxap:ObjectPageSection>

  </uxap:sections>

  </uxap:ObjectPageLayout>

Accepted Solutions (1)

Accepted Solutions (1)

boghyon
Product and Topic Expert
Product and Topic Expert
0 Kudos

The event "tabSelect" was first introduced with the UI5 1.38 release. However, in the commit "eb75945" (available since 1.40), "tabSelect" gets renamed to "navigate"! Something to keep in mind if your app runs with UI5 1.40 or higher..

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Manoj,

It should work.

An working example - https://plnkr.co/edit/eXnqQGhw6oEVPmupoFKT?p=preview

Check the console for output of tabChange function, Written in Controller file.

Thanks,

Namita

former_member479304
Discoverer
0 Kudos

Hi Namita,

Thanks for the reply.

Yes, it works fine on the link, but the same code when i take to my code base, it doesn't work. Looks like there is some problem on SAPUI5 version that is used in my project "1.36.11".

Any way to run your link code against "1.36.11" version of SAPUI5 to confirm on this?

Thanks,

Manoj.

saivellanki
Active Contributor
0 Kudos

Hi Manoj,

Try pointing the library src like this:


<script id="sap-ui-bootstrap"

  type="text/javascript"

  src="https://sapui5.hana.ondemand.com/1.36.11/resources/sap-ui-core.js"

  data-sap-ui-theme="sap_bluecrystal"

  data-sap-ui-libs="sap.m"

  data-sap-ui-xx-bindingSyntax="complex">

</script>

Regards,

Sai.

Former Member
0 Kudos

Just use the version on the url link. As -

  src="https://sapui5.hana.ondemand.com/"version_no"/resources/sap-ui-core.js"


As suggested by Sai Vellanki.


Regards,

Namita


former_member479304
Discoverer
0 Kudos

Thanks Sai. I tried changing the version to 1.36.11 version as you suggested and found "tabSelect" event not firing. Which confirms there is some problem with the event in 1.36.11 version.

Thanks Namita and Sai for quick response, it was really helpful.