Hi,
some of you may have already recognized that it is not possible to hide a thingGroup or row of a thingGroup on an overlay dialog using the sap.ui.viewModifications as described in the enhancement guide for the SAP TM collaboration portal. In order to hide a thingGroup or one of its rows, a new concept using sap.ui.ControllerExtensions has to be applied.
If you want to modify an overlay dialog, for instance the „Transport Details“ dialog for Freight Requests for Quotation, you need to identify the controller which refers to this overlay dialog, in this case the controller of view "sap.tl_collaboration_portal.view.requestsForQuotation". Then you need to create a custom controller for exactly this view, which implements the following functions:
rowProperty : "<PropertyOfRow1>" },
{ thingGroupID : "<thingGroupID2>",
rowProperty : "<PropertyOfRow2>" }
}
Within this object, property „thingGroupID“ must reflect the technical ID (string) of the thingGroup control, which contains the row, and property „rowProperty“ must contain the name (string) of the property, which is bound to this row, e.g. „DangerousGoodsIndicator“.
jQuery.sap.declare("zcoll_portal.Component"); jQuery.sap.require("sap.tl_collaboration_portal.Component");
// new custom component sap.tl_collaboration_portal.Component.extend("zcoll_portal.Component", { metadata : { customizing : { " sap.ui.controllerExtensions" : { "sap.tl_collaboration_portal.view.requestsForQuotation": { controllerName: "zcoll_portal.CustomRequestsForQuotation" } } } } }); |
sap.ui.controller("zcoll_portal.CustomRequestsForQuotation", { getThingGroupIdsToBeRemovedFromOverlay: function(){ var aIdsToBeRemovedFromOverlay = new Array(); // Hide Last Quotation Information aIdsToBeRemovedFromOverlay.push("thingGroupLastQuotation"); // Hide Business Partner Information aIdsToBeRemovedFromOverlay.push("thingGroupBusinessPartners"); return aIdsToBeRemovedFromOverlay; }, getRowsToBeHiddenFromOverlay: function(){ var oRowsToBeHidden = {}, oNewElement1 = {}, oNewElement2 = {}, oNewElement3 = {}; // Hide RFQ Status oNewElement1.thingGroupID = "thingGroupRfq"; oNewElement1.rowProperty = "LifecycleStatusDescription"; // Hide Contact Person Phone Number oNewElement2.thingGroupID = "thingGroupRfq"; oNewElement2.rowProperty = "ContactPersonPhoneNumber"; // Hide Dangerous Goods oNewElement3.thingGroupID = "thingGroupTransport"; oNewElement3.rowProperty = "DangerousGoodsIndicator"; jQuery.extend(true, oRowsToBeHidden, [oNewElement1, oNewElement2, oNewElement3]); return oRowsToBeHidden; } }); |
And that's it! This is introduced with SAP Note 2354736 - Collaboration Portal: It is not possible to hide thingGroup or thingGroup row on an overla..., and the Enhancement Guide for the SAP TM collaboration portal will also be updated with this new concept very soon. Stay tuned!
Cheers,
Sabine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
2 | |
2 | |
2 |