APIs

Show:

Not really a class but just an outline for how a column should be written.

{
    //required, used for sorting and for where to pull data from
    id: 'pim_administered_date',

    //column header. pulled from the model's attributeProps name property if not set in the column descriptor
    name: 'Administered',

    //a function that is passed the value, attributeName, and model in that order.
    //pulled from the model's attributeProps name property if not set in the column descriptor
    displayMethod: awa.func.strucword,

    //allows the grid to be sorted
    sort: true,

    //you can provide a column tpl function if desired. the template is passed an args object with item property that has all
    //of the models properties in display format and a model property with the model itself.
    tpl: undefined,

    //must return a string
    build: function(item, model){
        return "";
    }
}

//or

{
    id: 'actions',
    sort: false,
    buttons:[
        {
            type: "gray",icon:"check16",tip: "Enable Reason",className: "enable",
            condition: function(args){
                //args has model property and an item property
                //use those to determine if a button should display or not
                return true;
            }
            callback: function(args){
                args.model.set('rr_disabled', '');
                args.model.save().done(function(){
                    self.refresh();
                });
            },
            context: self
        }
    ]
}

Item Index

Properties

Methods

build

(
  • item
  • model
)

builds output, takes (attributes, model)

Parameters:

  • item Object

    The displayJSON version of the Model.

  • model awa.Model

displayMethod

(
  • value
  • attributeKey
  • model
)

Display function, takes (value, attributeKey, model)

Parameters: