Page 3 of 3 FirstFirst 123
Results 21 to 29 of 29

Thread: [OPEN-724] Problem with attribute mapping in XMLReader

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #21
    Sencha User edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939

    Default

    Quote Originally Posted by MaciejZabielski View Post
    Any idea how to make this mapping work:
    {name: 'leaf', type: 'boolean', mapping: '@leaf'}

    It worked with JSON data, but not with XML attribute: leaf="true"

    Thanks.
    Seems we have a bug in that functionality, niktw's patch above should address this for you until we put out a new release
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  2. #22

    Default

    Quote Originally Posted by edspencer View Post
    Seems we have a bug in that functionality, niktw's patch above should address this for you until we put out a new release
    yes that is true. As I have said before, niktw patch works, but still the special attribute "leaf" is ignored. Maybe because JSON is correctly parsed to boolean, but not XML? (GetDetailCard of NestedList will not be called). That's my guess but I haven't got time to digg into Sencha code.

  3. #23

    Default Fixed in 2.0?

    Is this functionality fixed in 2.0?? It seems as though this fix is critical for a data centric platform like sencha, where the returned format is not always up to the developer of the sencha app. I work with a lot of legacy platforms where XML was the mime type of choice. Anyway, I haven't explored the developer release of 2.0 and was curious of the status update for this "bug"

    Thanks,
    Scott

  4. #24
    Sencha User edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939

    Default

    Quote Originally Posted by TXAggie00 View Post
    Is this functionality fixed in 2.0??
    Yes! But not in the preview release we put out last week. It will be in the next release however. In the meantime the override above should continue to work
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  5. #25

    Default

    Quote Originally Posted by edspencer View Post
    Yes! But not in the preview release we put out last week. It will be in the next release however. In the meantime the override above should continue to work
    Thanks for the update!
    Scott

  6. #26

    Default

    Quote Originally Posted by edspencer View Post
    Yes! But not in the preview release we put out last week. It will be in the next release however. In the meantime the override above should continue to work
    Is it supposed to work in DP 3 from Dec. 9th? Because it's still broken in that release. Can we expect it to work in the 2.0 beta/final release?

  7. #27
    Sencha User edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939

    Default

    Quote Originally Posted by dontbugme View Post
    Is it supposed to work in DP 3 from Dec. 9th? Because it's still broken in that release. Can we expect it to work in the 2.0 beta/final release?
    Yes - it should be working fine in that release - do you have a test case that shows it failing?
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  8. #28

    Default

    Quote Originally Posted by edspencer View Post
    Yes - it should be working fine in that release - do you have a test case that shows it failing?
    This example doesn't work for me with preview 3, using the fix from earlier in this thread it works well:
    PHP Code:
    Ext.define("MyModel", {
        
    extend"Ext.data.Model",
        
    fields: [
            { 
    name"value"type"string"mapping"@attr"}
        ]
    });
    var 
    myStore Ext.create("Ext.data.Store", {
        
    model"MyModel",
        
    proxy: {
            
    type"ajax",
            
    url"test.xml",
            
    reader: {
                
    type"xml",
                
    root"items",
                
    record"item"
            
    }
        }
    });
    myStore.load({
        
    callback: function (records) {
            
    console.log(records);
        }
    }); 
    where test.xml is:
    HTML Code:
    <?xml version="1.0"?>
    
    <items>
        <item attr="value"></item>
        <item attr="another"></item>
        <item attr="3rd item"></item>
    </items>
    fails with the same DOM Exception 12 error as in earlier versions.
    Thanks
    Last edited by dontbugme; 6 Jan 2012 at 10:18 AM. Reason: 3rd try to submit properly formatted code..

  9. #29
    Sencha User
    Join Date
    Dec 2011
    Posts
    58

    Default

    I'm having the same problem using 'mapping', is there a fix we can apply? Or a workaround?

    I'm using Sencha Touch 2 PR3

Page 3 of 3 FirstFirst 123

Similar Threads

  1. XmlReader mapping to XML attribute
    By Davi Baldin in forum Ext 1.x: Help & Discussion
    Replies: 7
    Last Post: 16 Jan 2012, 4:34 PM
  2. problem with attribute mapping in xml reader?
    By djkraz in forum Sencha Touch 1.x: Discussion
    Replies: 7
    Last Post: 21 Nov 2011, 7:33 AM
  3. XMLReader -> Attribute Mapping -> Ext.DomQuery?
    By Aigu in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 23 Aug 2011, 1:24 PM
  4. [OPEN] [OPEN-724] Problem with disabled property
    By ricoux63 in forum Ext 3.x: Bugs
    Replies: 1
    Last Post: 17 Jun 2010, 4:12 PM
  5. Problem with XmlReader and mapping
    By de in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 30 Apr 2008, 12:02 PM

Posting Permissions

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