Appframe Knowledge Base


1 hits
0

How to make a custom af.controls.DropdownBase sub-class

function DropdownForm(pOptions) {
    var priv = {
        options: new af.common.Options({
            defaults: { width: null, height: null, fields: null },
            passed: pOptions
        })
    };
    priv.initControl = function initControl() {
        priv.control = new af.controls.Form({ fields: priv.options.fields });
    };
    af.controls.DropdownBase.call(this, priv); // Call base class passing our instance and priv
}
DropdownForm.prototype = new af.controls.DropdownBase(DropdownForm);

/*
// Example usage
var vDropdownForm = new DropdownForm({
    fields: [
        { FieldName: "Test", Editor: "Textbox" }
    ]
});

vDropdownForm.show($0);
*/

web · Perma link post comment Posted by: Jan Henrik H. Meling (05-okt-2012)