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});
}
<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});
}
ES2007
www.founderfix.com