Skip to Content
0

Entending My Inbox 2.0 - how to clean/refresh table

Apr 03, 2017 at 01:27 PM

101

avatar image

Hi,

We have installed Fiori My Inbox 2.0. It is business requirement that items of the document should be visible at detail page. We have followed "My_Inbox_Extensibility_Cookbook" attached to SAP Note 2118812. We have extend gateway service and inbox application for RFQ WorkFlow as same way explained in the cookbook.

We have a few test RFQ WF data in my inbox. First RFQ has 3 items. It is visible correctly at detail page as table.

If we select another RFQ WF which has 4 item, the detail page show it correctly.

But when select first RFQ WF again, the item table doesnt refresh correctly. It show 4 item, 3 of them belongs to first WF and 4. item belongs to second WF.

SAP support has told me it is consulting issue. Gave me a tip that i should unbinding the context of the previous entry using the unbindElement() function or the unbindProperty()

	<Table items="{detail>/RFQItems/results}" id="RFQItemsTable">
		<headerToolbar>
			<Toolbar>
				<Label text="RFQItems"/>
			</Toolbar>
		</headerToolbar>
	    <columns>
	        <Column>
	            <header>
	                <Label text="Item Number"/>
	            </header>
	        </Column>
	        <Column>
	            <header>
	                <Label text="Material / Description" />
	            </header>
	        </Column>
		</columns>
	    <items>
	        <ColumnListItem>
	            <cells>
	                <ObjectIdentifier title="{detail>ItemNumber}"/> 
	                <ObjectIdentifier title="{detail>Material}" text="{detail>ShortText}"/> 
	        	</cells>
	        </ColumnListItem>
		</items>
	</Table>



S3 controller extended as below.

cross.fnd.fiori.inbox.view.S3.extend("cross.fnd.fiori.inbox.CA_FIORI_INBOXExtension.view.S3_TS20000175Details", {
	handleNavToDetail: function(oEvent) {
		if (oEvent.getParameter("name") === "TS20000175Details") {


			var sInstanceID = oEvent.getParameter("arguments").InstanceID;
			if (sInstanceID.search(":") === (sInstanceID.length - 1)) {
				return;
			}


			// Deep link scenario: if the detail navigation happens before the S2 list was downloaded, navigate to a different URL 
			// so when the list data arrives and the item gets selected the URL will change, and the navigation won't be stopped 
			if (jQuery.isEmptyObject(this.getView().getModel().oData)) {
				var oParameters = {
					SAP__Origin: oEvent.getParameters().arguments.SAP__Origin,
					InstanceID: oEvent.getParameters().arguments.InstanceID + ":",
					contextPath: oEvent.getParameters().arguments.contextPath
				};
				this.oRouter.navTo("TS20000175Details", oParameters, true);
				return;
			}


			//In case of a list item selection the first tab shall be selected 
			//Exception: Comment is added on the comment tab - this tab must stay selected or nav to detail on phone 
			if (!this.stayOnDetailScreen || sap.ui.Device.system.phone) {
				var oDescriptionTab = this.oTabBar.getItems()[0];
				this.oTabBar.setSelectedItem(oDescriptionTab);
			} else {
				this.stayOnDetailScreen = false;
			}


			var oRefreshData = {
				sCtxPath: "/" + oEvent.getParameters().arguments.contextPath,
				sInstanceID: sInstanceID,
				sSAP__Origin: oEvent.getParameter("arguments").SAP__Origin,
				bCommentCreated: false
			};
			this.refreshData(oRefreshData);


		}
	}
});

in which controller and method i should try to unbind element or property?

Thanks

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers