display just simple text, with or without a label, in my form layout.
Tuesday, 10 May 2011 11:50

 

new Ext.form.Field({
    autoCreate:{tag: 'div', cn:{tag:'div}},
    fieldLabel:'Status',
    dataIndex : 'somename', // if you using Form.load, this would work
    id:'someid',
    value:true,
    setValue:function(val) { 
          this.value = val;
          if(this.rendered){
               this.el.child('div').update(
                    val ? '<img src="/foo.png">' : '<img src="/bar.png">' 
               );
          }
    },
    getRawValue : function(){
         return this.value;
    }
});

 

 

 

 

 

http://www.sencha.com/forum/showthread.php?5243-form-elements-with-custom-renderer&highlight=somename

 

Add comment


Security code
Refresh

Joomla templates by a4joomla