Let's follow up this discussion at the Neptune Community
(this forum will be kept in read-only mode)
I have a Table with an edit button per table line. With the Button i go to a Page where are all information (TextFields, RadioButtons, Datepicker, Textarea, etc.) from the chosen record. This fields have a Binding and with ajax i make a select in a method in the classbuilder to fill the fields.
The problem is 5 textFields and a Datepicker are filled with the right Data from Table. The radiobuttons, textareas and other Textfields were not filled.
Do someone know why the half is filled and the other half isn't filled?
Only when i click on a Radiobutton the remaining data appear at once, but then the RadioButton group no longer works.
Thanks & Regards
// List Get Selected Row and context var context = oEvent.oSource.getBindingContext(); // Update detail page model (JSON parsing to decouple from context) modelyourObject.setData(JSON.parse(JSON.stringify(context.getObject()))); // Navigate oApp.to("yourPage");
Then for all objects like radio buttons, checbox etc they expect true/false as the value. The fastest way to achieve that is by using the data element DDBOOL_D. Then Neptune will auto convert from x/space to true/false. If not you need to send true/false as values to those objects.
Hi Ole Andre,
stands the "modelyourObject" for a Objectname , which was defined in the objectlist ? And have i to do this code than for all fields?
// Update detail page model (JSON parsing to decouple from context)
I can recommend this documentation to understand the model consept:
Lets say your table that you use is named oTable and the detail page is called oPageDetail.
Then Neptune will generate two model object, containing the data: modeloTable and modeloPageDetail .
Test in chrome developer console and write this:
Then you will see your SAP data and fieldnames for the objects.
To navigate to the detail page you only need this code:
// List Get Selected Row and context var context = oEvent.oSource.getBindingContext(); // Update detail page model (JSON parsing to decouple from context) modeloPageDetail.setData(JSON.parse(JSON.stringify(context.getObject()))); // Navigate oApp.to("oPageDetail");
Working with the models is my recommendation. It's easy to get values from the model and easy to update data. All UI5 objects that use the model and binded properties will be updated when you change the model data.
Hi Ole Andre,
now it works thank you !