1. #1
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,132
    Vote Rating
    322
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default Ext.ux.data.BindMgr - Databind Manager

    Ext.ux.data.BindMgr - Databind Manager


    Hi there,

    as some of you may have noticed, I've been into data binding technology recently. I've run from failed concept of "binding-record-to-component", through "binding-components-to-record" implemented in Ext.data.Record, to Bind Manager that finally looks pretty usable and universal, yet simple enough.

    BindMgr is a singleton that manages records (as many of them as you need, from as many stores as you need - or standalone records) and components bound to them. The idea is that after you bind a component to a record, the component will be informed about data changes in that record. If component has afterEdit, afterReject, afterCommit, onBind and onUnbind methods they will be called with the record causing the change as argument.

    You can see the demo at http://examples.extjs.eu/?ex=databind and documentation of BindMgr at http://extjs.eu/docs/?class=Ext.ux.data.BindMgr

    Enjoy,
    Saki

  2. #2

  3. #3
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,132
    Vote Rating
    322
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Re id: Bound components are internally stored in an object and keyed by their id for easy reference. Ext assign ids anyway.

    Re Record (last version): It is fully functional but I started to doubt that it will find its way to to the core. I also started to realize that data binding functionality should be separated from the record itself. I will update the Feature Request thread.

  4. #4

  5. #5
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,132
    Vote Rating
    322
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Because I use c.id as key to internal object that stores bound components:

    this.bounds[internal_id].components[c.id] = c;

  6. #6

  7. #7
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,132
    Vote Rating
    322
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Now I get the question....

    Component is w/o id before it is initialized, so if user passes sth like:

    Ext.ux.data.BindMgr.bind(record, {xtype:'grid', ...});

    it will be ignored. Maybe the test is redundant but does no harm and protects internal storage.

  8. #8

  9. #9
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    64
    Vote Rating
    0
    MeDavid is on a distinguished road

      0  

    Default


    We where thinking about implementing much the same idea. Is there any specific reason you didn't choose to use the plugin structure?

  10. #10
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,132
    Vote Rating
    322
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Plugin to components? I dropped the idea for more reasons:

    1) concept of binding record to component failed. Good concept is: bind components to record
    2) it is too much overhead of add plugin to all components you want to bind
    3) you can have many records from many stores and many components bound to them at the same time

    So the concept of sigleton BindMgr is best I can see at present.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar