Create a Table in SAP System Using OData Service

Nancy Den
Updated on 18-Dec-2019 08:43:28

825 Views

In order to create a table, you need to use either *.hdbdd or *.hdbtable and then expose them with xsodata.You can check for more details:https://help.sap.com/viewer/52715f71adba4aaeb480d946c742d1f6/2.0.02/en-USExampleservice namespace "HANA.Tables" {    "Schema_Name"."PAKAGE::TABLENAME" as "NAMESPACE"; }

Managing User Sessions in SAP UI5 Application

Daniol Thomas
Updated on 18-Dec-2019 08:42:39

1K+ Views

You can make use of setTimeout and clearTimeOut functions. In order to trace the activity of the user, you can either make use of mouse move event or key press event or even both.ExampleYou can reset the timer on the occurrence of either of the two events.document.onmousemove = timeOut; document.onkeypress = timeOut; function timeOut () {    clearTimeout();    setTimeout(sessionTimeout, ); }

Check If an Attribute Exists for a Selected Item in jQuery

Amit D
Updated on 18-Dec-2019 08:41:53

250 Views

To find a certain attribute exists or not for a selected item in jQuery, use the hasAttribute() method.ExampleYou can try to run the following code to learn how to find a certain attribute exists or not:Live Demo                          $(document).ready(function(){             $('button').on('click', function() {                 if (this.hasAttribute("myattr")) {                    alert('True - myattr attribute exists')                 } else {                    alert('False - myattr attribute does not exist')                 }             })          });                           Button One                   Button Two          

Fetching Attribute of SAP Webdynpro Component in New Component

Krantik Chavan
Updated on 18-Dec-2019 08:41:11

198 Views

You need to do the below steps in order to pass values from one Webdynpro component to another:Create both componentsIn the first component, create a method which will call the second componentCreate a parameter in the context of the first component which will be passedCall the first component; once the URL has been generated just append the parameter which needs to be passed.

Use Operator in jQuery Attribute Selector

Amit D
Updated on 18-Dec-2019 08:40:36

506 Views

The *= operator is used to filter elements for attribute containing the given value.ExampleYou can try to run the following code to learn how to *= operator to filter attributes on the basis of text:Live Demo $(document).ready(function(){    $( "div[myattr*='subject']" ).css("background-color", "yellow");     }); Java HTML Ruby

Find Element Based on Data Attribute Value in jQuery

Amit D
Updated on 18-Dec-2019 08:39:29

690 Views

To find an element based on a data-attribute value using jQuery is quite easy.ExampleYou can try to run the following code to learn how to find an element based on a data-attribute value using jQuery:Live Demo    $(document).ready(function() {       $('[data-slide="2"]').addClass('demo');    }); .demo {     font-size: 200%;     color: green; } One Two Three

Use OR Operation in jQuery Attribute Selectors

Amit D
Updated on 18-Dec-2019 08:38:40

229 Views

Use comma to work with OR operation in jQuery Attribute Selector.ExampleYou can try to run the following code to learn how to use OR operation in jQuery attribute selector:Live Demo                          $(document).ready(function(){            $('[myattr=demo][myid="sub1"],[myattr=demo][myid="sub3"]').css("background-color", "yellow");          });                     Java       HTML       Ruby    

Get the Children of This Selector

David Meador
Updated on 18-Dec-2019 08:28:37

117 Views

To get the children of the $(this) selector in jQuery, use the find() method with each() method. Let us first see how to add jQuery:ExampleYou can try to run the following code to get the children of the $(this) selector:Live Demo           jQuery Example                      // Set the click handler on your div          $("body").off("click", "#mydiv").on("click", "#mydiv", function() {                      // Find the image using.find() and .each()            $(this).find("img").each(function() {                         var img = this;                      });          });                                #mydiv {             vertical-align: middle;             background-color: #Ffff76;             cursor: pointer;             padding: 20px;          }                                        

Use Wildcard or Regular Expressions with jQuery Selector

David Meador
Updated on 18-Dec-2019 08:27:41

2K+ Views

Wildcard or regular expressions can also be used with jQuery selector for id of element.ExampleYou can try to run the following code to use wildcard or regular expressions with jQuery selector:Live Demo $(document).ready(function(){    $("[id^=sub]").css("background-color", "green"); }); Java HTML Ruby

Build Mobile App Using OpenUI5 and Cordova

Vrundesha Joshi
Updated on 18-Dec-2019 08:26:42

290 Views

You are thinking correctly for your requirement. What you can do is, use the read method for each entityset to read the oData. In the success callback for this method, you can parse the result objects into a corresponding JSON model.Now, you can have working logic as per which:When you online, uses the additional layer to fill the JSON model from the oData that has been readWhen offline, you can read from local storage.

Advertisements