Advertisement
Guest User

Untitled

a guest
Mar 11th, 2016
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     /**
  2.              * Updates the item count within the line item table's header
  3.              * @param {object} oEvent an event containing the total number of items in the list
  4.              * @private
  5.              */
  6.             onListUpdateFinished : function (oEvent) {
  7.                 var sTitle,
  8.                     iTotalItems = oEvent.getParameter("total"),
  9.                     oViewModel = this.getModel("detailView");
  10.  
  11.                 // only update the counter if the length is final
  12.                 if (this.byId("lineItemsList").getBinding("items").isLengthFinal()) {
  13.                     if (iTotalItems) {
  14.                         sTitle = this.getResourceBundle().getText("detailLineItemTableHeadingCount", [iTotalItems]);
  15.                     } else {
  16.                         //Display 'Line Items' instead of 'Line items (0)'
  17.                         sTitle = this.getResourceBundle().getText("detailLineItemTableHeading");
  18.                     }
  19.                     oViewModel.setProperty("/lineItemListTitle", sTitle);
  20.                 }
  21.             },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement