Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    59
    Answers
    6
    Vote Rating
    0
    1099511627776 is on a distinguished road

      0  

    Default Answered: Custom field in TreeStore with a defined model

    Answered: Custom field in TreeStore with a defined model


    Hello world
    I have some unknown bug.
    In MVC Application I've define TreeStore with model:
    Code:
    Ext.define('ASV.model.documents',{
        extend: 'Ext.data.Model',
        fields:[
            {name: 'id',type:'int'},
            {name: 'text', type:'string'},
            {name: 'action', type:'string'},
            {name: 'leaf', type:'bool'}
        ]    
    });
    And assigned it to TreeStore:
    Code:
    Ext.define('ASV.store.documents',{
        extend: 'Ext.data.TreeStore',
        autoLoad:true,
        model:'documents',
    .........
    When I'm getting data from json response from server all field are assigned normally except custom "action' field.
    I've googled and found this topic: http://www.sencha.com/forum/showthre...om-a-tree-node, but that is not my case.

  2. This:

    Code:
    model:'documents',
    should be this:

    Code:
    model: 'ASV.model.documents',

  3. #2
    Sencha User
    Join Date
    Dec 2011
    Posts
    59
    Answers
    6
    Vote Rating
    0
    1099511627776 is on a distinguished road

      0  

    Default


    For now I've found a workaround.by using listeners to TreeStore:
    Code:
        listeners:{
            append:function(thisNode,newChildNode,index,eOpts){
                if( !newChildNode.isRoot() ){
                    newChildNode.set("action",newChildNode.raw.action);
                    console.log(newChildNode);
                }
            }
        }
    But I think tere might be a normal way to solve this problem

  4. #3
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,477
    Answers
    523
    Vote Rating
    280
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    This:

    Code:
    model:'documents',
    should be this:

    Code:
    model: 'ASV.model.documents',

  5. #4
    Sencha User
    Join Date
    Dec 2011
    Posts
    59
    Answers
    6
    Vote Rating
    0
    1099511627776 is on a distinguished road

      0  

    Default


    Yes, I've just firuged it out Just before refreshing a forum thread

Thread Participants: 1