on 09-23-2015 1:03 PM
Hi Team,
I have some basic question regarding binding the data .
1. When we need to use / while doing binding.
"{/ebeln}" or "{ebeln}". What is the difference between both statement.
2. Is there any binding difference for the same service if i am using the different types of view?
3. var page = sap.ui.page( );
var page = new sap,ui,page()
What is difference between above 2 statements.
Thanks
Nishant Bansal
>>1. When we need to use / while doing binding. {/ebeln}" or "{ebeln}". What is the difference between both statement.
first is global, second - relative
>>2. Is there any binding difference for the same service if i am using the different types of view?
what do you mean by binding difference ?
>>3. var page = sap.ui.page( ) var page = new sap,ui,page() What is difference between above 2 statements.
first - method call, second - creating an object
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Maksin
Can you please elaborate this line. .
>>1. When we need to use / while doing binding. {/ebeln}" or "{ebeln}". What is the difference between both statement.
first is global, second - relative
1 If i have local model (model defined in the component itself (e.g. JSON model ))then i will go for (ebeln).
2, if we have global model then i will go for {/ebeln}.
Please correct me if i am wrong.
2.Is there any binding difference for the same service if i am using the different types of view?
Suppose i am taking 2 view one is java script and second in XML and used the same table in both view.
is there any binding changes in both view.
3.
For the third while creating the project in Eclipse System create one default file.
can you please explain the use of below line.
var page = sap.ui.view({id:"idmain1", viewName:"jsonmodel.main", type:sap.ui.core.mvc.ViewType.JS});
Thanks
Nishant
Hi Nishant,
For your query regarding data binding, check following link
Data Binding: Getting Started - User Interface Add-On for SAP NetWeaver - SAP Library
See how binding is done for oRowTemplatee at end.
Usually when you are doing aggregation binding. e.g. to a table element
You will specify binding for a column without "/", if the field is immediately below the collection.
Table.setModel(oModel);
oTable.bindRows("/modelData"); // Bind collection to the table rows
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Designation"}),
template: new sap.ui.commons.TextField({editable:false}).bindProperty("value", "designation")
})); // No '/'
Hope it helps!
Thanks,
Mona
Hi Nishanth,
1. sap.m.page - It is a class in SAP UI5. Which mean you can invoke this class property in your SAP UI5 code.
2. {/ebeln} - Collection of record to bind under list
{ebeln} - Bind only one record to Element
Thanks,
Karthik A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.