java快速开发平台在表单中使用editor控件操作大文本字段

1、在前台放置EGO:Editor  控件 设置属性 editorClass="Editor1"
<OBJECT classid=clsid:D475212D-C2B3-4FC3-87B3-8BF721667978
      WebControl_TagName="EGO:Editor"
  editorClass="Editor1"></OBJECT>
2、编写后台代码(JAVA)
这里假定表名为 a , 大文本字段为 (Text) c
====================================================================================
import com.egosystems.taglib.*;
import com.egosystems.dbcore.*;
/**表单相关事件 - 不可修改名称
* 页面加载前事件
* @author egosystems
*/
public void onBeginPageLoad() throws Exception
{
}
/**表单相关事件 - 不可修改名称
* 页面加载后事件
* @author egosystems
*/
public void onAfterPageLoad() throws Exception
{
Editor Editor1 = null;
Editor1=new Editor(This);
Editor1.ImgGuid = This.newguid;//当前的图片对应的记录GUID
Object tmpval = This.dbgr.GetScalarValue("select c from a where guid='"+This.newguid+"'");
String value = "";
if ( tmpval != null )
  value = tmpval.toString();//这里可以通过数据库操作dbgr取到对应的值初始化Editor
Editor1.Value = value;
This.request.setAttribute("Editor1", Editor1);
}
/**表单相关事件 - 不可修改名称
* 保存前事件
* @author egosystems
*/
public void onBeginSave() throws Exception
{
}
/**表单相关事件 - 不可修改名称
* 保存后事件
* @author egosystems
*/
public void onAfterSave() throws Exception
{
Editor Editor1 = null;
Editor1=new Editor(This);
String value = Editor1.Value;
Parm_Struct psGuid = new Parm_Struct( "guid", This.newguid );
Parm_Struct psText = new Parm_Struct( "c", value );
This.dbgr.execSQLCmd("update a set c=? where guid=?",CommandType.SQL,new Parm_Struct[]{psText,psGuid});
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值