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

Re: What do 'GetEntitySet (Query)' & 'GetEntity (Read)' do.

$
0
0

Hi Sun,

 

as you received no further answers so far, I will try to do my best, even though I am not a JavaScript developer. I just used the GWPA tools with Eclipse to generate SAPUI5 starter applications.

 

1. As a trial, you could change your last-but-one code line to

 

oTable.bindRows({path : "/UserInfoSampleSet('123098')"});

 

2. Client-side filtering of the requested data is also a possibility, that´s what the generated starter applications do. They define a function search(oView, newValue) and call it...

/** * This method executes client side search on the given view with the given value

* @param oView - view the contains list to search on

* @param newValue - the value to search for

*/ function search(oView, newValue) {

     var filterPattern = newValue.toLowerCase(), oList = oView.oList,

     listItems = oList.getItems(), i, vBoxitems, visibility;

     for (i = 0; i < listItems.length; i++) { vBoxitems = listItems[i].getContent()[0].getItems();

     visibility = false;

     $.each(vBoxitems, function(index, item) {

         if (item.getText().toLowerCase().indexOf(filterPattern) != -1) {

             visibility = true;

             return false; // break

         }; }); listItems[i].setVisible(visibility);

     };

};

 

This function is called within the controller designated to the view for that entity type:

     search(this.getView(), oEvent.getParameters().newValue);

 

If you would like to see the complete code for the client-side filtering, you might sign-up for a HANA Cloud Platform Trial Account and use SAP Web IDE to create a similar Starter Application from a template. Web IDE with templates replaces the plugins for Eclipse, the GWPA plugin seems to be no longer available, unfortunately). See  SAP Web IDE Help to get started.

 

Best regards and lots of success,

Ringo


Viewing all articles
Browse latest Browse all 9024

Trending Articles