Hello Gurus,
I have a Form in my View and the logic for the form is shown below and one Button.
new sap.ui.layout.form.FormContainer("F1C1",{
title: "Partner Information",
expandable: true,
formElements: [
new sap.ui.layout.form.FormElement({
label: "Name",
fields: [ new sap.ui.commons.TextField({value: "{/I0001_ENAME}", editable: false})
]
}),
new sap.ui.layout.form.FormElement({
id: "pernr",
label: "Partner No",
fields: [new sap.ui.commons.TextField({value: "{/PERNR}", editable: false})
]
}),
new sap.ui.layout.form.FormElement({
label: "Manager/Supervisor Name",
fields: [new sap.ui.commons.TextField({value: "{/SUP_NAME}", editable: false})
]
}),
new sap.ui.layout.form.FormElement({
label: "Position Title",
fields: [new sap.ui.commons.TextField({value: "{/I0001_PLANS_TEXT}", editable: false})
]
}),
new sap.ui.layout.form.FormElement({
label: "Job Title",
fields: [new sap.ui.commons.TextField({value: "{/I0001_STELL_TEXT}", editable: false})
]
}),
new sap.ui.layout.form.FormElement({
label: "Store/Dept. Description",
fields: [new sap.ui.commons.TextField({value: "{/I0001_ORGEH_TEXT}", editable: false})
]
}),
new sap.ui.layout.form.FormElement({
label: "Store No./Cost Center",
fields: [new sap.ui.commons.TextField({value: "{/I0001_KOSTL}", editable: false})
]
}),
new sap.ui.layout.form.FormElement({
fields: [new sap.ui.commons.HorizontalDivider ("Line2"),
]
})
]
})
on action on Button, how can i read the data from the form in my controller. Please help.
var sPernr = sap.ui.getCore().byId('pernr').getValue().
when i try to read the value by using above statement, it is giving me error saying that sap.ui.getCore().byId()...getValue() not found.
Thanks
Shyam