Results 1 to 2 of 2

Thread: Mapping mongoDb document to extjs model

  1. #1
    Sencha Premium Member
    Join Date
    Mar 2013
    Posts
    4

    Default Mapping mongoDb document to extjs model

    Hi guys, how can i map mongo document with nested props to extjs model with associations and then use reference to this model in my ViewModel ?

    My JSON data:
    PHP Code:
    {   
     
    "host""name",    
     
    "config": {
            
    "application": {            
                   
    "prop"true
                    
    "prop2""somestring"  
            
    },  
          
    "mail": { 
               
    "server""somestring" 
           

       }

    Right now my model and viewModel looks like : http://pastebin.com/i28XqjW8 , but i have some problems with bind existing record (newly created seems ok..) to my form in modal edit-window,
    1. Loop errors :

    [E] TypeError: Cannot read property 'document' of undefined

    2. Record not be dirty when i edit nested props

  2. #2
    Sencha Premium Member
    Join Date
    Mar 2013
    Posts
    4

    Default

    i solve problem:
    1. using mapping field property
    2. custom json writer for mapping property
    3. bind without ViewModel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •