<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Table Selection is not working Inside TabContainer? in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/table-selection-is-not-working-inside-tabcontainer/qaa-p/12050245#M4503207</link>
    <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;sharath.mg&lt;/SPAN&gt; . Please refer your post below.&lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/answers/461975/view.html" target="test_blank"&gt;https://answers.sap.com/answers/461975/view.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Oct 2019 11:35:54 GMT</pubDate>
    <dc:creator>Jayakrishnan</dc:creator>
    <dc:date>2019-10-10T11:35:54Z</dc:date>
    <item>
      <title>Table Selection is not working Inside TabContainer?</title>
      <link>https://community.sap.com/t5/technology-q-a/table-selection-is-not-working-inside-tabcontainer/qaq-p/12050242</link>
      <description>&lt;P&gt;Hi Everyone, &lt;/P&gt;
  &lt;P&gt; I am working on SAPUI5 Application development. I am using MultiInstance(Tab Container) in my application. In my first view i have a sap.ui.table with selection. if user select single item from the table,it should open the Tab container. Inside the TabContainer i should have selected table item(another table). &lt;/P&gt;
  &lt;P&gt; For each table selected,i associated with two other collections(via association and navigation in OData). So in my TabContainer, in each tab i have a name and associated collections in grid table. it is also a table with selection. &lt;/P&gt;
  &lt;P&gt; But the selection property for the item table not working. I followed the below question, &lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;SCN Question regarding it: &lt;A href="https://answers.sap.com/questions/460486/grid-table-multitoggle-select-in-the-tabcontainer.html" target="_blank"&gt;Quetion&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;"It looks like the option to set or edit the content inside the Tab container is affected by the items set to the container.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
  &lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;When, I tried the code, I found that table works with tab container BUT no items should be set to the container. Once items are set, the default behavior of table is lost."&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
  &lt;P&gt;I tried the same scenatio in sapui5 sample app by binding two diff collections.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;//SAPUI5 Sample application: Application &lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;link:&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://sapui5.netweaver.ondemand.com/#/entity/sap.m.TabContainer/sample/sap.m.sample.TabContainerMHC" target="_blank"&gt;TabContainer&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;By Default, the above application loaded with below model,&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;var oModel = new JSONModel(sap.ui.require.toUrl("com/zcombo_box_test/localService/mockdata") + "/products.json");
this.oView.setModel(oModel);&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; i added new model for the table inside the tab container: &lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;var oSalesOrderModel = new JSONModel(sap.ui.require.toUrl("com/zcombo_box_test/localService/mockdata") + "/SalesOrder.json");
this.oView.setModel(oSalesOrderModel, "salesorder");&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; &lt;STRONG&gt;TableController call Code :&lt;/STRONG&gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;TCController.prototype.openSelectedItems = function () {
			var oTabContainer, oTabContainerItemsTemplate,
				aFilters = [],
				aSelectedRows = this.oPageTable.getSelectedContexts();


			this.oNavCon.to(this.oPageTabContainer);


			aSelectedRows.forEach(function (oRow) {
				aFilters.push(new Filter("ProductId", FilterOperator.EQ, oRow.getProperty("ProductId")));
			});


			oTabContainerItemsTemplate = new TabContainerItem({
				name: "{Name}",
				content: [
					this._getFragment("Display")
				]
			});
			oTabContainer = new TabContainer({
				showAddNewButton: true,


				items: {
					path: '/ProductCollection',
					filters: aFilters,
					template: oTabContainerItemsTemplate
				}
			});


			this.oPageTabContainer.insertContent(oTabContainer);
		};
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;it will call the Display Fragment code:&lt;/P&gt;
  &lt;P&gt;Display.Fragment.xml:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;core:FragmentDefinition xmlns="sap.m" xmlns:ui="sap.ui.table" class="sapUiSizeCompact" xmlns:l="sap.ui.layout" xmlns:core="sap.ui.core"&amp;gt;
	&amp;lt;l:VerticalLayout class="sapUiContentPadding"&amp;gt;
		&amp;lt;Panel expanded="true" expandable="true"&amp;gt;
			&amp;lt;headerToolbar&amp;gt;
				&amp;lt;OverflowToolbar height="3rem"&amp;gt;
					&amp;lt;Title text="GroupElementList"/&amp;gt;
					&amp;lt;ToolbarSpacer/&amp;gt;
					&amp;lt;Button icon="sap-icon://add" press="onCreateGroupElementFragment"/&amp;gt;
					&amp;lt;Button icon="sap-icon://delete" press="onDeleteGroupElement"/&amp;gt;
				&amp;lt;/OverflowToolbar&amp;gt;
			&amp;lt;/headerToolbar&amp;gt;
			&amp;lt;content&amp;gt;
				&amp;lt;ui:Table rows="{salesorder&amp;gt;/SalesOrderCollection}" title="SalesOrderCollection" selectionMode="MultiToggle" visibleRowCount="7"
					paste="onPaste"&amp;gt;
					&amp;lt;ui:columns&amp;gt;
						&amp;lt;ui:Column width="11rem"&amp;gt;
							&amp;lt;Label text="SoId"/&amp;gt;
							&amp;lt;ui:template&amp;gt;
								&amp;lt;Text text="{salesorder&amp;gt;SoId}" wrapping="false"/&amp;gt;
							&amp;lt;/ui:template&amp;gt;
						&amp;lt;/ui:Column&amp;gt;
						&amp;lt;ui:Column width="11rem"&amp;gt;
							&amp;lt;Label text="CreatedByBp"/&amp;gt;
							&amp;lt;ui:template&amp;gt;
								&amp;lt;Input value="{salesorder&amp;gt;CreatedByBp}"/&amp;gt;
							&amp;lt;/ui:template&amp;gt;
						&amp;lt;/ui:Column&amp;gt;
						&amp;lt;ui:Column width="6rem" hAlign="End"&amp;gt;
							&amp;lt;Label text="ChangedByName"/&amp;gt;
							&amp;lt;ui:template&amp;gt;
								&amp;lt;Label text="{salesorder&amp;gt;ChangedByName}"/&amp;gt;
							&amp;lt;/ui:template&amp;gt;
						&amp;lt;/ui:Column&amp;gt;
					&amp;lt;/ui:columns&amp;gt;
				&amp;lt;/ui:Table&amp;gt;
			&amp;lt;/content&amp;gt;
		&amp;lt;/Panel&amp;gt;
	&amp;lt;/l:VerticalLayout&amp;gt;
&amp;lt;/core:FragmentDefinition&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;After this code, i can see the Initial tbale and tab container screen , and able select the table rows inside the tab container.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1730750-table-products.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1730751-product-table-01.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1730752-tabcontainer-salesorder-sable.png" /&gt;&lt;/P&gt;
  &lt;P&gt;But In my approach , i followed the same approach the selection is not working inside the tab container.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1730753-not-selection.png" /&gt;&lt;/P&gt;
  &lt;P&gt; Please if anyone know the solution, please help me to sort it out.&lt;/P&gt;
  &lt;P&gt;Thank you,&lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;JK.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 09:00:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/table-selection-is-not-working-inside-tabcontainer/qaq-p/12050242</guid>
      <dc:creator>Jayakrishnan</dc:creator>
      <dc:date>2019-09-19T09:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: Table Selection is not working Inside TabContainer?</title>
      <link>https://community.sap.com/t5/technology-q-a/table-selection-is-not-working-inside-tabcontainer/qaa-p/12050243#M4503205</link>
      <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;sharath.mg&lt;/SPAN&gt; , Hi Sharath. I have seen your answer in one of the questions in SCN regarding GridTable-MultiToggle feature not working inside the TabContainer. I also posted the same issue here? Could you please help me if you have any solution for this?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;JK&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 09:24:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/table-selection-is-not-working-inside-tabcontainer/qaa-p/12050243#M4503205</guid>
      <dc:creator>Jayakrishnan</dc:creator>
      <dc:date>2019-10-10T09:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Table Selection is not working Inside TabContainer?</title>
      <link>https://community.sap.com/t5/technology-q-a/table-selection-is-not-working-inside-tabcontainer/qaa-p/12050244#M4503206</link>
      <description>&lt;P&gt;Hi JK, &lt;/P&gt;&lt;P&gt;Please share my post for reference.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 10:48:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/table-selection-is-not-working-inside-tabcontainer/qaa-p/12050244#M4503206</guid>
      <dc:creator>Sharathmg</dc:creator>
      <dc:date>2019-10-10T10:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Table Selection is not working Inside TabContainer?</title>
      <link>https://community.sap.com/t5/technology-q-a/table-selection-is-not-working-inside-tabcontainer/qaa-p/12050245#M4503207</link>
      <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;sharath.mg&lt;/SPAN&gt; . Please refer your post below.&lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/answers/461975/view.html" target="test_blank"&gt;https://answers.sap.com/answers/461975/view.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 11:35:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/table-selection-is-not-working-inside-tabcontainer/qaa-p/12050245#M4503207</guid>
      <dc:creator>Jayakrishnan</dc:creator>
      <dc:date>2019-10-10T11:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Table Selection is not working Inside TabContainer?</title>
      <link>https://community.sap.com/t5/technology-q-a/table-selection-is-not-working-inside-tabcontainer/qaa-p/12050246#M4503208</link>
      <description>&lt;P&gt;Hi All, i am closing this post as it is a sapui5 version problem. As they improved the NavContainer and Table Selection behavior from 1.69.0 on wards, is is working from 1.69 and above. Grid Table Selection working fine perfectly inside the tab container.&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;JK.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 05:56:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/table-selection-is-not-working-inside-tabcontainer/qaa-p/12050246#M4503208</guid>
      <dc:creator>Jayakrishnan</dc:creator>
      <dc:date>2019-10-17T05:56:52Z</dc:date>
    </item>
  </channel>
</rss>

