4 * Copyright(c) 2006-2007, Ext JS, LLC.
6 * Originally Released Under LGPL - original licence link has changed is not relivant.
9 * <script type="text/javascript">
13 * @class Roo.form.TextItem
14 * @extends Roo.BoxComponent
15 * Base class for form fields that provides default event handling, sizing, value handling and other functionality.
17 * Creates a new TextItem
18 * @param {Object} config Configuration options
20 Roo.form.TextItem = function(config){
21 Roo.form.TextItem.superclass.constructor.call(this, config);
24 Roo.extend(Roo.form.TextItem, Roo.BoxComponent, {
27 * @cfg {String} tag the tag for this item (default div)
31 * @cfg {String} html the content for this item
35 getAutoCreate : function()
48 onRender : function(ct, position)
50 Roo.form.TextItem.superclass.onRender.call(this, ct, position);
53 var cfg = this.getAutoCreate();
55 cfg.name = typeof(this.name) == 'undefined' ? this.id : this.name;
57 if (!cfg.name.length) {
60 this.el = ct.createChild(cfg, position);
65 * @param {String} html update the Contents of the element.
67 setHTML : function(html)
69 this.fieldEl.dom.innerHTML = html;