Skip to Content
avatar image
Former Member

UI5 Databinding using Path:

Hi ,

Please explain me the difference and significance of using path:/ and the plain model property name references from the below.

var oTextField1 = new sap.ui.commons.TextField({id : "Field1",value : {path : "/firstName"}}); var oLabel2 = new sap.ui.commons.Label({text : "Last Name:"});

var oTextField2 = new sap.ui.commons.TextField({id : "Field2",value : { path : "/lastName"}});

var oTextView1 = new sap.ui.commons.TextView("textView1", {text : "{/firstName}"}); var oTextView2 = new sap.ui.commons.TextView("textView2", {text : "{/lastName}"});

When we need to use /path and when to use direct property names references?. Please Clarify.

Thanks,

Urmi

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Dec 28, 2014 at 08:50 PM

    hi Urmila

    Can you check if this example helps?

    Example

    -D

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Dennis,

      Thanks for the JS Bin Example which demonstrates the additional formatting options with path.

      -Urmi