Skip to content

Latest commit

 

History

History
51 lines (29 loc) · 2.59 KB

Step_3_Create_Property_Binding_d70e989.md

File metadata and controls

51 lines (29 loc) · 2.59 KB
loio
d70e9894c09b4c27a98d4850d4e90f2c

Step 3: Create Property Binding

Although there is no visible difference, the text on the screen is now derived from model data.


Preview

The browser shows the text "Hi, my name is Harry Hawk"


Coding

You can view and download all files in the Demo Kit at Data Binding - Step 3.

Assign the text property of the sap.m.Text control to the value {/greetingText}. The curly brackets enclosing a binding path (binding syntax) are automatically interpreted as a binding. These binding instances are called property bindings. In this scenario, the control's text property is bound to the greetingText property at the root of the default model. The slash (/) at the beginning of the binding path signifies an absolute binding path.

webapp/view/App.view.xml

<mvc:View
	xmlns="sap.m"
	xmlns:mvc="sap.ui.core.mvc">
	<Text text="{/greetingText}"/>
</mvc:View>

Parent topic:Data Binding Tutorial

Next:Step 2: Creating a Model

Previous:Step 4: Two-Way Data Binding

Related Information

Binding Types

Property Binding