Hi,
I have a sap.m.Table control where I want to set the mode property dynamically using a formatter.
My view is bound to the parent entity('thesises') and the items are bound with a sub entity('attachments'). So attachments is a subentity of thesises.
I want to use a property of both entities to decide the mode.
I tried this way, but that doesn't work:
mode: { parts : [ { path : 'uploadAllowed' }, { path: 'attachments/attachmentType' }], formatter : function( changeAllowed, attachmentType) { if (uploadAllowed && attachmentType == "varia") { return "Delete"; } else { return "None"; } } }
So the mode should be 'Delete' when 'changeAllowed is true and the attachmentTime is "varia" (on item level). If not, the mode should be "None"
Is there anyone who can help me?
Thanks!
RW