on 12-03-2013 4:02 PM
Hi All,
I have a json model like this:
{
"customers" : [
{"name" : "Joe", "surname" : "Black"},
{"name" : "Jesse", "surname" : "James"},
...
]
}
I display the customer details in the below list, where the user can also edit the customer:
this.list =
new sap.m.List({
items : [
new sap.m.InputListItem({
label : "Name:",
content : new sap.m.Input("name", {
type : "Text",
placeholder : "Name",
value : "{name}"
})
}),
new sap.m.InputListItem({
label : "Surname:",
content : new sap.m.Input("surname", {
type : "Text",
placeholder : "Surname",
value : "{surname}"
})
})
]
});
Once the user has changed the displayed info, how can I save the changes?
Hi there,
approximately I have the same problem.
The entire roundtrip should look like this:
I'm looking for a code example especially for the update- and create-method with json-Model.
I have already seen a couple of blogs and posts here on the scn, but nothing could help me.
I don't know how to fetch the x-csrf-token from a oModel.read-method. (I tried with response.headers in the onReadSuccess-function)
I don't know how to handle the request in the update-entity-method in where I can CALL FUNCTION 'ChangeProduct' for example. (I think I will get import-parameters?)
I'm looking forward anybody can help me.
Thx very much,
Tobias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tommaso, what is the layout you are trying to implement? If you use binding for sap.m.List you can define only one template of sap.m.InputListItem with property bound to the same model property (value->{name}) not 2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maksim,
yes I'm sap.m.List to display the customer detail. I'm using a local object, the List is bounded to that object to show the customer detail and I'd like to know if it's possible and how to update a value for a customer. The entire roundtrip should look like this:
Is it possible? How?
Thank you in advance
ps: do you guys have or can you please link me to a complete code example for CRUD operations?
smth like this ?
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.