on 08-24-2015 12:33 PM
Hi @all
I'm really new to SAP HANA and SAPUI5 and I'm trying to do some first projects. Currently got a person list working. (See tutorial: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40371b91-7e95-3110-e29a-cde3b1447...) Now I want to add some features to that application without any tutorial but I'm actually not really moving forward...
What I want: Select ONE row and delete it after confirmation.
How do I start with this when I have no idea how to do it? I googled a little bit but didn't find anything useful.
What I tried so far: I added a function in the controller named "removePerson". But how do I state a delete action?
I am pretty good with SQL, is there an option to just do this with SQL, so that I can just call an SQL-Script?
And how do I start a dialog / action when I select a row?
I have already read a little bit into the dialog function, so I know how to fill a dialog with content and how to show it.
Anyone willign to help me with this beginner problems?
Attached you can find a couple screenshots of whats actually there...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
new sap.ui.commons.Button("deletebuttonId", {
icon : "sap-icon://delete",
style: sap.ui.commons.ButtonStyle.Reject,
lite : true,
tooltip:"Delete",
press : function(){
var idx = oTable.getSelectedIndex(); //oTable is ur table name
if (idx !== -1) {
var m = oTable.getModel();
var data = m.getData();
var removed = data.splice(idx, 1);
m.setData(data);
m.refresh();
}
}
}),
give your table name in place of oTable .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.