1. #61
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    581
    Vote Rating
    9
    Dumas will become famous soon enough

      0  

    Default


    Just added support for CakePHP 2.2

  2. #62
    Sencha User
    Join Date
    Aug 2012
    Posts
    6
    Vote Rating
    0
    imafrikan is on a distinguished road

      0  

    Default Using Bancha in Mvc style application

    Using Bancha in Mvc style application


    Hi there, please this may be a noob question. But i cant figure out where or how i would use
    Code:
    Bancha.onModelReady(){}
    In an MVC application

    for example , would i initialize the models in my app.js below ?
    Code:
    Ext.application({
        //requires: ['Ext.container.Viewport'],
        name: 'Am',
        appFolder: 'webroot/js/app',
        controllers: [
            'Users'
        ],
        launch: function() {
            Ext.create('Ext.container.Viewport', {
                layout: 'fit',
                items: 
                    {
                        xtype: 'userlist'
                        
                    }
                
            });
        }
    });
    Or in my Controller ?

    Code:
    Ext.define('Am.controller.Users', {
        extend: 'Ext.app.Controller',
        stores: [
            'Users'
        ],
        models: ['User'],
         views: [
            'user.List',
            'user.Edit'
        ],
        init: function() {
            this.control({
                'viewport > userlist': {
                    itemdblclick: this.editUser
                },
                'useredit button[action=save]': {
                    click: this.updateUser
                }
            });
            console.log('Initialized Users! This happens before the Application Launch function is called');
        },
        
         editUser: function(grid, record) {
           var view = Ext.widget('useredit');
           view.down('form').loadRecord(record);
        },
        
        updateUser: function(button) {
            console.log('clicked the Save button');
            var win    = button.up('window'),
            form   = win.down('form'),
            record = form.getRecord(),
            values = form.getValues();
    
    
        record.set(values);
        win.close();
        this.getUsersStore().sync();
        }
    });
    I am confused as to what part should i use it.
    Say i wanted to create a grid panel dynamically, at what point would i have to use Bancha.onModelReady(){}

    thank you.

    If someone can give a little example too, that would also help. Thanks

  3. #63
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    581
    Vote Rating
    9
    Dumas will become famous soon enough

      0  

    Default


    Hello,

    if you are having under 50 models I would recommand you to include the Bancha API with
    /bancha-api/models/all.js

    This means that all model definitions are already loaded from the server. Now you don't need to use the asynchronous way and instead you can just use write your store definition like this and don't have to think about anything anymore:
    Code:
    Ext.define('MyApp.store.User', {
        extend: 'Ext.data.Store',
        config: {
            model: Bancha.getModel('User')
        }
    });
    Best regards
    Roland

  4. #64
    Sencha User
    Join Date
    Aug 2012
    Posts
    6
    Vote Rating
    0
    imafrikan is on a distinguished road

      0  

    Default


    Quote Originally Posted by Dumas View Post
    Hello,

    if you are having under 50 models I would recommand you to include the Bancha API with
    /bancha-api/models/all.js

    This means that all model definitions are already loaded from the server. Now you don't need to use the asynchronous way and instead you can just use write your store definition like this and don't have to think about anything anymore:
    Code:
    Ext.define('MyApp.store.User', {
        extend: 'Ext.data.Store',
        config: {
            model: Bancha.getModel('User')
        }
    });
    Best regards
    Roland

    Thanks Roland, I tried your suggestion, and i ran into some problems.

    Please i am getting the following errors from console.

    /Bancha/data/writer/JsonWithDateTime.js?_dc=1346182280931 404 (Not Found)
    /bancha-api/models/all.js 404 (Not Found)

    Even though i have followed the installation instructions .

    The wierd thing though, is that if i delete all my model classes in cakephp, the /Bancha/setup-check.html
    returns Congratulations! You have successfully installed Bancha.
    But when i generate my model classes using bake,
    the the /Bancha/setup-check.html returns

    Load Bancha Remote API404: Could not load the Bancha Remote API
    You most likely did not correctly installed Bancha, please check Installation: Step 2 and make sure there are no cake errors in the Remote API.

    Thank you.



  5. #65
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    581
    Vote Rating
    9
    Dumas will become famous soon enough

      0  

    Default


    Hello,

    In your current installation you need to include:
    devbox/homehealthext/Bancha/js/Bancha.js
    devbox/homehealthext/bancha-api/models/all.js

    If you are using Apache try disabling MultiViews, this could lead to a problem:
    See https://github.com/Bancha/BanchaTest.../.htaccess#L20

    If this doesn't work please open the remote api:
    devbox/homehealthext/bancha-api.js

    and (if you have a github account) post the issue to https://github.com/Bancha/Bancha/issues
    otherwise we can talk here.

    We should be able to fix that one ;-)

    Best regards
    Roland

  6. #66
    Sencha User
    Join Date
    Aug 2012
    Posts
    6
    Vote Rating
    0
    imafrikan is on a distinguished road

      0  

    Default


    Just wanted to say thank you, while i go try out your suggestions. Thank you.

  7. #67
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    581
    Vote Rating
    9
    Dumas will become famous soon enough

      0  

    Default


    No problem

  8. #68
    Sencha User
    Join Date
    Aug 2012
    Posts
    6
    Vote Rating
    0
    imafrikan is on a distinguished road

      0  

    Default


    Ok i have been able to solve one problem.

    /bancha-api/models/all.js 404 (Not Found)

    This Error is caused if you have not yet baked your controller.

    But i am still having this problem.

    /Bancha/data/writer/JsonWithDateTime.js?_dc=1346182280931 404 (Not Found)

    I followed your suggestions above i.e I disabled Multiviews in Apache2, I triple checked my include statement in my default layout.

    Thank you.

  9. #69
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    581
    Vote Rating
    9
    Dumas will become famous soon enough

      0  

    Default


    Quote Originally Posted by imafrikan View Post
    ...
    This Error is caused if you have not yet baked your controller.
    Oh, yes. This is actually not a bug, but there should be a usefull debugging error message for this case. There's already a https://github.com/Bancha/Bancha/issues/78 for that, should be solved in the next release.


    About your second problem:
    /Bancha/data/writer/JsonWithDateTime.js?_dc=1346182280931 404 (Not Found)
    This request is triggered by the ExtJS dependency loader and means that the JsonWithDateTime writer is not available. This is defined in /Bancha/js/Bancha.js

    So there is some script inclusion error. Please try opening /Bancha/js/Bancha.js directly in your browser and see what error you get. Can you post that here.

    Thanks
    Roland

  10. #70
    Sencha User
    Join Date
    Nov 2011
    Posts
    1
    Vote Rating
    0
    vpetrunov is on a distinguished road

      0  

    Default model relations

    model relations


    are there plans for Bancha to support relations between models?

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi