Bancha Scaffold is stable

by Roland Schütz (comments: 0)

After a full refactoring of Bancha Scaffold, it has now reached it's first stable release and will be integrated into Bancha 2. We have hughly extended the API documenation and files can now be loaded via dynamic loading. Before refactoring the API was not very clean and to many it was unclear how to set global configurations. Not we have separated this out into config classes, which will be used during scaffolding.

You are able to set global defaults using:

Bancha.scaffold.form.Config.setDefault({onSave: mySaveFn});
Bancha.scaffold.grid.Config.setDefault({onSave: mySaveFn});

To configure individual panel's you simply configure the panel's scaffold config:

Ext.define('MyApp.view.GridPanel', {
    extend: 'Ext.grid.Panel',

    title: 'Scaffold grids with full CRUD support',
    scaffold: 'Bancha.model.User', // define the model here
});

or

Ext.define('MyApp.view.GridPanel', {
    extend: 'Ext.grid.Panel',

    title: 'Scaffold grids with lots of configuration options',

    // define a scaffold config
    scaffold: {
        target: 'Bancha.model.User', // define the model here
        editable: false // the grid should not be editable
    }
});

More

To read more about Bancha Scaffold 1.0 please check out our update installation instruction and read the new API Docs.

Go back

Comments

Add a comment

Subscribe

Sign up for exclusive Bancha news!