on 07-08-2016 7:20 AM
Hi Experts,
I have added Estimated Duration label in Transport Details overlay and need to show the corresponding value.
Component.js
jQuery.sap.declare("ztmui_extension.Component");
jQuery.sap.require("sap.tl_collaboration_portal.Component");
// new custom component
sap.tl_collaboration_portal.Component.extend("ztmui_extension.Component", {
metadata: {
customizing: {
"sap.ui.controllerExtensions" : {
"sap.tl_collaboration_portal.view.requestsForQuotation": {
controllerName: "ztmui_extension.view.freightRequests"
}
}
}
},
init : function() {
this._oResourceModel = new
sap.ui.model.resource.ResourceModel({
bundleName: "sap.tl_collaboration_portal.language_bundle.i18nGeneral"
});
this._oResourceModel.enhance({
bundleName: "ztmui_extension_language_bundle.custom"
});
sap.ui.core.UIComponent.prototype.init.apply(this, arguments);
},
});
Controller.js
sap.ui.controller("ztmui_extension.view.freightRequests", {
onInit: function() {
},
onAfterRendering: function() {
if(sap.ui.getCore().byId("durationRow") == undefined){
var oMatrixDurationRow =new sap.ui.commons.layout.MatrixLayoutRow({id : "durationRow"});
var oMatrixDurationCell= new sap.ui.commons.layout.MatrixLayoutCell({
id : "durationCell",
content: new sap.ui.commons.Label({id : "durationLbl", text: "Estimated Duration :"})
});
oMatrixDurationRow.addCell(oMatrixDurationCell);
sap.ui.getCore().byId("thingGroupTransport").mAggregations.content[0].addRow(oMatrixDurationRow);
}
else
return;
},
});
I am not able to get the selected row value from requestsTable inside onAfterRendering method.
Kindly let me know for any other solution.
Regards,
Vasantham
Hi Vasantham,
I see two possibilities:
Best regards,
Jan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jan,
Thanks for your quick response.
Option 1: I am able to read the table inside OnAfterRendering, not able to get the selected row. so i go for second option.
And i have one more query:
I need to add ETA field with Time and Date picker in the path : Freight order details overlay-> events tab-> Tour events -> add event-> add unexpected event popup.
Please let me know your preferred solution it would save the time.
Thanks,
Vasantham
If you need a time and date picker, I assume the selected time has to be persisted in the back end afterwards?
This is not an easy thing, as the existing BAdI concept (chapter 1) doesn't support editable fields, only read only fields.
For writing back values from a custom extension, I would suggest to create an own additional Gateway service in which you can take care of persisting the timestamp at the designated place.
To call this service, you have to find an appropriate place on the UI to trigger that call.
User | Count |
---|---|
8 | |
4 | |
3 | |
2 | |
2 | |
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.