1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
    tamil50 is on a distinguished road

      0  

    Default 'insertAdjacentHTML' is null or not an object

    'insertAdjacentHTML' is null or not an object


    hi.. i am getting the above error when i am trying to add combo box inside grid panel.. can someone help me out..

    I'm pasting my code.

    var radioIndex =0;
    var amlConsts = AOF.constants.AmlSensitivityAndFscsInformation.AmlFscsConstants;
    Ext.define('AOF.view.AmlSensitivityAndFscsInformation.amlFscsView' ,{
    extend: 'Ext.grid.Panel',
    alias : 'widget.amlFscsView',
    title: '12. AmlSensitivityAndFscsInformation',
    store : 'AmlSensitivityAndFscsInformation.AmlFscsStore',
    id: 'amlFscsForm',
    deferredRender: false,
    fldId : amlConsts.amlGrid,
    screenId: amlConsts.screenId,
    initComponent:function()
    {
    this.columns=[
    // Currency Code
    {header:'Currency Code',dataIndex:'currency', width: 150,
    flex:1,
    renderer:function(val){
    return Ext.String.format('<label>{0}</label>',val.isoCcyCode);
    }
    },
    //Currrency Name
    {header:'Currency Name',dataIndex:'currency', width: 300,
    flex:1,
    renderer:function(val){
    return Ext.String.format('<label>{0}</label>',val.ccyName);
    }
    },
    // Aml Required radio button
    {header:'Aml Required',dataIndex:'isAmlDrReqFl', flex:1,width: 300,
    renderer: function(value) {

    radioIndex++;
    var temp = '<div id="radioGroup"><input type="radio" name="r1' + radioIndex;
    temp = temp + '" id="r1_true"';

    if(value == amlConsts.yes)
    {
    temp = temp + 'checked = "true">Yes</input><input type="radio" name="r1'+radioIndex;
    temp = temp + '" id="r1_false" >No</input>';

    }
    else if (value == amlConsts.no)
    {
    temp = temp + '>Yes</input><input type="radio" name="r1'+radioIndex+'"';
    temp = temp + 'checked = "true" id="r1_false">No</input>';

    }
    else
    {
    temp = temp + '>Yes</input><input type="radio" name="r1'+radioIndex+'" id="r1_false">No</input>';

    }


    return Ext.String.format(temp,value);
    }},

    {header:'FSCS',dataIndex:'acntOvrrideTypeCd', flex:1,
    renderer: function(val, metaData, record, rowIndex, colIndex) {
    var id = Ext.id();
    console.log("val, metaData, record, rowIndex, colIndex");
    console.log(val, metaData, record, rowIndex, colIndex);
    var store = new Ext.data.Store({
    fields: ['code', 'description'],
    data:[
    {"code":"","description":""},
    {"code":"E","description":"E"},
    {"code":"D","description":"D"},
    {"code":"S","description":"S"}
    ]
    });

    Ext.Function.defer(
    (function()
    {Ext.create('Ext.form.ComboBox', {
    viewConfig: {
    id: 'acntOvrrideTypeCd-'+rowIndex},
    queryMode: 'local',
    renderTo: id,
    store: store,
    forceSelection: true,
    triggerAction: 'all',
    lazyRender:true,
    valueField: 'code',
    displayField: 'description',
    value: val
    });
    }),1);

    }
    }
    ];
    this.callParent(arguments);
    }
    });

  2. #2
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Vote Rating
    113
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


    The problem is that you create and render a combo box to an element that does not exist. From your code of rendering of the last column below:
    - First, you generate a random id with Ext.id().
    - Then you create a combobox and render this combobox to element with ID equals to generated id.
    There is no other places to use this id. It means that there is no element with ID equals to generated id in your page at the time of creating and rendering combobox.
    Code:
        header:'FSCS',dataIndex:'acntOvrrideTypeCd', flex:1,
        renderer: function(val, metaData, record, rowIndex, colIndex) {
            var id = Ext.id(); // generate a random id 
            console.log("val, metaData, record, rowIndex, colIndex");
            console.log(val, metaData, record, rowIndex, colIndex);
            var store = new Ext.data.Store({
                fields: ['code', 'description'],
                data:[
                    {"code":"","description":""},
                    {"code":"E","description":"E"},
                    {"code":"D","description":"D"},
                    {"code":"S","description":"S"}
                ]
            }); 
    
    
            Ext.Function.defer( function(){
                Ext.create('Ext.form.ComboBox', {
                    viewConfig: {
                    id: 'acntOvrrideTypeCd-'+rowIndex},
                    queryMode: 'local',
                    renderTo: id,
                    store: store,
                    forceSelection: true,
                    triggerAction: 'all',
                    lazyRender:true,
                    valueField: 'code',
                    displayField: 'description',
                    value: val
                });
            }, 1);
        }

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
    tamil50 is on a distinguished road

      0  

    Default


    thanks .....
    can u plz tel hw can i resolve this...

  4. #4
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Vote Rating
    113
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


    Have a look at my Its.grid.column.Component. It is an extension that allows to embed components (such as combobox, graph, etc) inside grid cells.

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