Hi Friends,
Iam a new bie in sapui5,I having a small requirement where i got struck.I need your help to solve my issue..
I Having a table with a list of records in a Fragment .OnClick of any row.I need to see a dialog with list of events in that row..
This is the table in xml Fragment ::
<m:Table id="TestEvent" visible="false" >
<m:columns>
<m:Column
minScreenWidth="Tablet"
demandPopin="true">
<m:Label text="Status" />
</m:Column>
<m:Column
minScreenWidth="Tablet"
demandPopin="true">
<m:Label text="Code " />
</m:Column>
<m:Column
minScreenWidth="Tablet"
demandPopin="true">
<m:Label text="Date" />
</m:Column>
<m:Column
minScreenWidth="Tablet"
demandPopin="true"
hAlign="Center">
<m:Label text="Time" />
</m:Column>
</m:columns>
<m:items>
<m:ColumnListItem>
<m:cells>
</m:cells>
</m:ColumnListItem>
</m:items>
</m:Table>
in the JS::
test: function(evt){
var that = this;
var eventId = evt.getSource().data("test1");
var positionId = evt.getSource().data("position");
if(!sap.ui.getCore().getModel("testModel"))
util.ServiceConfig.createHanaModel("/test.xsodata/", "testModel", "", "hanadse");
var oFilter1 = new sap.ui.model.Filter("SAPClient", sap.ui.model.FilterOperator.EQ, "'100'");
sap.ui.getCore().byId("TestEvent").setVisible(false);
var list = sap.ui.getCore().byId("TransportPlan");
list.getModel('testModel').oData = {};
var template = new sap.m.ColumnListItem({
cells: [
new sap.ui.core.Icon({
src: "{path : 'sap-icon://accept'}"),
new sap.m.ObjectStatus({text: "{objTYPE}"}),
new sap.m.ObjectStatus({text: "{testID}"})
]
});
var bindPath = "testModel>/test(SalesOrder='"+eventId+"')/Results?";
list.bindAggregation("items", {
path: bindPath,
template: template,
filters: [oFilter1]
});
},
I Used createHanaModel to populate the rows in the table like this::
util.ServiceConfig.createHanaModel("/sial/sapnext/evm/odata/Tracking.xsodata/", "TrackingModel", "", "hanadse");
Now on click of any row in the table i need to see a dialog box where it will show the complete information.
Please help me to solve this
Thanks in Advance