Notifications
Clear all

How to make fields non editable in actionable list view

2 Posts
3 Users
0 Reactions
799 Views
0
Topic starter

I have an action whose write mask has certain fields set to be optional so they can be modified in a server-side listener, but on the UI, I want them to be non-editable. How can I do this?

2 Answers
0

You need to add js-plugin for your view and set editable and editableOverride to false for coulmns you need to have read-only.
You can use columnconfig event of report.

Something like this:

      ,onColumnConfig: function(report, columnCfg){
        Ext.each(columnCfg, function(c){
              if(c.id == 'TMS$StaticRoute$TmsActive'){
                Ext.apply(c,{
                  editable: false
                  ,editableOverride: false
                });
                return false;
              }
            });
          }
0

This can be done with a report plugin by adding a handler to One.Report's actionstarted event. From there you can modify the fieldInfo array which holds the write mask for the action. Here's an example of how you might do it:

for(var i = 0; i < actionInfo.fieldInfo.length; ++i) {
  var field = actionInfo.fieldInfo[i];
  if(field.name == 'MOD$Model$Field') {
    field.mask = 'IGNORED';
    break;
  }
}