on 02-02-2018 11:41 PM
Hello,
I created an app using FIORI elements with the following steps:
1. Created CDS view
2. Published ODATA service
3. Used the service to create a List Report
4. Used extensions to create a List Report action
5. Added the code to display a pop up with input field which has a search help.
Problem:
The pop up displays the input field like a label or the input field is not getting displayed.
var oModel = this.getView().getModel();
var oForm = new sap.ui.layout.form.SimpleForm({
editable: true
});
var sParameterLabel = "Employee";
var sBinding = "{emp}";
debugger;
var oField = new sap.ui.comp.smartfield.SmartField({
value: sBinding
});
var sLabel = new sap.ui.comp.smartfield.SmartLabel();
sLabel.setText(sParameterLabel);
sLabel.setLabelFor(oField);
oForm.addContent(sLabel);
oForm.addContent(oField);
var oParameterDialog = new sap.m.Dialog({
title: "Assign New Employee",
content: [oForm],
beginButton: new sap.m.Button({
text: "OK",
press: function() {
}
}),
endButton: new sap.m.Button({
text: "Cancel",
press: function() {
oParameterDialog.close();
}
}),
afterClose: function() {
oParameterDialog.destroy();
}
});
oParameterDialog.setModel(oModel);
oParameterDialog.open();
What is going wrong ?
Thanks,
Kabir
Hi Pratheek,
Thanks for the response. I set this annotation in my CDS view and it began to work.
@ObjectModel.updateEnabled: true
Regards,
Kabir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kabir,
Did you try setting "contextEditable" property of SmartField? This should solve the problem.
And Just for your Information,
Along with your model, Fiori Elements also creates a Model at Runtime named "UI" set to the View and Component. This Model has a property called "editable" which can be used by developers to set the editability of your extended controls.
contextEditable={ui>/editable} in short.
Regards,
Pratheek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.