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
    Ext User
    Join Date
    Aug 2010
    Posts
    2
    Vote Rating
    0
    Bolle87 is on a distinguished road

      0  

    Default XMLReader Filtern

    XMLReader Filtern


    Hi,

    I've got a little problem, but I do not find any solutions for that!

    I use the Ext.data.XMLReader to load a XML file to an Ext.data.Store.

    But I want filter the XMl, so that for example only the tags where city=Berline are loaded!

    Code:
    var doctorStore = new Ext.data.Store({
            // load using HTTP
            url: 'test.xml',
            autoLoad:true,
            // the return will be XML, so lets set up a reader
            reader: new Ext.data.XmlReader({
              record: 'people'
              }, [
              {name: "title", mapping:"@title"}, 
              {name: "name", mapping:"@name"}, 
              {name: "city", mapping:"@city"},
              {name: "country", mapping:"@country"},
              ]),
              listeners:{
            load :function(){
                grid.getSelectionModel().selectFirstRow();
            }
              }
        });
    That ist, how my XML looks like:
    Code:
    <list>
    <people title='Dr.' name='Walter' city='Berlin' country='Germany'/>
    <people title='Dr.' name='Simon' city='Frankfurt' country='Germany'/>
    <people title='Dr.' name='Chris' city='Freiburg' country='Germany'/>
    <people title='Dr.' name='Jens' city='Berlin' country='Germany'/>
    </liste
    So, can someone help me pls?


    Bolle87


    I recognized that I do not use ext 2.x - I use ext 3.x!

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    82
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    You could use:
    Code:
    record: 'people[city=Berlin]'

  3. #3
    Ext User
    Join Date
    Aug 2010
    Posts
    2
    Vote Rating
    0
    Bolle87 is on a distinguished road

      0  

    Default


    Thank You =)

  4. #4
    Ext User
    Join Date
    Dec 2010
    Posts
    3
    Vote Rating
    0
    Sachin21J is on a distinguished road

      0  

    Default


    its good

  5. #5
    Ext User
    Join Date
    Dec 2010
    Posts
    3
    Vote Rating
    0
    Sachin21J is on a distinguished road

      0  

    Default


    operatorStoreReader = new Ext.data.XmlReader({
    record:'ops'
    },
    [{
    name:'opName',
    mapping:'name'
    },
    {
    name:'opType',
    mapping:'type'
    }]
    );

    operatorComboStore=new Ext.data.Store({
    url:'operator.xml',
    autoLoad:true,
    reader: operatorStoreReader
    });

    myStore=new Ext.data.Store({
    url:'UsersInfo.xml',
    autoLoad:true,
    reader: new Ext.data.XmlReader({
    record:'employee',
    id:'id'
    },
    [{
    name:'columnName',
    mapping:'colname'
    },

    {
    name:'type',
    mapping:'type'
    }]
    )
    });

    operatorCombo =new Ext.form.ComboBox({
    id: 'operatorCombo',
    forceSelection: true,
    triggerAction: 'all',
    editable:false,
    lazyInit: false,
    fieldLabel: 'Operator',
    mode: 'local',
    lastQuery:'',
    store: operatorComboStore,
    displayField:'opName'
    }); // end of operatorCombo combo.


    columnNameCombo =new Ext.form.ComboBox({
    forceSelection: true,
    editable:false,
    id:'columnNameCombo',
    triggerAction: 'all',
    // selectOnFocus:true,
    lazyInit: false,
    displayField:'columnName',
    store: myStore,
    mode: 'local',
    fieldLabel:'Column Name',
    listeners: {
    select: {
    fn:function(combo, value) {
    operatorCombo.clearValue();
    operatorCombo.store.filter('opType', value.get('type'));
    return;
    }
    }
    }
    }); // end of combo columnNameCombo.


    myPanel = new Ext.FormPanel({
    xtype : 'myPanel',
    id:'myPanel1',
    plain:true,
    width:490,
    height:170,
    autoHeight:true,
    buttonAlign : 'center',
    items:[
    firstGrid,
    columnNameCombo,
    operatorCombo,
    {
    id:'desired',
    name:'desired',
    xtype:'textfield',
    fieldLabel:'Desired Value'
    }
    ],

    buttons: [ {
    text:'Add Criteria',
    handler:function addCriteria(){
    where = Ext.getCmp('columnNameCombo').getValue();
    qualifier=Ext.getCmp('operatorCombo').getValue();
    desired = Ext.get('desired').getValue();
    }
    },{
    text: 'Show Result',
    handler:function search(){

    where = Ext.getCmp('columnNameCombo').getValue();
    qualifier=Ext.getCmp('operatorCombo').getValue();
    desired = Ext.get('desired').getValue();

    GetUserInfo.getUserInfo(where,qualifier,desired,{
    callback : function(data){

    result = Ext.util.JSON.decode(data);

    displayResult(result); //call function to display grid.

    }, // end callback function

    errorHnadler:function(message){

    Ext.Msg.alert('Error',message);
    }
    });

    }
    }]

    }); // End of myPanel panel.

    myWin = new Ext.Window({
    width:500,
    height:200,
    autoHeight:true,
    title:'Advance Search Window',
    items: [myPanel]
    }); // end of window.

    myWin.show();

    });

  6. #6
    Ext User
    Join Date
    Dec 2010
    Posts
    3
    Vote Rating
    0
    Sachin21J is on a distinguished road

      0  

    Default


    1

  7. #7
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    82
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Quote Originally Posted by Sachin21J View Post
    1
    Is this a question?

Similar Threads

  1. Replies: 5
    Last Post: 3 Feb 2009, 11:03 AM
  2. XmlReader
    By asergey in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 8 May 2008, 7:27 AM
  3. XmlReader
    By nazar_lv in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 22 Nov 2007, 9:41 AM
  4. XMLReader
    By mhubert in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 31 May 2007, 3:07 PM
  5. xmlreader help....
    By geniiyr in forum Ext 1.x: Help & Discussion
    Replies: 7
    Last Post: 30 Mar 2007, 11:09 PM

Thread Participants: 2