Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2638

highlighting the selected item in list

$
0
0

Hi All,

I have a custom fiori application which is used to approve the items which has a master list. When we click on the item the selected item is getting highlighted when it is navigating from master to the detail page. While clicking on it, the selected item is not getting highlighted immediately. It is taking nearly 15 - 20 seconds to get highlighted. Could anyone help to solve this latency in highlighting. The list used in master view.xml is shown below.

 

<List id="List"

     items="{/results}"

     growing="true"

     growingThreshold="6"

     growingScrollToLoad="false"

     mode="SingleSelectMaster"

     select="onSelectList"

     noDataText="{i18n>NoData}"

     >

  <items>

  <ObjectListItem id="masterObjListId"

         title="{number}"

         number="{Total}"

         type="Active"

         press="onSelectList"

         numberUnit="{Currency}">

    

      <firstStatus>

  <ObjectStatus

  id="Created"

  text="{Date}">

  </ObjectStatus>

  </firstStatus>

 

  </ObjectListItem>

       </items>

    </List> 

 

 

onSelectList function in master controller;


onSelectList : function(evt){

  var item = evt.getParameter("listItem");

 

  NumberFromList = item.mProperties.title;

  var _timeout;

  var resourceBundle= sap.ui.getCore().getModel("i18n");

var plswait=resourceBundle.getProperty("plsWait");

  var fetch=resourceBundle.getProperty("fetchItm");

  var busydialog = new sap.m.BusyDialog({

   title:plswait,

   text:fetch

  });

  busydialog.open();

  this.showDetail(evt.getParameter("listItem")||evt.getSource());

  _timeout = jQuery.sap.delayedCall(300, this, function () {

  busydialog.close();

  });

  },

 

 

  showDetail:function(oItem){

     var path=oItem.getBindingContext().getPath();

     var index=path.toString();

     index = index.substring(index.lastIndexOf("/") + 1);

     sap.ui.core.UIComponent.getRouterFor(this).navTo("routeToDetailPage",{Id:index});

 

 

  },

 

 

CSS used for highlighting

 

.sapMLIB.sapMLIBSelected, .sapMLIB.sapMLIBSelected>td {

    background: #F5A663  !important;

}


Viewing all articles
Browse latest Browse all 2638

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>