on 11-11-2015 1:34 PM
Hello,
I would like to have dropdowns in a table to change the status of each row.
What I did so far: See code velow
XML:
<Table rows="{/opportunities}" >
<Column>
<m:Label text="Status" />
<template>
<m:Select change="changeStatus" selectedKey="{Status}" items="{/stati}" >
<c:Item text="{Status}" key="{Status}" />
</m:Select>
</template>
</Column>
<Column>
<m:Label text="Transaction ID" />
<template>
<m:Text text="{TransactionID}"/>
</template>
</Column>
</Table>
Javascript:
changeStatus: function(Selection){
var sel = Selection.getParameter("selectedItem").getText();
alert(sel);
}
So whenever I select a Status, I also want to get the "TransactionID" so that I know for which ID I want to change the status.
Hwo do I do that?
Greetings,
Jan
Hi Jan,
Will this help? JS Bin - Collaborative JavaScript Debugging
changeStatus: function(oEvent){
var oSelectedItem = oEvent.getSource().getParent();
var oBindingContext = oSelectedItem.getBindingContext();
var oModel = oBindingContext.getObject();
alert(JSON.stringify(oModel));
}
Regards,
Sai Vellanki.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.