数据源问题

时间:2008-06-19 11:29:23   来源:论坛整理  作者:  编辑:chinaitzhe
下面是一个HTMLEditor,怎样才能让Ext.util.Format.htmlDecode(d)中的 d从数据库中动态取得呢?也就是说怎么传进来。d是个String型的。
JScript code





Code highlighting produced by Actipro CodeHighlighter (freeware)

http://www.CodeHighlighter.com/





Ext.onReady(function(){

    var top = new Ext.form.Form({

        labelAlign: 'top'

    });

    



 top.container({},

        new Ext.form.HtmlEditor({

            id:'bio',

                name:'content',

            fieldLabel:'Html Editor (currently only localized in a few languages)',

            enableLinks :false,

            enableSourceEdit :false,

            value: Ext.util.Format.htmlDecode('<FONT color=#ff0000>内容</FONT>'),   

            width:550,

            height:200

        })

    );





    top.render('form-ct2');

});




网友回复:用Ext.Ajax.request访问后台URL
或用DWR访问后台JAVA代码.取得数据.这两种方法都是用回调函数接受返回的数据.
得到返回的数据后再调用HtmlEditor.setValue方法.可以将返回的参数显示

网友回复:HtmlEditor.setValue 这个方法调用不了啊。HtmlEditor都没定义的
关键字:数据源,问题,

文章评论

共有 0 位网友发表了评论 此处只显示部分留言 点击查看完整评论页面